0.2.1 • Published 8 years ago

pouchdb-updateif v0.2.1

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

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) }
    }
  }
})
0.2.1

8 years ago

0.2.0

8 years ago