@brewww/authentication-service
Version:
Authenticator service for Brew projects.
12 lines • 420 B
JavaScript
;
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