micromatch 3.1.8 → 3.1.9
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.
Potentially problematic release.
This version of micromatch might be problematic. Click here for more details.
- package/index.js +5 -7
- package/package.json +1 -1
package/index.js
CHANGED
@@ -616,16 +616,14 @@ micromatch.makeRe = function(pattern, options) {
|
|
616
616
|
*/
|
617
617
|
|
618
618
|
micromatch.braces = function(pattern, options) {
|
619
|
-
if (typeof pattern !== 'string') {
|
620
|
-
throw new TypeError('expected
|
619
|
+
if (typeof pattern !== 'string' && !Array.isArray(pattern)) {
|
620
|
+
throw new TypeError('expected pattern to be an array or string');
|
621
621
|
}
|
622
622
|
|
623
623
|
function expand() {
|
624
|
-
if (options && options.nobrace === true
|
625
|
-
|
626
|
-
|
627
|
-
// options = utils.extend({}, options, {expand: true});
|
628
|
-
// }
|
624
|
+
if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) {
|
625
|
+
return utils.arrayify(pattern);
|
626
|
+
}
|
629
627
|
return braces(pattern, options);
|
630
628
|
}
|
631
629
|
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "micromatch",
|
3
3
|
"description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.",
|
4
|
-
"version": "3.1.
|
4
|
+
"version": "3.1.9",
|
5
5
|
"homepage": "https://github.com/micromatch/micromatch",
|
6
6
|
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
7
7
|
"contributors": [
|