Package Exports
- is-glob
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-glob) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
is-glob

Returns
trueif the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.
Also take a look at is-valid-glob and has-glob.
Install
Install with npm
$ npm i is-glob --saveUsage
var isGlob = require('is-glob');True
Patterns that have glob characters or regex patterns will return true:
isGlob('!foo.js');
isGlob('*.js');
isGlob('**/abc.js');
isGlob('abc/*.js');
isGlob('abc/(aaa|bbb).js');
isGlob('abc/[a-z].js');
isGlob('abc/{a,b}.js');
isGlob('abc/?.js');
//=> trueExtglobs
isGlob('abc/@(a).js');
isGlob('abc/!(a).js');
isGlob('abc/+(a).js');
isGlob('abc/*(a).js');
isGlob('abc/?(a).js');
//=> trueFalse
Patterns that do not have glob patterns return false:
isGlob('abc.js');
isGlob('abc/def/ghi.js');
isGlob('foo.js');
isGlob('abc/@.js');
isGlob('abc/+.js');
isGlob();
isGlob(null);
//=> falseArrays are also false (If you want to check if an array has a glob pattern, use has-glob):
isGlob(['**/*.js']);
isGlob(['foo.js']);
//=> falseRelated
- has-glob: Returns
trueif an array has a glob pattern. | homepage - is-extglob: Returns true if a string has an extglob. | homepage
- is-posix-bracket: Returns true if the given string is a POSIX bracket expression (POSIX character class). | homepage
- is-valid-glob: Return true if a value is a valid glob pattern or patterns. | homepage
- micromatch: Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… more | homepage
Run tests
Install dev dependencies:
$ npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on October 02, 2015.