micromatch
Advanced tools
Comparing version 3.1.8 to 3.1.9
12
index.js
@@ -619,12 +619,10 @@ 'use strict'; | ||
micromatch.braces = function(pattern, options) { | ||
if (typeof pattern !== 'string') { | ||
throw new TypeError('expected a string'); | ||
if (typeof pattern !== 'string' && !Array.isArray(pattern)) { | ||
throw new TypeError('expected pattern to be an array or string'); | ||
} | ||
function expand() { | ||
if (options && options.nobrace === true) return [pattern]; | ||
if (!/\{.*\}/.test(pattern)) return [pattern]; | ||
// if (/[!@*?+]\{/.test(pattern)) { | ||
// options = utils.extend({}, options, {expand: true}); | ||
// } | ||
if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) { | ||
return utils.arrayify(pattern); | ||
} | ||
return braces(pattern, options); | ||
@@ -631,0 +629,0 @@ } |
{ | ||
"name": "micromatch", | ||
"description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.", | ||
"version": "3.1.8", | ||
"version": "3.1.9", | ||
"homepage": "https://github.com/micromatch/micromatch", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
84810
1160