🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

fake-storage

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fake-storage

Memory-based storage to shim Web Storage.

2.1.0
latest
Source
npm
Version published
Weekly downloads
1.1K
-43.72%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

storage

FAQs

Package last updated on 14 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts