Fix(utils): Remove redundant comparison & bitwise operation (#4178)

Co-authored-by: Fleny <Fleny113@outlook.com>
This commit is contained in:
LTS (Link)
2025-05-01 11:03:53 +02:00
committed by GitHub
co-authored by Fleny
parent f227b11a8c
commit 11c6d043e3
+2 -2
View File
@@ -1,11 +1,11 @@
import type { BigString } from '@discordeno/types'
export function snowflakeToBigint(snowflake: BigString): bigint {
return BigInt(snowflake) | 0n
return BigInt(snowflake)
}
export function bigintToSnowflake(snowflake: BigString): string {
return snowflake === 0n ? '' : snowflake.toString()
return snowflake ? snowflake.toString() : ''
}
export function snowflakeToTimestamp(snowflake: BigString): number {