MCPcopy Index your code
hub / github.com/AnswerOverflow/AnswerOverflow / getWorkerId

Function getWorkerId

packages/ui/src/utils/snowflake.tsx:30–32  ·  view source on GitHub ↗
(snowflake: Snowflake)

Source from the content-addressed store, hash-verified

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

Callers 1

parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected