hover-battery
LocalStorage / SessionStorage Memory for your Hover-Engine Store
By including this in your project, Hover-Engine can persist it's store across page reloads and navigation.
Install
npm install --save hover-battery
Usage
After building your engine with all the actions you plan on using, add the hover-battery action and listener. You can choose to pass in localStorage
, sessionStorage
, or some other object you want to write to.
const Hover = const battery = const engine = // addActions to your engineengineengine
You must call the addActions
with the battery after you have defined all your other actions.
Usage (Tram-One)
You may want to use this with the view framework Tram-One. If you do, it's pretty much exactly the same as above.
const Tram = const battery = const app = // addActions to your appappapp
Development
First, clone this repository, and install the dependencies.
git clone https://github.com/Tram-One/hover-batterycd hover-batterynpm install
You can run the tests (which use a combination of NightmareJS and Jasmine)
npm test
PRs Welcome!