cosmo-ui
Version:
Common React components
13 lines • 436 B
JavaScript
;
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