node-persist
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "node-persist", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Super-easy (and fast) persistent data structures in Node.js, modeled after HTML5 localStorage", | ||
@@ -5,0 +5,0 @@ "main": "./src/node-persist.js", |
@@ -298,3 +298,3 @@ /* | ||
function() { | ||
var value = this.data[key].value; | ||
var value = this.data[key] && this.data[key].value; | ||
delete this.data[key]; | ||
@@ -314,3 +314,3 @@ this.log('removed: ' + key); | ||
removeItemSync: function (key) { | ||
var value = this.data[key].value; | ||
var value = this.data[key] && this.data[key].value; | ||
this.removePersistedKeySync(key); | ||
@@ -404,3 +404,3 @@ delete this.data[key]; | ||
var deferred = Q.defer(); | ||
var output = {key: key, value: this.data[key].value, file: file, ttl: this.data[key].ttl}; | ||
var output = {key: key, value: this.data[key] && this.data[key].value, file: file, ttl: this.data[key] && this.data[key].ttl}; | ||
@@ -428,3 +428,3 @@ fs.writeFile(file, this.stringify(output), options.encoding, function(err) { | ||
var output = {key: key, value: this.data[key].value, file: file, ttl: this.data[key].ttl}; | ||
var output = {key: key, value: this.data[key] && this.data[key].value, file: file, ttl: this.data[key] && this.data[key].ttl}; | ||
try { | ||
@@ -431,0 +431,0 @@ fs.writeFileSync(file, this.stringify(output)); |
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
44941