Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Persistent Synchronous Key-Value Store for Node.js
C++ JavaScript Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
node_modules
src
test
.gitignore
.gitmodules
.npmignore
.travis.yml
Makefile
README.md
binding.gyp
package.json

README.md

node-syncstorage

Persistent Key-Value Store for Node.js. Not support asynchronous API.
Build Status

Installation

$ npm install syncstore

Example

var syncstore = require('syncstore');
var store = new syncstore.SyncStore('./cachedb');

store.set('key', 'value');
console.log(store.get('key')); // value
console.log(store.exists('key')); // true

store.each(function(index, key, value) {
  // ...
});

console.log(store.size()) // 1
store.del('key');

store.close();

What you should know

  • SyncStore is dependent on leveldb. It is not multi-process safe.
  • Don't use this for regular server code. It will ruin the responsiveness of your server.

Something went wrong with that request. Please try again.