lib/utils.js
function createPkgConfigPathObj(path) {
  var lastWildcard = path.lastIndexOf('*');
  var length = Math.max(lastWildcard + 1, path.lastIndexOf('/'));
  return {
    length: length,
    regEx: new RegExp('^(' + path.substr(0, length).replace(/[.+?^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '[^\\/]+') + ')(\\/|$)'),
    wildcard: lastWildcard != -1
  };
}
function createPkgConfigPathObj(path) {
  var lastWildcard = path.lastIndexOf('*');
  var length = Math.max(lastWildcard + 1, path.lastIndexOf('/'));
  return {
    length: length,
    regEx: new RegExp('^(' + path.substr(0, length).replace(/[.+?^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '[^\\/]+') + ')(\\/|$)'),
    wildcard: lastWildcard != -1
  };
}
function createPkgConfigPathObj ( path ) { var lastWildcard = path . lastIndexOf ( '*' ) ; var length = Math . max ( lastWildcard + 1 , path . lastIndexOf ( '/' ) ) ; return { length : length , regEx : new RegExp ( '^(' + path . substr ( 0 , length ) . replace ( / [.+?^${}()|[\]\\] / g , '\\$&' ) . replace ( / \* / g , '[^\\/]+' ) + ')(\\/|$)' ) , wildcard : lastWildcard != - 1 } ; }
data object for quick checks against package paths
data object for quick checks against package paths