
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
exists-file
Advanced tools
Check if a file exists. A fs.exists implementation that is not deprecated.
Check if a file exists. A fs.exists implementation that is not deprecated.
Because fs.exist and fs.existsSync are deprecated this an implementation using fs.stats and fs.statsSync for get the same result.
Also always keep in mind:
fs.exists() should not be used to check if a file exists before calling fs.open(). Doing so introduces a race condition since other processes may change the file's state between the two calls. Instead, user code should call fs.open() directly and handle the error raised if the file is non-existent.
npm install exists-file --save
var existsFile = require('exists-file')
// async with a callback
existsFile('./README.md', console.log) // => null, true
// async with a promise
existsFile('./README.md').then(console.log).catch(console.error) // => true
// sync
var exists = existsFile.sync('./README.md')
console.log(exists) // => true
Required
Type: string
The relative or absolute file path.
Type: function
If cb
is not provided then it returns a promise
.
Required
Type: string
The relative or absolute file path.
MIT © Kiko Beats
FAQs
Check if a file exists. A fs.exists implementation that is not deprecated.
The npm package exists-file receives a total of 2,618 weekly downloads. As such, exists-file popularity was classified as popular.
We found that exists-file demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.