Class: FileKeyValueStore

FileKeyValueStore

This is a default implementation of the KeyValueStore API. It uses files to store the key values.

new FileKeyValueStore(options)

constructor
Parameters:
Name Type Description
options Object contains a single property path which points to the top-level directory for the store

Extends

Methods


getValue(name)

Get the value associated with name.
Parameters:
Name Type Description
name string Name of the key
Inherited From:
Overrides:
Returns:
Promise for the value corresponding to the key. If the value does not exist in the store, returns null without rejecting the promise
Type
Promise

setValue(name, value)

Set the value associated with name.
Parameters:
Name Type Description
name string Name of the key to save
value string The Value to save
Inherited From:
Overrides:
Returns:
Promise for the 'value' object upon successful write operation
Type
Promise