Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backbone-db-indexing-adapter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-db-indexing-adapter

Interface for Backbone-db compatible adapters that can store indices

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

backbone-db-indexing-adapter

Build Status

Interface for Backbone-db compatible adapters that can store indices.

IndexedDBAdapterInterface

Interface that compliant backbone-db adapter must implement. Interface defines the following methods:

addToIndex

Adds a key to index.

readFromIndex

Read keys from the index.

readFromIndexes

Read keys from multiple indexes.

removeFromIndex

Remove models' keys from index.

removeIndex

Removes the index completely.

existsInIndex

Check if key exists in the index.

indexCount

Get number of keys in the index.

score

Return the score of key in the index.

IndexingDBLocal

Backbone-db adapter that implements IndexedDBAdapterInterface, storing indexes in memory/localStorage

Usage:

  var IndexingDBLocal = require('backbone-db-indexing-adapter').IndexingDBLocal;
  var store = new IndexingDBLocal('test');

IndexedCollectionMixin

Mixin for Collections that use IndexedDBAdapterInterface compliant backbone-db adapter

Usage:

  var TestIndexedCollection = MyCollection.extend(
    _.extend({}, IndexedCollectionMixin, {
      indexDb: store
    })
  );
  var c = new TestIndexedCollection();
  return c.readFromIndex().then(...);

Tests

npm run test

Keywords

FAQs

Package last updated on 13 Mar 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc