file-str-replace
v0.2.0
Published
standalone module to replace a string in a file
Downloads
1
Readme
file-str-replace
standalone module to replace a string in a file
Install
$ npm install --save-dev file-str-replace
Usage
var fileStr = require('file-str-replace');
fileStr.replace('example.txt', /[0-9]/g, '<3', function (newFileContent) {
// console.log(newFileContent);
});
var newFileContent = fileStr.replaceSync('example.txt', /[0-9]/g, '<3');