Skip to content

stuartking/widgetdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Widget DB

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.

Installation

  npm install git+https://github.com/stuartking/widgetdb.git

Initialization

  const widgetdb = require('widgetdb')

Functions

widgetdb.get(id) ⇒ Promise.<object>

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

widgetdb.put(id, value) ⇒ Promise.<object>

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

Release History

  • 1.0.0 Initial release

About

A node module for storing widgets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published