pull-pushable

pull-stream with a push interface

npm install pull-pushable
43 downloads in the last day
167 downloads in the last week
446 downloads in the last month

pull-pushable

A pull-stream with a pushable interface.

Example

var pushable = require('pull-pushable')
var pull     = require('pull-stream')

pushable.push(1)

pushable.pipe(pull.drain(console.log))

## Example 2

Create a false source stream with a `.push(data, cb?)`
property. Use when you really need a push api,
or need to adapt pull-stream to some other push api.

``` js
function ls (dir) {
  var ps = pull.pushable()
  fs.readdir(dir, function (err, ls) {
    if(err) return ps.end(err)
    ls.forEach(function (file) {
      ps.push(path.resolve(dir, file))
    })
    ps.end()
  })
  return ps
}

```

License

MIT

npm loves you