pull-async-values
Source a pull-stream with values from an async function
Last updated 9 years ago by joshwnj .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pull-async-values 
SYNC missed versions from official npm registry.

pull-async-values

A thin wrapper around pull.values, where you want to source a pull-stream with values from an async function.

Example usage

var pull = require('pull-stream')
var fs = require('fs')
var asyncValues = require('pull-async-values')

// collect all files in the current directory except for the README
pull(
  asyncValues(fs.readdir.bind(fs, __dirname)),
  pull.filter(function (filename) { return filename !== 'README.md' }),
  pull.collect(function (err, array) {
    console.log(array)
  })
)

You can also take a look at the examples

License

MIT

Current Tags

  • 1.0.3                                ...           latest (9 years ago)

4 Versions

  • 1.0.3                                ...           9 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |