couch-asdesigndoc

0.4.0 • Public • Published

couch-asdesigndoc

Transform functions inside a Design Doc object to strings suitable for CouchDB

Installation

$ npm install couch-asdesigndoc

Example

const asDesignDoc = require('couch-asdesigndoc')
const PouchDB = require('pouchdb-node')
let db = new PouchDB('example')

db.put(asDesignDoc({
  _id: '_design/test',
  views: {
    simple: {
      map(doc) { emit(doc.date, doc.title) }
    }
  }
})

Package Sidebar

Install

npm i couch-asdesigndoc

Weekly Downloads

1

Version

0.4.0

License

ISC

Last publish

Collaborators

  • shanewholloway