Comparing version 0.1.0 to 0.1.1
20
index.js
@@ -12,8 +12,16 @@ /*! | ||
module.exports = function hasGlob(arr) { | ||
if (arr == null) return false; | ||
if (!Array.isArray(arr)) arr = [arr]; | ||
var len = arr.length; | ||
while (len--) if (isGlob(arr[len])) return true; | ||
return false; | ||
module.exports = function hasGlob(val) { | ||
if (val == null) return false; | ||
if (typeof val === 'string') { | ||
return isGlob(val); | ||
} | ||
if (Array.isArray(val)) { | ||
var len = val.length; | ||
while (len--) { | ||
if (isGlob(val[len])) { | ||
return true; | ||
} | ||
} | ||
} | ||
return false; | ||
}; |
{ | ||
"name": "has-glob", | ||
"description": "Returns `true` if an array has a glob pattern.", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/jonschlinkert/has-glob", | ||
@@ -23,3 +23,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"dependencies": { | ||
"is-glob": "^2.0.0" | ||
"is-glob": "^2.0.1" | ||
}, | ||
@@ -26,0 +26,0 @@ "devDependencies": { |
@@ -91,3 +91,3 @@ # has-glob [![NPM version](https://badge.fury.io/js/has-glob.svg)](http://badge.fury.io/js/has-glob) | ||
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern. | [homepage](https://github.com/jonschlinkert/is-glob) | ||
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) | ||
* [is-valid-glob](https://www.npmjs.com/package/is-valid-glob): Return true if a value is a valid glob pattern or patterns. | [homepage](https://github.com/jonschlinkert/is-valid-glob) | ||
@@ -122,2 +122,2 @@ * [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 04, 2015._ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 18, 2015._ |
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
5824
23
121
Updatedis-glob@^2.0.1