(snowflake: Snowflake)
| 28 | } |
| 29 | |
| 30 | export function getWorkerId(snowflake: Snowflake) { |
| 31 | return Number((BigInt(snowflake) & BigInt(0x3e0000)) >> BigInt(17)); |
| 32 | } |
| 33 | |
| 34 | export function getProcessId(snowflake: Snowflake) { |
| 35 | return Number((BigInt(snowflake) & BigInt(0x1f000)) >> BigInt(12)); |