Comparing version 3.1.5 to 3.2.0
@@ -107,2 +107,7 @@ 'use strict'; | ||
}, { | ||
key: 'ignores', | ||
value: function ignores(path) { | ||
return !this._filter(path); | ||
} | ||
}, { | ||
key: '_createRule', | ||
@@ -134,2 +139,5 @@ value: function _createRule(pattern) { | ||
} | ||
// @returns `Boolean` true if the `path` is NOT ignored | ||
}, { | ||
@@ -136,0 +144,0 @@ key: '_filter', |
{ | ||
"name": "ignore", | ||
"version": "3.1.5", | ||
"version": "3.2.0", | ||
"description": "Ignore is a manager and filter for .gitignore rules.", | ||
@@ -5,0 +5,0 @@ "main": "./ignore.js", |
@@ -26,3 +26,3 @@ [![Build Status](https://travis-ci.org/kaelzhang/node-ignore.svg?branch=master)](https://travis-ci.org/kaelzhang/node-ignore) | ||
const ignore = require('ignore') | ||
let ig = ignore().add(['.abc/*', '!.abc/d/']) | ||
const ig = ignore().add(['.abc/*', '!.abc/d/']) | ||
``` | ||
@@ -33,3 +33,3 @@ | ||
```js | ||
let paths = [ | ||
const paths = [ | ||
'.abc/a.js', // filtered out | ||
@@ -169,2 +169,12 @@ '.abc/d/e.js' // included | ||
### .ignores(pathname) | ||
> new in 3.2.0 | ||
Returns `Boolean` whether `pathname` should be ignored. | ||
```js | ||
ig.ignores('.abc/a.js') // true | ||
``` | ||
**** | ||
@@ -171,0 +181,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
19496
346
199