mockstorage
A node module (with full Typescript support) to emulate localStorage
and/or sessionStorage outside the browser.
(A major use case being unit tests)
Installation
npm install mockstorage
or
yarn add mockstorage
Usage
In Javascript
var MockStorage = MockStorage var myStore = myStoreconsole // > 'some value'
In Typescript
myStore.setItem'myKey', 'some value'console.logmyStore.getItem'myKey' // > 'some value'
LICENSE
This project is licensed under the MIT license (a copy of which is part of the project)
Copyright (c) 2017, Arnav Gupta