How to use the glob.FNM_PATHNAME function in glob

To help you get started, we’ve selected a few glob examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jshint / fixmyjs / lib / jshint.js View on Github external
function isIgnored(p) {
    var fnmatch = glob.fnmatch(p, somePath, ~(glob.FNM_PATHNAME | glob.FNM_CASEFOLD)),
      lsmatch = isDirectory(p) && p.match(/^[^\/]*\/?$/) &&
        somePath.match(new RegExp("^" + p + ".*"));

    return !!(fnmatch || lsmatch);