Initializes the JsonStorage. It's advised to use the async static factory method create(...) instead.
Optional
file: stringPath to the JSON file (must be read- and writable)
Loads a value from the storage
The key whose value should be returned.
the value or undefined
Saves a key in the JSON file (supports nested values).
Static
createFactory for a JsonStorage object that initializes the object. Throws errors is something is wrong with the file (not accessible / can't be parsed).
Path to the JSON file (must be read- and writeable)
Reads key-value pairs from a JSON file and writes them back. It is recommended to create it with the static create(...) factory instead of the sync constructor.