Aucune description

index.js 441B

1234567891011121314151617181920
  1. /*!
  2. * is-extglob <https://github.com/jonschlinkert/is-extglob>
  3. *
  4. * Copyright (c) 2014-2016, Jon Schlinkert.
  5. * Licensed under the MIT License.
  6. */
  7. module.exports = function isExtglob(str) {
  8. if (typeof str !== 'string' || str === '') {
  9. return false;
  10. }
  11. var match;
  12. while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
  13. if (match[2]) return true;
  14. str = str.slice(match.index + match[0].length);
  15. }
  16. return false;
  17. };