UNPKG

@brewww/authentication-service

Version:
12 lines 420 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SnowflakeId = void 0; class SnowflakeId { static generate(sequence, instance = BigInt(1), epoch = BigInt(1577836800000)) { return (((BigInt(Date.now()) - epoch) << BigInt(23)) | (instance << BigInt(10)) | sequence); } } exports.SnowflakeId = SnowflakeId; //# sourceMappingURL=snowflake-id.js.map