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

Function writeJson

packages/effect/typeperf/compare.mjs:90–93  ·  view source on GitHub ↗
(path, value)

Source from the content-addressed store, hash-verified

88const readJson = (path) => JSON.parse(readFileSync(path, "utf8"))
89
90const writeJson = (path, value) => {
91 mkdirSync(dirname(path), { recursive: true })
92 writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`)
93}
94
95const writeSource = (path, source) => {
96 mkdirSync(dirname(path), { recursive: true })

Callers 2

writeTempTsconfigFunction · 0.70
mainFunction · 0.70

Calls 1

dirnameFunction · 0.85

Tested by

no test coverage detected