node-localstorage
Advanced tools
Comparing version 0.6.0 to 1.0.0
// 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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
58106
252
0
104
3