Socket
Socket
Sign inDemoInstall

ignore

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ignore - npm Package Compare versions

Comparing version 3.2.6 to 3.2.7

2

package.json
{
"name": "ignore",
"version": "3.2.6",
"version": "3.2.7",
"description": "Ignore is a manager and filter for .gitignore rules.",

@@ -5,0 +5,0 @@ "main": "./ignore.js",

@@ -90,13 +90,13 @@ <table><thead>

1. `ignore` is a standalone module, and is much simpler so that it could easy work with other programs, unlike [isaacs](https://npmjs.org/~isaacs)'s [fstream-ignore](https://npmjs.org/package/fstream-ignore) which must work with the modules of the fstream family.
- `ignore` is a standalone module, and is much simpler so that it could easy work with other programs, unlike [isaacs](https://npmjs.org/~isaacs)'s [fstream-ignore](https://npmjs.org/package/fstream-ignore) which must work with the modules of the fstream family.
2. `ignore` only contains utility methods to filter paths according to the specified ignore rules, so
- `ignore` only contains utility methods to filter paths according to the specified ignore rules, so
- `ignore` never try to find out ignore rules by traversing directories or fetching from git configurations.
- `ignore` don't cares about sub-modules of git projects.
3. Exactly according to [gitignore man page](http://git-scm.com/docs/gitignore), fixes some known matching issues of fstream-ignore, such as:
- Exactly according to [gitignore man page](http://git-scm.com/docs/gitignore), fixes some known matching issues of fstream-ignore, such as:
- '`/*.js`' should only match '`a.js`', but not '`abc/a.js`'.
- '`**/foo`' should match '`foo`' anywhere.
- prevent re-including a file if a parent directory of that file is excluded.
- handle trailing whitespaces:
- Prevent re-including a file if a parent directory of that file is excluded.
- Handle trailing whitespaces:
- `'a '`(one space) should not match `'a '`(two spaces).

@@ -120,4 +120,4 @@ - `'a \ '` matches `'a '`

```js
ignore().add('#abc').filter(['#abc']) // ['#abc']
ignore().add('\#abc').filter(['#abc']) // []
ignore().add('#abc').ignores('#abc') // false
ignore().add('\#abc').ignores('#abc') // true
```

@@ -128,3 +128,5 @@

```js
ignore().add(fs.readFileSync(filenameOfGitignore).toString()).filter(filenames)
ignore()
.add(fs.readFileSync(filenameOfGitignore).toString())
.filter(filenames)
```

@@ -131,0 +133,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc