Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

superstorage

andifeind18.8kMIT0.1.1

Storage to share data between modules

localstorage, sessionstorage, globalstorage, storage, share, store

readme

Superstorage

Superstorage is a simple storage system to share data between modules

Usage

// myconf.js
let superstorage = require('superstorage');
let store = superstorage('myconf');

// store data
store.set('foo', 'Foo');

// get data
store.get('foo');

// remove data
store.remove('foo');

// check for existance
store.has('foo');

Get access in other modules to the stored data

// othermodule.js
let superstorage = require('superstorage');
let store = superstorage('myconf');

store.get('foo'); // returns 'Foo'