Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

pouchdb-require

1.1.1 • Public • Published

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-require

Or to use it in Node.js, just npm install it:

npm install pouchdb-require

And 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
});

Install

npm i pouchdb-require

DownloadsWeekly Downloads

0

Version

1.1.1

License

BSD-2-Clause

Last publish

Collaborators

  • avatar