Stream.replace()

Search and replace

Usage

Hover over inputs/exits for more info.

var Stream = require('machinepack-stream');


// Search and replace

Stream.replace({

search: '*',

stream: '*',

replace: 'abc',

}).execSync();

Inputs

search required

A string or a string's array to search

stream

A readable stream

replace

A string, replace

'abc'

Exits

error

An unexpected error occurred.

errorNotStream

It's not a valid stream

success

OK.