MCPcopy Create free account
hub / github.com/openai/plugins / writeJson

Function writeJson

plugins/plugin-eval/src/lib/files.js:86–88  ·  view source on GitHub ↗
(targetPath, payload)

Source from the content-addressed store, hash-verified

84}
85
86export async function writeJson(targetPath, payload) {
87 await writeText(targetPath, `${JSON.stringify(payload, null, 2)}\n`);
88}
89
90export function isProbablyTextFile(filePath) {
91 return TEXT_EXTENSIONS.has(path.extname(filePath).toLowerCase());

Callers 2

initializeBenchmarkFunction · 0.90
runBenchmarkFunction · 0.90

Calls 1

writeTextFunction · 0.85

Tested by

no test coverage detected