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

Function convert

tools/conversion.js:283–289  ·  view source on GitHub ↗
(content, operations)

Source from the content-addressed store, hash-verified

281}
282
283function convert (content, operations) {
284 for (let i = 0; i < operations.length; i++) {
285 const operation = operations[i];
286 content = content.replace(operation[0], operation[1]);
287 }
288 return content;
289}
290
291function convertFile (fileName, operations) {
292 fs.readFile(fileName, 'utf-8', function (err, file) {

Callers 1

convertFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected