file-str-replace

0.2.0 • Public • Published

file-str-replace Build Status

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');

Package Sidebar

Install

npm i file-str-replace

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • mrzmyr