Socket
Socket
Sign inDemoInstall

fake-storage

Package Overview
Dependencies
2
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fake-storage

Memory-based storage to shim Web Storage.


Version published
Weekly downloads
310
decreased by-22.89%
Maintainers
1
Install size
279 kB
Created
Weekly downloads
 

Changelog

Source

2.1.0 - 2020-11-14

Added

  • Added source maps to build output.

Changed

  • Bumped up version of @babel/runtime to v7.12.5.
  • Enabled loose mode on '@babel/preset-env' to reduce build output.
  • Updated devDependencies.
  • Updated internal storage mechanism.

Readme

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

FAQs

Last updated on 14 Nov 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc