UNPKG

cosmo-ui

Version:
13 lines 436 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.shortID = function () { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); }; exports.randomID = function () { var buf = new Uint8Array(16); crypto.getRandomValues(buf); return Array.from(buf).reduce(function (id, n) { return id + n.toString(16); }, ''); }; //# sourceMappingURL=random.js.map