ha-store-browser
v2.0.0
Published
A Browser LocalStorage adapter for ha-store
Downloads
8
Readme
HA-store-browser is a plugin to replace the default in-memory storage in ha-store. It offers a few choices, based on your preferences. Keys can be put in either LocalStorage or indexedDB.
Installing
npm install ha-store-browser
Usage
Store
const store = require('ha-store');
const browserStore = require('ha-store-browser/localstorage')(); // Or 'ha-store-browser/indexeddb'
const itemStore = store({
resolver: getItems,
store: browserStore('items'), // Provide a database name
});
Testing
npm test
Contribute
Please do! This is an open source project - if you see something that you want, open an issue or file a pull request.
If you have a major change, it would be better to open an issue first so that we can talk about it.
I am always looking for more maintainers, as well. Get involved.
License
Apache 2.0 (c) 2018 Frederic Charette