Package Exports
- pull-couchdb
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 (pull-couchdb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pull-couchdb
Pull-streams for reading and writing in CouchDB.
Install
npm i pull-couchdb
Usage
allDocs(db)
Requests CouchDB's GET /{db}/_all_docs
and streams the results.
pull(
allDocs('http://localhost:5984/foo_storage'),
drain(record => {
// ...
})
)
saveEach(db, params)
Saves each object to CouchDB using POST /{db}
.
pull(
values([
{ test: 'Hello world' }
{ test: 'foo' },
{ test: 'bar' }
]),
saveEach('http://localhost:5984/foo_storage'),
collect((err, results) => {
// ...
})
)