API to read and write objects to the YAKjs key/value store. The store is also accessible via the web interface.
A key
can be namespaced with '.', use only for a better visualization on the web interface.
const store = require('./common/jsonStore');
Creates or updates a store item.
Parameter | Type | Description |
---|---|---|
key | string |
The unique key for the item. |
value | Object |
The item value. Any JSON serializable object. |
let contacts= [{name: 'Hugo', email: 'hugo@example.com'}];
store.setValue('myPlugin.data.key', contacts);
Gets a store item.
Parameter | Type | Description |
---|---|---|
key | string |
The store item key. |
var data = store.getValue('myPlugin.data.key');