pouchdb-updateif

    0.2.1 • Public • Published

    pouchdb-updateif

    Utilities for conditional updating of Pouch/Couch objects

    Installation

    $ npm install pouchdb-updateif

    Example

    const asDesignDoc = require('couch-asdesigndoc')
    const PouchDB = require('pouchdb-node')
    PouchDB.plugin(require('pouchdb-updateif')
     
    let db = new PouchDB('example')
    db.updateIfChanged(asDesignDoc({
      _id: '_design/test',
      views: {
        simple: {
          map(doc) { emit(doc.date, doc.title) }
        }
      }
    })

    Install

    npm i pouchdb-updateif

    DownloadsWeekly Downloads

    2

    Version

    0.2.1

    License

    ISC

    Last publish

    Collaborators

    • shanewholloway