sessionstorage!Made by unshiftmade-by!Version npmversion!Build Statusbuild!Dependenciesdavid!Coverage Statuscover!IRC channelirc
sessionStorageAPI filled that gap, but unfortunately we cannot expect this API to be available and enabled in every browser context. This module provides various of fallbacks which follow the same API as
sessionStoragefor when it's not enabled. The following fallback's are supported:
window.name- Storing data in the
nameproperty of the window.
cookies- This doesn't really need an explanation.
InstallIt's build for browserify but it should work with Node.js as well as we provide a fallback API. The module is released in the public npm registry and can be installed using:
npm install --save sessionstorage
UsageThe API is exactly the same as the DOM storage API so you can use the following methods:
So all you need to do is require the module and you're ready to go:
'use strict'; var sessionstorage = require('sessionstorage');