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

node-localstorage

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-localstorage - npm Package Compare versions

Comparing version 0.6.0 to 1.0.0

22

LocalStorage.js
// Generated by CoffeeScript 1.9.0
(function() {
var JSONStorage, LocalStorage, QUOTA_EXCEEDED_ERR, StorageEvent, events, fs, path, _emptyDirectory, _rm,
var JSONStorage, KEY_FOR_EMPTY_STRING, LocalStorage, QUOTA_EXCEEDED_ERR, StorageEvent, events, fs, path, _emptyDirectory, _escapeKey, _rm,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },

@@ -13,2 +13,4 @@ __hasProp = {}.hasOwnProperty;

KEY_FOR_EMPTY_STRING = '---.EMPTY_STRING.---';
_emptyDirectory = function(target) {

@@ -34,2 +36,12 @@ var p, _i, _len, _ref, _results;

_escapeKey = function(key) {
var newKey;
if (key === '') {
newKey = KEY_FOR_EMPTY_STRING;
} else {
newKey = key.toString();
}
return newKey;
};
QUOTA_EXCEEDED_ERR = (function(_super) {

@@ -142,3 +154,3 @@ __extends(QUOTA_EXCEEDED_ERR, _super);

}
key = key.toString();
key = _escapeKey(key);
encodedKey = encodeURIComponent(key);

@@ -174,3 +186,3 @@ filename = path.join(this.location, encodedKey);

var filename, metaKey;
key = key.toString();
key = _escapeKey(key);
metaKey = this.metaKeyMap[key];

@@ -187,3 +199,3 @@ if (!!metaKey) {

var filename;
key = key.toString();
key = _escapeKey(key);
filename = path.join(this.location, encodeURIComponent(key));

@@ -199,3 +211,3 @@ try {

var evnt, filename, hasListeners, k, meta, metaKey, oldValue, v, _ref;
key = key.toString();
key = _escapeKey(key);
metaKey = this.metaKeyMap[key];

@@ -202,0 +214,0 @@ if (!!metaKey) {

{
"name": "node-localstorage",
"version": "0.6.0",
"version": "1.0.0",
"main": "./LocalStorage",

@@ -26,2 +26,3 @@ "description": "A drop-in substitute for the browser native localStorage API that runs on node.js.",

"coffee-script": "^1.9.0",
"lodash": "^3.10.1",
"nodeunit": "~0.9.0"

@@ -28,0 +29,0 @@ },

@@ -69,2 +69,3 @@ [![build status](https://secure.travis-ci.org/lmaccherone/node-localstorage.png)](http://travis-ci.org/lmaccherone/node-localstorage)

* 1.0.0 - 2016-01-03 - Fixed bug with empty string key (thanks, tinybike)
* 0.6.0 - 2015-09-11 - Removed references to deprecated fs.existsSync() (thanks, josephbosire)

@@ -71,0 +72,0 @@ * 0.5.2 - 2015-08-01 - Fixed defect where keys were not being updated correctly by removeItem() (thanks, ed69140)

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