Class: LokiLocalStorageAdapter

LokiLocalStorageAdapter()

new LokiLocalStorageAdapter()

A loki persistence adapter which persists to web browser's local storage object

Source:

Methods

deleteDatabase(dbname, callback)

deleteDatabase() - delete the database from localstorage, will throw an error if it can't be deleted

Parameters:
Name Type Description
dbname string

the filename of the database to delete

callback function

the callback to handle the result

Source:

loadDatabase(dbname, callback)

loadDatabase() - Load data from localstorage

Parameters:
Name Type Description
dbname string

the name of the database to load

callback function

the callback to handle the result

Source:

saveDatabase(dbname, callback)

saveDatabase() - save data to localstorage, will throw an error if the file can't be saved might want to expand this to avoid dataloss on partial save

Parameters:
Name Type Description
dbname string

the filename of the database to load

callback function

the callback to handle the result

Source: