1.0.0 • Published 7 years ago

simple-replace-stream v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

A Node Transform stream that replaces all the occurrences of a given pattern.

##Example

const replaceStream = require('simple-replace-stream')

var regex = new RegExp("some reg exp")

fs.createReadStream('file1')
.pipe(new replaceStream({
  key_find : regex,
  key_replace : "some other string"
}))
.pipe(fs.createWriteStream('file2'))