You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iotcat 74338fbb93 auto update 5 years ago
..
node_modules/looper auto update 5 years ago
test auto update 5 years ago
.travis.yml auto update 5 years ago
LICENSE auto update 5 years ago
README.md auto update 5 years ago
index.js auto update 5 years ago
package.json auto update 5 years ago

README.md

stream-to-pull-stream

Convert a classic-stream, or a new-stream into a pull-stream

example

var toPull = require('stream-to-pull-stream')
var pull = require('pull-stream')

pull(
  toPull.source(fs.createReadStream(__filename)),
  pull.map(function (e) { return e.toString().toUpperCase() }),
  toPull.sink(process.stdout, function (err) {
    if(err) throw err
    console.log('done')
  })
)

if the node steam is a duplex (i.e. net, ws) then use toPull.duplex(stream, cb?) duplex takes an optional callback in the same way that sink does.

License

MIT