minimatch 3.0.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/minimatch.js +720 -764
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A minimal matching utility.
|
|
4
4
|
|
|
5
|
-
[](http://travis-ci.org/isaacs/minimatch)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
This is the matching library used internally by npm.
|
|
@@ -171,6 +171,21 @@ Suppress the behavior of treating a leading `!` character as negation.
|
|
|
171
171
|
Returns from negate expressions the same as if they were not negated.
|
|
172
172
|
(Ie, true on a hit, false on a miss.)
|
|
173
173
|
|
|
174
|
+
### partial
|
|
175
|
+
|
|
176
|
+
Compare a partial path to a pattern. As long as the parts of the path that
|
|
177
|
+
are present are not contradicted by the pattern, it will be treated as a
|
|
178
|
+
match. This is useful in applications where you're walking through a
|
|
179
|
+
folder structure, and don't yet have the full path, but want to ensure that
|
|
180
|
+
you do not walk down paths that can never be a match.
|
|
181
|
+
|
|
182
|
+
For example,
|
|
183
|
+
|
|
184
|
+
```js
|
|
185
|
+
minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d
|
|
186
|
+
minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
|
|
187
|
+
minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
|
|
188
|
+
```
|
|
174
189
|
|
|
175
190
|
## Comparisons to other fnmatch/glob implementations
|
|
176
191
|
|