Socket
Socket
Sign inDemoInstall

memory-web-storage

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    memory-web-storage

Simple replacement for web storages (i.e. localStorage) with the same API


Version published
Weekly downloads
2.4K
decreased by-21.29%
Maintainers
1
Install size
4.70 kB
Created
Weekly downloads
 

Readme

Source

memory-web-storage

npm version npm

This is a library providing a singleton object with API similar to Web Storage:

  • getItem
  • setItem
  • removeItem
  • clear

default export

Mentioned singleton object.

createStorage(): MemoryStorage

Factory function creating memory storages.

testStorageSupport(type = 'local'): boolean

Meant to be used in browsers for testing storages support. It simply tries to perform most common operations on the storage object and wraps that with try/catch blocks.

Keywords

FAQs

Last updated on 10 Apr 2019

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