New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

lib/node.js

8

package.json
{
"name": "storage2",
"version": "0.0.1",
"version": "0.0.2",
"description": "html5 storage interface for node and browser",
"main": "index.js",
"main": "./lib/node.js",
"scripts": {

@@ -10,3 +10,3 @@ "test": "./node_modules/tape/bin/tape test.js"

"browser": {
"index.js": "client.js"
"./lib/node.js": "./lib/client.js"
},

@@ -16,2 +16,3 @@ "author": "Wang Zuo",

"devDependencies": {
"istanbul": "^0.3.17",
"tape": "^4.0.0"

@@ -21,2 +22,3 @@ },

"localStorage",
"polyfill",
"sessionStorage",

@@ -23,0 +25,0 @@ "storage"

# storage2
[![Build Status](https://travis-ci.org/pqx/require-storage.svg)](https://travis-ci.org/pqx/require-storage)
[![Build Status](https://travis-ci.org/pqx/storage2.svg)](https://travis-ci.org/pqx/storage2) [![codecov.io](http://codecov.io/github/pqx/storage2/coverage.svg?branch=master)](http://codecov.io/github/pqx/storage2?branch=master)

@@ -19,2 +19,5 @@ One single html5 storage interface for node and browser (`browserify`)

```
For safari private mode, `localStorage` and `sessionStorage` will still be available 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

@@ -21,0 +24,0 @@ [Web Storage API](https://developer.mozilla.org/en-US/docs/Web/API/Storage)

var test = require('tape');
var ls = require('./').localStorage;
var ss = require('./').sessionStorage;
var Storage = require('./lib/node');
var ls = Storage.localStorage;
var ss = Storage.sessionStorage;
test('localStorage', function(t) {
t.plan(6);
t.equal(ls.length, 0);

@@ -15,6 +15,6 @@ ls.setItem('test', '42');

t.equal(ls.length, 0);
t.end();
});
test('sessionStorage', function(t) {
t.plan(6);
t.equal(ss.length, 0);

@@ -28,2 +28,3 @@ ss.setItem('test', '42');

t.equal(ss.length, 0);
t.end();
});

Sorry, the diff of this file is not supported yet

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