Comparing version 3.2.6 to 3.2.7
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
235
20477