Skip to content

fed135/ha-browser-adapter

Repository files navigation

Browser storage adapters for HA-store

Why not Browsers ?



ha-store-browser Node Build Status Dependencies Status


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

About

Browser IndexedDB adapter for HA-store

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages