MCPcopy
hub / github.com/paralleldrive/cuid2 / hash

Function hash

src/index.js:57–64  ·  view source on GitHub ↗
(input = "")

Source from the content-addressed store, hash-verified

55}
56
57const hash = (input = "") => {
58 // Drop the first character because it will bias the histogram
59 // to the left.
60 const encoder = new TextEncoder();
61 return bufToBigInt(sha3(encoder.encode(input)))
62 .toString(36)
63 .slice(1);
64};
65
66const alphabet = Array.from({ length: 26 }, (x, i) =>
67 String.fromCharCode(i + 97),

Callers 2

createFingerprintFunction · 0.85
initFunction · 0.85

Calls 1

bufToBigIntFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…