Event emitting data store.
$ npm install simple-store
const store = require('simple-store')
const user = store('user')
user.on('data', val => console.log(val))
user({name: 'Tobi', age: 12})
user()
// => {name: 'Tobi', age: 12}
Initialize a store with a name.
Set the store to contain a value. Emits a data
event. Alias: .set(value)
.
Get a value from the store. Alias: .get()
.
data - emitted whenever the value in the store is set