summary refs log tree commit diff
path: root/src/util/util/Snowflake.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/util/Snowflake.ts')
-rw-r--r--src/util/util/Snowflake.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/util/util/Snowflake.ts b/src/util/util/Snowflake.ts

index 93898fbbd..8af567c79 100644 --- a/src/util/util/Snowflake.ts +++ b/src/util/util/Snowflake.ts
@@ -18,9 +18,7 @@ export class Snowflake { static workerId = BigInt((cluster.worker?.id || 0) % 31); // max 31 constructor() { - throw new Error( - `The ${this.constructor.name} class may not be instantiated.`, - ); + throw new Error(`The ${this.constructor.name} class may not be instantiated.`); } /** @@ -115,9 +113,7 @@ export class Snowflake { * @returns {DeconstructedSnowflake} Deconstructed snowflake */ static deconstruct(snowflake) { - const BINARY = Snowflake.idToBinary(snowflake) - .toString(2) - .padStart(64, "0"); + const BINARY = Snowflake.idToBinary(snowflake).toString(2).padStart(64, "0"); const res = { timestamp: parseInt(BINARY.substring(0, 42), 2) + Snowflake.EPOCH, workerID: parseInt(BINARY.substring(42, 47), 2),