55a256136346cee0739f99e3f3801221bdd4435e24a76d308ee14311196d8a6aa14807b9112c93188815f17b0ccd92f6c35ea5137001c22db2d7b3fbf43575 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # is-extglob [![NPM version](https://badge.fury.io/js/is-extglob.svg)](http://badge.fury.io/js/is-extglob) [![Build Status](https://travis-ci.org/jonschlinkert/is-extglob.svg)](https://travis-ci.org/jonschlinkert/is-extglob)
  2. > Returns true if a string has an extglob.
  3. ## Install with [npm](npmjs.org)
  4. ```bash
  5. npm i is-extglob --save
  6. ```
  7. ## Usage
  8. ```js
  9. var isExtglob = require('is-extglob');
  10. ```
  11. **True**
  12. ```js
  13. isExtglob('?(abc)');
  14. isExtglob('@(abc)');
  15. isExtglob('!(abc)');
  16. isExtglob('*(abc)');
  17. isExtglob('+(abc)');
  18. ```
  19. **False**
  20. Everything else...
  21. ```js
  22. isExtglob('foo.js');
  23. isExtglob('!foo.js');
  24. isExtglob('*.js');
  25. isExtglob('**/abc.js');
  26. isExtglob('abc/*.js');
  27. isExtglob('abc/(aaa|bbb).js');
  28. isExtglob('abc/[a-z].js');
  29. isExtglob('abc/{a,b}.js');
  30. isExtglob('abc/?.js');
  31. isExtglob('abc.js');
  32. isExtglob('abc/def/ghi.js');
  33. ```
  34. ## Related
  35. * [extglob](https://github.com/jonschlinkert/extglob): Extended globs. extglobs add the expressive power of regular expressions to glob patterns.
  36. * [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks.
  37. * [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens.
  38. ## Run tests
  39. Install dev dependencies.
  40. ```bash
  41. npm i -d && npm test
  42. ```
  43. ## Contributing
  44. Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extglob/issues)
  45. ## Author
  46. **Jon Schlinkert**
  47. + [github/jonschlinkert](https://github.com/jonschlinkert)
  48. + [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
  49. ## License
  50. Copyright (c) 2015 Jon Schlinkert
  51. Released under the MIT license
  52. ***
  53. _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 06, 2015._