
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
ignore-file
Advanced tools
Compile an ignore file (similar to .gitignore) to a Javascript function that returns true
or false
given a filename
npm install ignore-file
Assuming you have a .gitignore
file in your current working directory that contains node_modules
do
var ignore = require('ignore-file')
ignore('.gitignore', function(err, filter) {
if (err) throw err
console.log(filter('index.js')) // returns false
console.log(filter('node_modules')) // returns true
})
You can also use ignore.sync(filename)
to synchroniously compile an ignore file
If the file doesn't exist null
is returned. This allows you easily implement fallbacks
var filter = ignore.sync('.npmignore') || ignore.sync('.gitignore') || ignore.compile('node_modules')
The above will use .npmignore
if it exists, else .gitignore
and finally just ignore all node_modules
folders
MIT
FAQs
Compile an ignore file (similar to .gitignore) to a Javascript function
We found that ignore-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
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.