https://github.com/fed135/ha-browser-adapter
Browser IndexedDB adapter for HA-store
https://github.com/fed135/ha-browser-adapter
Last synced: 6 months ago
JSON representation
Browser IndexedDB adapter for HA-store
- Host: GitHub
- URL: https://github.com/fed135/ha-browser-adapter
- Owner: fed135
- License: other
- Created: 2018-10-19T19:32:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-19T22:01:01.000Z (about 7 years ago)
- Last Synced: 2025-05-29T14:49:47.156Z (8 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Browser storage adapters for HA-store
Why not Browsers ?
[](https://www.npmjs.com/package/ha-store-browser)
[](https://nodejs.org)
[](https://travis-ci.org/fed135/ha-browser-adapter)
[](https://david-dm.org/fed135/ha-store-browser)
---
**HA-store-browser** is a plugin to replace the default in-memory storage in [ha-store](https://github.com/fed135/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**
```node
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](https://github.com/fed135/ha-browser-adapter/issues/new) 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](LICENSE) (c) 2018 Frederic Charette