fake-storage

2.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i fake-storage

Weekly Downloads

359

Version

2.1.0

License

MIT

Unpacked Size

10.8 kB

Total Files

8

Last publish

Collaborators

  • jacobbuck