Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
file-exists-dazinatorfork
Advanced tools
Check if filepath exists and is a file. Note this is a fork of file-exists dpenedency with some ammendments.
Check if filepath exists and is a file. Returns false for directories.
(Requires node >=6.0.0)
npm install file-exists --save
const fileExists = require('file-exists');
fileExists('/index.html', (err, exists) => console.log(exists)) // OUTPUTS: true or false
fileExists('/index.html').then(exists => {
console.log(exists) // OUTPUTS: true or false
})
const exists = await fileExists('/index.html')
console.log(fileExists.sync('/index.html')) // OUTPUTS: true or false
filepath
- the path to the file to check if it existsoptions
- an object of options
root
- the root directory to look in (or cwd)callback(err, exists)
- gets called when checking is donefilepath
- the path to the file to check if it existsoptions
- an object of options
root
- the root directory to look in (or cwd)npm install
npm test
FAQs
Check if filepath exists and is a file. Note this is a fork of file-exists dpenedency with some ammendments.
We found that file-exists-dazinatorfork 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.