UNPKG

murlock

Version:

A distributed locking solution for NestJS, providing a decorator for critical sections with Redis-based synchronization.

13 lines 471 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateUuid = void 0; function generateUuid() { let d = Date.now(); return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { const r = (d + Math.random() * 16) % 16 | 0; d = Math.floor(d / 16); return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16); }); } exports.generateUuid = generateUuid; //# sourceMappingURL=uuid-generator.js.map