
Company News
Socket Has Acquired Secure Annex
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.
backbone-pouch-collection
Advanced tools
Hooks up PouchDB to a Backbone collection. Allows you to easily retrieve your data from CouchDB/PouchDB views.
npm install backbone-pouch-collection
Define the query options in your collection definition.
opts can be an object or a function which returns an object.
You also need to provide a PouchDB instance to your collection.
opts.view can also be _all_docs to query...well... _all_docs.
The defaults are _all_docs and include_docs: true.
var PouchBase = require('backbone-pouch-collection')
var Collection = PouchBase.extend({
db: new Pouchdb('foo'),
opts: {
view: 'your/viewname',
params: {
// all the (c/p)ouchdb view params you want
}
}
myMethod: function () {}
})
You can also pass options to collection.fetch() to override the
default.
// fetch() returns a promise
collection.fetch({
couch: {
// all the (c/p)ouchdb view params you want
}
})
To run the unit tests:
npm test
Copyright (c) 2014 Clemens Stolle Licensed under the MIT license.
FAQs
Backbone Collections with PouchDB as the data source
The npm package backbone-pouch-collection receives a total of 7 weekly downloads. As such, backbone-pouch-collection popularity was classified as not popular.
We found that backbone-pouch-collection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.