fake-storage
v2.1.0
Published
Memory-based storage to shim Web Storage.
Downloads
3,773
Readme
fake-storage
Memory-based storage to shim Web Storage.
Usage
Create a new instance:
const myStorage = new FakeStorage();
Then you can use your myStorage
object much like the Storage interface:
myStorage.getItem('foo');
myStorage.setItem('foo', 'bar');
myStorage.removeItem('foo');
myStorage.key(2);
myStorage.clear();
myStorage.length;
License
MIT - see LICENSE