UNPKG

dockview

Version:

Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support

11 lines (10 loc) 320 B
export const clamp = (value, min, max) => { if (min > max) { throw new Error(`${min} > ${max} is an invalid condition`); } return Math.min(max, Math.max(value, min)); }; export const sequentialNumberGenerator = () => { let value = 1; return { next: () => (value++).toString() }; };