ionstore
A very simple isomorphic key-value store with a Map-like API for persisting session data.
Last updated a year ago by fabiospampinato .
Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install ionstore 
SYNC missed versions from official npm registry.

IonStore

A very simple isomorphic key-value store with a Map-like API for persisting session data.

This module simply uses a temporary file under Node, and sessionStorage under a browser. Check out isostore if you need something a bit more sophisticated.

Install

npm install --save ionstore

Usage

import IonStore from 'ionstore';

// Creating a store, for temporary persistence

const store = new IonStore ( 'my-store' ); // The id of the store decides the name of the file on disk

store.has ( 'foo' ); // => false
store.set ( 'foo', 'some_string' ); // => store
store.get ( 'foo' ); // => 'some_string'
store.delete ( 'foo' ); // => true

License

MIT © Fabio Spampinato

Current Tags

  • 1.0.0                                ...           latest (a year ago)

1 Versions

  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |