index.js 319 B

1234567891011121314
  1. /*!
  2. * is-glob <https://github.com/jonschlinkert/is-glob>
  3. *
  4. * Copyright (c) 2014-2015, Jon Schlinkert.
  5. * Licensed under the MIT License.
  6. */
  7. var isExtglob = require('is-extglob');
  8. module.exports = function isGlob(str) {
  9. return typeof str === 'string'
  10. && (/[*!?{}(|)[\]]/.test(str)
  11. || isExtglob(str));
  12. };