Skip to content

jacobbuck/fake-storage

Repository files navigation

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

About

👻 Memory-based storage to shim Web Storage.

Resources

License

Stars

Watchers

Forks

Packages

No packages published