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

Function getUniqueId

src/common/codec.ts:29–34  ·  view source on GitHub ↗
(length = 16)

Source from the content-addressed store, hash-verified

27 arrayMap(array as any, () => mathFloor(mathRandom() * 256)) as any;
28
29export const getUniqueId: typeof getUniqueIdDecl = (length = 16): Id =>
30 arrayReduce<number, Id>(
31 getRandomValues(new Uint8Array(length)) as any,
32 (uniqueId, number) => uniqueId + encode(number),
33 EMPTY_STRING,
34 );

Callers 15

ValuesViewFunction · 0.90
TableViewFunction · 0.90
TablesViewFunction · 0.90
StoreViewFunction · 0.90
MetricsViewFunction · 0.90
SliceViewFunction · 0.90
IndexViewFunction · 0.90
IndexesViewFunction · 0.90
QueryViewFunction · 0.90
QueriesViewFunction · 0.90
RelationshipViewFunction · 0.90
RelationshipsViewFunction · 0.90

Calls 2

arrayReduceFunction · 0.90
encodeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…