1 # is-glob [![NPM version](https://badge.fury.io/js/is-glob.svg)](http://badge.fury.io/js/is-glob) [![Build Status](https://travis-ci.org/jonschlinkert/is-glob.svg)](https://travis-ci.org/jonschlinkert/is-glob)
3 > Returns `true` if 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.
5 Also take a look at [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob).
9 Install with [npm](https://www.npmjs.com/)
12 $ npm i is-glob --save
18 var isGlob = require('is-glob');
23 Patterns that have glob characters or regex patterns will return `true`:
30 isGlob('abc/(aaa|bbb).js');
31 isGlob('abc/[a-z].js');
32 isGlob('abc/{a,b}.js');
40 isGlob('abc/@(a).js');
41 isGlob('abc/!(a).js');
42 isGlob('abc/+(a).js');
43 isGlob('abc/*(a).js');
44 isGlob('abc/?(a).js');
50 Patterns that do not have glob patterns return `false`:
54 isGlob('abc/def/ghi.js');
63 Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)):
73 * [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob)
74 * [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob)
75 * [is-posix-bracket](https://www.npmjs.com/package/is-posix-bracket): Returns true if the given string is a POSIX bracket expression (POSIX character class). | [homepage](https://github.com/jonschlinkert/is-posix-bracket)
76 * [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)
77 * [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)
81 Install dev dependencies:
84 $ npm i -d && npm test
89 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-glob/issues/new).
95 + [github/jonschlinkert](https://github.com/jonschlinkert)
96 + [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
100 Copyright © 2015 Jon Schlinkert
101 Released under the MIT license.
105 _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 02, 2015._