Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

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

1

version

0.2.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability