MCPcopy Create free account
hub / github.com/code-pushup/cli / jsonHash

Function jsonHash

packages/plugin-eslint/src/lib/meta/hash.ts:20–24  ·  view source on GitHub ↗
(data: unknown, bytes = 8)

Source from the content-addressed store, hash-verified

18}
19
20export function jsonHash(data: unknown, bytes = 8): string {
21 return createHash('shake256', { outputLength: bytes })
22 .update(JSON.stringify(data) || 'null')
23 .digest('hex');
24}

Callers 4

ruleIdToSlugFunction · 0.85
hash.unit.test.tsFile · 0.85
mergeRuleIntoMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected