npm.io
0.1.2 • Published 7 years ago

@kanety/js-store

Licence
MIT
Version
0.1.2
Deps
0
Size
11 kB
Vulns
0
Weekly
0

js-store

A simple web storage wrapper saving json data.

Installation

Install from npm:

$ npm install @kanety/js-store --save

Usage

import JsStore from '@kanety/js-store'

let store = new JsStore({
  type: 'session',  // or 'local'
  key: 'YOUR_STORAGE_KEY'
});

// set
store.set({ key: 'value' });

// get
let data = store.get();

// remove
store.remove();

License

The library is available as open source under the terms of the MIT License.

Keywords