1.1.1 • Published 11 years ago
pouchdb-require v1.1.1
PouchDB require() plugin
Usage
To use this plugin, include it after pouchdb.js in your HTML page:
<script src="pouchdb.js"></script>
<script src="pouchdb.require.js"></script>This plugin is also available from Bower:
bower install pouchdb-requireOr to use it in Node.js, just npm install it:
npm install pouchdb-requireAnd then do this:
var PouchDB = require('pouchdb')
PouchDB.plugin(require('pouchdb-require'))API
db.require('_design/api', 'lib/date')
.then(function (date) {
return date.stringify(new Date)
}).catch(function (err) {
// handle err
});