tiptap/packages/tiptap-core/src/utils/minMax.ts

3 lines
137 B
TypeScript
Raw Normal View History

2019-12-08 07:16:44 +08:00
export default function minMax(value:number = 0, min:number = 0, max:number = 0): number {
return Math.min(Math.max(value, min), max)
}