Rewrite file stream.
$ yarn add rwrw
const rewriteStream: (filePath: string, options?: { highWatermark?: number }) =>
Promise<{
readableStream: Readable,
writableStream: Writable
}>
import { rewriteStream } from 'rwrw'
import { lineStream } from 'stroki'
import { replaceStream } from 'rplace'
const { readableStream, writableStream } = rewriteStream('./file.txt')
readableStream
.pipe(lineStream())
.pipe(replaceStream('hello', 'privet')
.pipe(writableStream)