(snowflake: Snowflake)
| 21 | } |
| 22 | |
| 23 | export function getSnowflakeUTCDate(snowflake: Snowflake) { |
| 24 | const date = getDate(snowflake); |
| 25 | return `${ |
| 26 | date.getUTCMonth() + 1 |
| 27 | }/${date.getUTCDate()}/${date.getUTCFullYear()}`; |
| 28 | } |
| 29 | |
| 30 | export function getWorkerId(snowflake: Snowflake) { |
| 31 | return Number((BigInt(snowflake) & BigInt(0x3e0000)) >> BigInt(17)); |
no test coverage detected