No description, website, or topics provided.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
test
.gitignore
.testem.json
.travis.yml
LICENCE
README.md
index.js
package.json

README.md

continuable-list

Turn an array of continuables into a continuable containing an array

Example

var list = require("continuable-list")
var fs = require("fs")

var readFile = function (uri) {
    return function continuable(cb) {
        fs.readFile(uri, cb)
    }
}

var uris = ["./package.json", "./index.js", "./README.md"]

var files = uris.map(function (uri) {
    return readFile(uri)
})

list(files)(function (err, files) {
    // now have an array of buffers or an error if one of
    // the read requests failed
})

Installation

npm install continuable-list

Contributors

  • Raynos

MIT Licenced