Socket
Socket
Sign inDemoInstall

file-exists

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 2.0.0

13

index.js

@@ -13,6 +13,13 @@ var fs = require('fs')

try {
return fs.statSync(fullpath).isFile()
} catch (e) {
return false
return fs.statSync(fullpath).isFile();
}
catch (e) {
// Check exception. If ENOENT - no such file or directory ok, file doesn't exist.
// Otherwise something else went wrong, we don't have rights to access the file, ...
if (e.code != 'ENOENT')
throw e;
return false;
}
}
{
"name": "file-exists",
"version": "1.0.0",
"version": "2.0.0",
"description": "Check if filepath exists and is a file",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc