Storage Poly |
A polyfill for localStorage and sessionStorage for those times when they're undefined.
Requirements
- Node 6+
Install
yarn add storagepoly
or npm install storagepoly -S
Usage
; // or require('storagepoly') // SettinglocalStorage; // Gettingconst myItem = localStorage; // RemovinglocalStorage; // ClearinglocalStorageclear;
API
localStorage
: Mirrors api ofwindow.localStorage
DOCSsessionStorage
: Mirrors api ofwindow.sessionStorage
DOCS
Questions?
Bugs?
License
This project is distributed under the MIT license.