Class: db

db(path, optionsopt)

new db(path, optionsopt)

Create a JSON db manager
Parameters:
Name Type Attributes Default Description
path string Path to json file
options dbOptions <optional>
{debug: false} Misc options
Source:

Methods

(async) overwrite(valueopt)

Overwrites the contents with nothing or a passed value.
Parameters:
Name Type Attributes Default Description
value ValidJson | string <optional>
''
Source:
Returns:
Promise

(async) update(newData)

Updates the json db with new values.
Parameters:
Name Type Description
newData ValidJson New/Changed data to be written/updated.
Source:
Returns:
Promise