parse-glob
Advanced tools
Comparing version 2.0.0 to 2.0.1
20
index.js
@@ -43,9 +43,7 @@ /*! | ||
// is the pattern actually a glob? | ||
tok.is.glob = isGlob(glob); | ||
// Boolean values | ||
tok.is.glob = isGlob(glob); | ||
tok.is.negated = glob.charAt(0) === '!'; | ||
tok.is.globstar = glob.indexOf('**') !== -1; | ||
// is it a negation pattern? | ||
tok.is.negated = glob.charAt(0) === '!'; | ||
// does the pattern contain braces? | ||
var braces = glob.indexOf('{') !== -1; | ||
@@ -57,5 +55,2 @@ if (tok.is.glob && braces) { | ||
// does the pattern contain a globstar (`**`)? | ||
tok.is.globstar = glob.indexOf('**') !== -1; | ||
// if there is no `/` and no `**`, this means our | ||
@@ -70,3 +65,3 @@ // pattern can only match file names | ||
if (basename) { | ||
path.basename = basename[0] ? unescape(basename[0]) : ''; | ||
path.basename = basename[0] || ''; | ||
path.extname = glob.substr(path.basename.length); | ||
@@ -77,3 +72,7 @@ } else { | ||
} | ||
path.ext = path.extname.split('.').slice(-1)[0]; | ||
if (braces) { | ||
path.basename = unescape(path.basename); | ||
} | ||
@@ -123,3 +122,2 @@ // we either have a `/` or `**` | ||
} | ||
return tok; | ||
@@ -126,0 +124,0 @@ } |
{ | ||
"name": "parse-glob", | ||
"description": "Parse a glob pattern into an object of tokens.", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"homepage": "https://github.com/jonschlinkert/parse-glob", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -40,3 +40,3 @@ # parse-glob [![NPM version](https://badge.fury.io/js/parse-glob.svg)](http://badge.fury.io/js/parse-glob) | ||
ext: 'js' }, | ||
is: { glob: true, negated: false, globstar: false, | ||
is: { glob: true, braces: true, negated: false, globstar: false, | ||
dotfile: false, dotdir: false }, | ||
@@ -43,0 +43,0 @@ original: 'a/b/{c,d}/*.js', |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
11213