UNPKG

nishant-design-system

Version:
23 lines (21 loc) 564 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.uuid = exports.range = void 0; const uuid = () => { let dt = new Date().getTime(); return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => { const r = (dt + Math.random() * 16) % 16 | 0; dt = Math.floor(dt / 16); return (c === 'x' ? r : r & 0x3 | 0x8).toString(16); }); }; exports.uuid = uuid; const range = (start, end) => { const length = end - start + 1; return Array.from({ length }, (_, i) => start + i); }; exports.range = range;