mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
Fix(utils): Remove redundant comparison & bitwise operation (#4178)
Co-authored-by: Fleny <Fleny113@outlook.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user