Stream.stringify()

a toString method

Usage

Hover over inputs/exits for more info.

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


// a toString method

Stream.stringify({

stream: '*',

write: '.tmp/test.log',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// It's not a valid stream

errorNotStream: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

stream required

A readable stream

write

a path for writing file

'.tmp/test.log'

Exits

error

An unexpected error occurred.

errorNotStream

It's not a valid stream

success

OK.

'a content text'