Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

storage2

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storage2

html5 storage interface for node and browser

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.9K
decreased by-10.31%
Maintainers
1
Weekly downloads
 
Created
Source

storage2

Build Status codecov.io

HTML5 storage interface for node and browser

  • node: simple memory storage
  • browser with storage api available: return global storage object directly (window.localStorage and window.sessionStorage)
  • browser without storage api: cookie fallback

Installation

npm install storage2 --save

Usage

var ls = require("storage2").localStorage;
var ss = require("storage2").sessionStorage;

For safari private mode, localStorage and sessionStorage will still be available globally but storage usage will cause an exception. localStorage = require('storage2').localStorage is not recommended and a different variable name like ls should always be used.

API

Web Storage API

License

ISC

Keywords

FAQs

Package last updated on 23 Jun 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc