from-source

Generate a stream from a source

from-source

Generate a stream from a source

var fromSource = require("from-source")
 
fromSource(function (writecallback) {
    for (var count = 0; count < 5; count++) {
        write(count.toString())
    }
    callback(null, "\n")
}).pipe(process.stdout)
 
fromSource(function (callback) {
    callback(null, "once\n")
}, { once: true}).pipe(process.stdout)
 

npm install from-source

  • Raynos