@inkline/inkline
Version:
Inkline is the Vue.js UI/UX Library built for creating your next design system
10 lines • 341 B
JavaScript
/**
* Math.random should be unique because of its seeding algorithm.
* Convert it to base 36 (numbers + letters), and grab the first 9 characters after the decimal.
*
* @param baseId
*/
export function uid(baseId) {
return `${baseId ? `${baseId}-` : ''}${Math.random().toString(36).substr(2, 9)}`;
}
//# sourceMappingURL=uid.mjs.map