
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
gitignore-fs
Advanced tools
determine if any file is gitignored (complete implementation of gitignore rules)
If you're using a library to ignore gitignored files, it probably doesn't do it right! Use this library to be match git behavior 100%.
Determine if any file is gitignored. This is intended to be a complete implementation of the gitignore spec, including $GIT_DIR, $GIT_DIR/info/excludes, and the core.excludesFile configuration variable.
Requires Node >= 8.
npm install --save gitignore-fs
const Gitignore = require('gitignore-fs')
const gitignore = new Gitignore()
console.log(gitignore.ignoresSync('node_modules')) // true or false depending on your config
class GitignoreEach instance of this class keeps a separate cache of gitignore rules.
new Gitignore([options])Creates a new Gitignore instance.
options.initialRules (string[], optional)These rules will be applied at lowest precedence (lower than rules from core.excludesFile).
Paths with a slash in the beginning or middle are relative to the closest enclosing git directory.
options.finalRules (string[], optional)These rules will be applied at highest precedence (higher than .gitignore files).
Paths with a slash in the beginning or middle are relative to the closest enclosing git directory.
.ignores(path)Determines if the given path is gitignored asynchronously.
path (string, required)The path to test. Must end with / if it is a directory!
Promise<boolean>)A promise that will resolve to true if path is gitignored, false otherwise
.ignoresSync(path)Determines if the given path is gitignored synchronously.
path (string, required)The path to test. Must end with / if it is a directory!
boolean)true if path is gitignored, false otherwise
.clearCache()Clears the entire gitignore rule cache.
FAQs
determine if any file is gitignored (complete implementation of gitignore rules)
The npm package gitignore-fs receives a total of 357 weekly downloads. As such, gitignore-fs popularity was classified as not popular.
We found that gitignore-fs demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.