mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
chore(repo): prune dead code and duplicate abstractions (#3413)
This commit is contained in:
1 parent
c17091768c
commit
c9fdf8fead
2937 files changed
+42233
-176793
No files matched your search
@@ -164,10 +164,6 @@ export function createSnowflake(options: CreateSnowflakeOptions): bigint {
|
||||
return createSnowflakeBigInt(relativeTimestamp, workerId, sequence);
|
||||
}
|
||||
|
||||
export function createSnowflakeFromTimestamp(timestamp: number | bigint, workerId = 0): bigint {
|
||||
return createSnowflake({timestamp, workerId});
|
||||
}
|
||||
|
||||
export function snowflakeToDate(snowflake: bigint): Date {
|
||||
return new Date(Number(toEpochTimestamp(snowflake >> TIMESTAMP_SHIFT)));
|
||||
}
|
||||
@@ -194,3 +190,7 @@ export function isValidSnowflake(value: unknown): value is bigint {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export function createSnowflakeFromTimestamp(timestamp: number | bigint, workerId = 0): bigint {
|
||||
return createSnowflake({timestamp, workerId});
|
||||
}
|
||||
Reference in new issue
Block a user