UNPKG

microsoft-speech-browser-sdk

Version:
19 lines (17 loc) 627 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var CreateGuid = function () { var d = new Date().getTime(); var guid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (d + Math.random() * 16) % 16 | 0; d = Math.floor(d / 16); return (c === "x" ? r : (r & 0x3 | 0x8)).toString(16); }); return guid; }; exports.CreateGuid = CreateGuid; var CreateNoDashGuid = function () { return CreateGuid().replace(new RegExp("-", "g"), "").toUpperCase(); }; exports.CreateNoDashGuid = CreateNoDashGuid; //# sourceMappingURL=Guid.js.map