(content, operations)
| 281 | } |
| 282 | |
| 283 | function 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 | |
| 291 | function convertFile (fileName, operations) { |
| 292 | fs.readFile(fileName, 'utf-8', function (err, file) { |