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

Function writeSource

packages/effect/typeperf/compare.mjs:95–98  ·  view source on GitHub ↗
(path, source)

Source from the content-addressed store, hash-verified

93}
94
95const writeSource = (path, source) => {
96 mkdirSync(dirname(path), { recursive: true })
97 writeFileSync(path, source.endsWith("\n") ? source : `${source}\n`)
98}
99
100const sanitize = (name) => name.replace(/[^a-zA-Z0-9._-]/g, "-")
101

Callers 1

materializeSuiteFunction · 0.85

Calls 1

dirnameFunction · 0.85

Tested by

no test coverage detected