JSPM

pull-couchdb

0.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q12486F

    Pull-streams for reading and writing in CouchDB.

    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) => {
            // ...
        })
    )