MCPcopy Create free account
hub / github.com/Effect-TS/effect / machineId

Function machineId

packages/effect/src/unstable/cluster/Snowflake.ts:192–193  ·  view source on GitHub ↗
(snowflake: Snowflake)

Source from the content-addressed store, hash-verified

190 * @since 4.0.0
191 */
192export const machineId = (snowflake: Snowflake): MachineId =>
193 Number((snowflake >> constBigInt12) % constBigInt1024) as MachineId
194
195/**
196 * Extracts the per-machine sequence component from a snowflake id.

Callers 1

toPartsFunction · 0.85

Calls 1

NumberInterface · 0.50

Tested by

no test coverage detected