MCPcopy Create free account
hub / github.com/shabados/database / writeJSON

Function writeJSON

lib/utils.js:50–54  ·  view source on GitHub ↗
( path, json )

Source from the content-addressed store, hash-verified

48 * @param {Object} json The JS object to be serialised
49 */
50const writeJSON = ( path, json ) => writeFileAsync(
51 path,
52 `${JSON.stringify( json, null, 2 )}\n`,
53 { flag: 'w' },
54)
55
56/**
57 * Removes the .json extension from the given path.

Callers 1

saveDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…