UNPKG

d2-ui

Version:
21 lines (19 loc) 526 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = uuid; /** * Generates a universally unique identifier * * @see https://en.wikipedia.org/wiki/Universally_unique_identifier * * @returns {string} The uuid */ function uuid() { var s4 = function s4() { return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); }; return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); } //# sourceMappingURL=uuid.js.map