broccoli-viz
Advanced tools
Comparing version 3.0.2 to 3.0.3
{ | ||
"name": "broccoli-viz", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "", | ||
@@ -31,3 +31,3 @@ "main": "index.js", | ||
"lodash": "^4.14.0", | ||
"minimatch": "^3.0.2", | ||
"matcher-collection": "^1.0.2", | ||
"minimist": "^1.2.0", | ||
@@ -34,0 +34,0 @@ "sprintf-js": "^1.0.3" |
@@ -1,9 +0,7 @@ | ||
var match = require('minimatch'); | ||
var MatcherCollection = require('matcher-collection'); | ||
var timeMatcher = new MatcherCollection([ | ||
'time.*', | ||
'*.time.*', | ||
]); | ||
function anyMatch(key, patterns) { | ||
return patterns.some(function (pattern) { | ||
return match(key, pattern); | ||
}); | ||
} | ||
function collectStats(stats, patterns, prefix) { | ||
@@ -15,2 +13,4 @@ var result = []; | ||
var matcher = new MatcherCollection(patterns); | ||
for (var prop in stats) { | ||
@@ -23,4 +23,4 @@ key = prefix + prop; | ||
} else { | ||
if (anyMatch(key, patterns)) { | ||
isTime = (prop === 'time') || match(key, 'time.*') || match(key, '*.time.*'); | ||
if (matcher.match(key)) { | ||
isTime = (prop === 'time') || timeMatcher.match(key); | ||
@@ -27,0 +27,0 @@ result.push({ |
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
41481
+ Addedmatcher-collection@^1.0.2
+ Addedmatcher-collection@1.1.2(transitive)
- Removedminimatch@^3.0.2