tsbase
Version:
Base class libraries for TypeScript
16 lines • 546 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Guid = void 0;
class Guid {
constructor() { }
static NewGuid() {
return (this.S4() + this.S4() + '-' + this.S4() + '-4' + this.S4().substr(0, 3) + '-' +
this.S4() + '-' + this.S4() + this.S4() + this.S4()).toLowerCase();
}
static S4() {
// eslint-disable-next-line no-bitwise
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
}
exports.Guid = Guid;
//# sourceMappingURL=Guid.js.map