tiptap/packages/core/src/utils/minMax.ts
2020-09-24 00:29:05 +02:00

4 lines
141 B
TypeScript

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