1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function getMongoObjectId() {
|
4 | // tslint:disable-next-line:no-bitwise
|
5 | const timestamp = (new Date().getTime() / 1000 | 0).toString(16);
|
6 | return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function () {
|
7 | // tslint:disable-next-line:no-bitwise
|
8 | return (Math.random() * 16 | 0).toString(16);
|
9 | }).toLowerCase();
|
10 | }
|
11 | exports.getMongoObjectId = getMongoObjectId;
|
12 | //# sourceMappingURL=idGenerator.js.map |
\ | No newline at end of file |