cstore
Super tiny, closure-based data store.
Installation
npm install cstore
Usage
const cstore =const store =store // => "foo"store // => "bar"store // => "baz"// => ["foo", "bar", "baz"]// => "foo"// => "bar"// => "baz"store // => "baz"store // => "bar"// => ["foo"]
API
store = cstore()
Initialize a store.
store.add(value)
Add the given value.
store.remove(key)
Remove a value by passing the given key.
store([key])
Get a value by passing the given key or all values by passing nothing. Aliased
to store.get
.