is-glob NPM version Build Status

Returns true if the given string looks like a glob pattern.

Install with npm

npm i is-glob --save

Usage

var isGlob = require('is-glob');

isGlob('foo.js');
//=> 'false'
isGlob('!foo.js');
//=> 'true'
isGlob('*.js');
//=> 'true'
isGlob('**/abc.js');
//=> 'true'
isGlob('abc/*.js');
//=> 'true'
isGlob('abc/(aaa|bbb).js');
//=> 'true'
isGlob('abc/[a-z].js');
//=> 'true'
isGlob('abc/{a,b}.js');
//=> 'true'
isGlob('abc/?.js');
//=> 'true'
isGlob('abc.js');
//=> 'false'
isGlob('abc/def/ghi.js');
//=> 'false'

Run tests

Install dev dependencies.

npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb-cli on March 04, 2015.