Path to the JSON file that will be used to persist the data.
If enabled, Cetriolino will automatically save data to the specified file after every change.
Deletes everything from the db.
Manually dumps the db to the file given in the constructor/load method.
The file is serialized to JSON and the db content needs to be able to
be JSON.stringify
-ed to be dumped without issues.
More info on JSON.stringify` here
Whether or not a given key value equals undefined
Array containing all the keys in the db.
Appends additional data to an existing list value.
If the element at the chosen position does not exist, it is set with the given value.
Position within the list of the element to be appended.
Creates an empty list with the given name.
Value of the element at the given position of the given list,
if it exists. undefined
otherwise.
Whole list, if it exists.
Length of the given list, if it exists.
Manually loads and parses a JSON file to use as db.
Any JSON file can be used as a starting point. If the given file does not exist, the db will be initialized empty.
Pops last element from the list.
The value of the element if the list has any, undefined
otherwise.
Deletes an existing list with the given name.
Random value chosen from all of the available keys in the db.
Deletes an existing key.
Creates a new values or updates an existing one.
Generated using TypeDoc
Creates a new Cetriolino instance.
See load for more info regarding the file loading.