MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / convertFile

Function convertFile

tools/conversion.js:291–301  ·  view source on GitHub ↗
(fileName, operations)

Source from the content-addressed store, hash-verified

289}
290
291function convertFile (fileName, operations) {
292 fs.readFile(fileName, 'utf-8', function (err, file) {
293 if (err) throw err;
294
295 file = convert(file, operations);
296
297 fs.writeFile(fileName, file, function (err) {
298 if (err) throw err;
299 });
300 });
301}

Callers 1

conversion.jsFile · 0.85

Calls 1

convertFunction · 0.85

Tested by

no test coverage detected