tiptap/packages/core/src/utils/minMax.ts
2020-03-30 10:42:59 +02:00

3 lines
140 B
TypeScript

export default function minMax(value: number = 0, min: number = 0, max: number = 0): number {
return Math.min(Math.max(value, min), max)
}