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

node-persist

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-persist - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

2

package.json
{
"name": "node-persist",
"version": "2.0.4",
"version": "2.0.5",
"description": "Super-easy (and fast) persistent data structures in Node.js, modeled after HTML5 localStorage",

@@ -5,0 +5,0 @@ "main": "./src/node-persist.js",

@@ -486,9 +486,10 @@ /*

result = {key: key, removed: !err, existed: exists};
if (err) {
if (err && err.code != 'ENOENT') { /* Only throw the error if the error is something else */
deferred.reject(err);
return callback(err);
}
err && this.log('Failed to remove file:' + file + ' because it doesn\'t exist anymore.');
deferred.resolve(result);
callback(null, result);
});
}.bind(this));
} else {

@@ -508,3 +509,10 @@ result = {key: key, removed: false, existed: exists};

if (fs.existsSync(file)) {
fs.unlinkSync(file);
try {
fs.unlinkSync(file);
} catch (err) {
if (err.code != 'ENOENT') { /* Only throw the error if the error is something else */
throw err;
}
this.log('Failed to remove file:' + file + ' because it doesn\'t exist anymore.');
}
return {key: key, removed: true, existed: true};

@@ -511,0 +519,0 @@ }

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