MCPcopy Index your code
hub / github.com/tinyplex/tinybase / getClientIdFromUniqueId

Function getClientIdFromUniqueId

src/common/hlc.ts:19–28  ·  view source on GitHub ↗
(uniqueId: Id)

Source from the content-addressed store, hash-verified

17const SHIFT6 = 2 ** 6;
18
19const getClientIdFromUniqueId = (uniqueId: Id): Id => {
20 const clientHash30 = getHash(uniqueId);
21 return (
22 encode(clientHash30 / SHIFT24) +
23 encode(clientHash30 / SHIFT18) +
24 encode(clientHash30 / SHIFT12) +
25 encode(clientHash30 / SHIFT6) +
26 encode(clientHash30)
27 );
28};
29
30export const getHlcFunctions: typeof getHlcFunctionsDecl = (
31 uniqueId?: Id,

Callers 1

encodeHlcFunction · 0.70

Calls 2

getHashFunction · 0.90
encodeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…