MCPcopy Create free account
hub / github.com/Effect-TS/effect / suiteHash

Function suiteHash

packages/effect/typeperf/compare.mjs:102–109  ·  view source on GitHub ↗
(suite)

Source from the content-addressed store, hash-verified

100const sanitize = (name) => name.replace(/[^a-zA-Z0-9._-]/g, "-")
101
102const suiteHash = (suite) => {
103 const hash = createHash("sha256")
104 hash.update(`baseline.ts\0${suite.baseline}\0`)
105 for (const fixture of suite.fixtures) {
106 hash.update(`fixtures/${fixture.name}.ts\0${fixture.source}\0`)
107 }
108 return hash.digest("hex")
109}
110
111const typescriptPackagePath = require.resolve("typescript/package.json")
112const typescriptDir = dirname(typescriptPackagePath)

Callers 1

mainFunction · 0.85

Calls 2

digestMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected