Generate a stream from a source
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
.gitignore
LICENCE
README.md
index.js
package.json

README.md

from-source

Generate a stream from a source

Example

var fromSource = require("from-source")

fromSource(function (write, callback) {
    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)

Installation

npm install from-source

Contributors

  • Raynos

MIT Licenced