MCPcopy Create free account
hub / github.com/btd/rollup-plugin-visualizer / getDataHash

Function getDataHash

plugin/module-mapper.ts:22–26  ·  view source on GitHub ↗
(json: string)

Source from the content-addressed store, hash-verified

20};
21
22export const getDataHash = (json: string) => {
23 const hash = crypto.createHash("sha1").update(json).digest("hex");
24 const hashSub = hash.substring(0, 8);
25 return hashSub;
26};
27
28export const replaceHashPlaceholders = (data: VisualizerData) => {
29 const json = JSON.stringify(data);

Callers 1

replaceHashPlaceholdersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected