JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 372180
  • Score
    100M100P100Q173039F
  • License MIT

convert a stream1 or streams2 stream into a pull-stream

Package Exports

  • stream-to-pull-stream

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stream-to-pull-stream) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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