2 * is-glob <https://github.com/jonschlinkert/is-glob>
4 * Copyright (c) 2014-2016, Jon Schlinkert.
5 * Licensed under the MIT License.
8 var isExtglob = require('is-extglob');
10 module.exports = function isGlob(str) {
11 if (typeof str !== 'string' || str === '') {
15 if (isExtglob(str)) return true;
17 var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/;
20 while ((match = regex.exec(str))) {
21 if (match[2]) return true;
22 str = str.slice(match.index + match[0].length);