lib/helpers.js
function urlMatch (asset, pattern) {
  var multi = pattern.split(',')
  var re

  if (multi.length > 1) {
    for (var i = 0, len = multi.length; i < len; i++) {
      re = new RegExp(multi[i].replace(/([.?+^$[\]\\(){}|/-])/g, '\\$1').replace(/\*/g, '.*'))
      if (re.test(asset)) {
        return true
      }
    }
    return false
  }

  re = new RegExp(pattern.replace(/([.?+^$[\]\\(){}|/-])/g, '\\$1').replace(/\*/g, '.*'))
  return re.test(asset)
}
function urlMatch (asset, pattern) {
  var multi = pattern.split(',')
  var re

  if (multi.length > 1) {
    for (var i = 0, len = multi.length; i < len; i++) {
      re = new RegExp(multi[i].replace(/([.?+^$[\]\\(){}|/-])/g, '\\$1').replace(/\*/g, '.*'))
      if (re.test(asset)) {
        return true
      }
    }
    return false
  }

  re = new RegExp(pattern.replace(/([.?+^$[\]\\(){}|/-])/g, '\\$1').replace(/\*/g, '.*'))
  return re.test(asset)
}
function urlMatch ( asset , pattern ) { var multi = pattern . split ( ',' ) var re if ( multi . length > 1 ) { for ( var i = 0 , len = multi . length ; i < len ; i ++ ) { re = new RegExp ( multi [ i ] . replace ( / ([.?+^$[\]\\(){}|/-]) / g , '\\$1' ) . replace ( / \* / g , '.*' ) ) if ( re . test ( asset ) ) { return true } } return false } re = new RegExp ( pattern . replace ( / ([.?+^$[\]\\(){}|/-]) / g , '\\$1' ) . replace ( / \* / g , '.*' ) ) return re . test ( asset ) }
Determines if url matches glob pattern
Determines if url matches glob pattern