Posts tagged with tips


Here is the simple chunk of code to replace a particular section in a file asynchronously. fs.readFile(filePath, 'utf8', function(err, data) { if (err) { return console.log(err); } var result = data.replace(your-regex-or-text,replacement-text)…