A very basic node module for storing and retriving widgets. Widget DB is an in-memory datastore that is not persisted after runtime termination. This module has been created for coding exercises and is not designed for any real world use.
npm install git+https://github.com/stuartking/widgetdb.git
const widgetdb = require('widgetdb')
Get a widget by its id.
Returns: Promise.<object>
- A promise that contiains
the value of the widget when fulfilled.
Param | Type | Description |
---|---|---|
id | String |
The widget id |
Stores a new value for a widget
Returns: Promise.<object>
- A promise that contiains
the value stored when fulfilled.
Param | Type | Description |
---|---|---|
id | String |
The widget id |
value | Object |
The value of the widget |
- 1.0.0 Initial release