minimatch 3.0.4 → 4.1.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 +22 -1
- package/minimatch.js +720 -764
- package/package.json +5 -5
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,27 @@ 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
|
+
```
|
|
189
|
+
|
|
190
|
+
### allowWindowsEscape
|
|
191
|
+
|
|
192
|
+
Windows path separator `\` is by default converted to `/`, which
|
|
193
|
+
prohibits the usage of `\` as a escape character. This flag skips that
|
|
194
|
+
behavior and allows using the escape character.
|
|
174
195
|
|
|
175
196
|
## Comparisons to other fnmatch/glob implementations
|
|
176
197
|
|