mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 18:00:08 +00:00
10 lines
246 B
TypeScript
10 lines
246 B
TypeScript
import { BigString } from "../mod.ts";
|
|
|
|
export function snowflakeToBigint(snowflake: BigString) {
|
|
return BigInt(snowflake) | 0n;
|
|
}
|
|
|
|
export function bigintToSnowflake(snowflake: bigint) {
|
|
return snowflake === 0n ? "" : snowflake.toString();
|
|
}
|