pluggable-store

A unified interface to key-value stores

npm install pluggable-store
40 downloads in the last month

PluggableStore

A unified interface to key-value stores.

It comes bundled with these adapters:

  • in-memory
  • HTML5 local storage (only browser)
  • file system (only node.js)

Usage example

You can always read/write with callbacks - some adapters work synchronous as well:

pluggableStore = require('pluggable-store');
var store = pluggableStore.server().memory();

store.write('key1', 'value1');
res = store.read('key1');

store.write('key1', function() {
  store.read('key1', function(err, res) {
    ...
  })
})
npm loves you