index.js
function isWhitelisted(moduleId)
{
  var i;

  // check if its empty
  if (!this.whiteList.length)
  {
    return true;
  }

  // strip basePath
  moduleId = moduleId.replace(this.basePathRegexp, '');

  for (i = 0; i < this.whiteList.length; i++)
  {
    if (minimatch(moduleId, this.whiteList[i]))
    {
      return true;
    }
  }

  return false;
}
function isWhitelisted(moduleId)
{
  var i;

  // check if its empty
  if (!this.whiteList.length)
  {
    return true;
  }

  // strip basePath
  moduleId = moduleId.replace(this.basePathRegexp, '');

  for (i = 0; i < this.whiteList.length; i++)
  {
    if (minimatch(moduleId, this.whiteList[i]))
    {
      return true;
    }
  }

  return false;
}
function isWhitelisted ( moduleId ) { var i ; // check if its empty if ( ! this . whiteList . length ) { return true ; } // strip basePath moduleId = moduleId . replace ( this . basePathRegexp , '' ) ; for ( i = 0 ; i < this . whiteList . length ; i ++ ) { if ( minimatch ( moduleId , this . whiteList [ i ] ) ) { return true ; } } return false ; }
checks whiteList, using glob-like patterns if white list is empty treat it as everything in white list
checks whiteList using glob - like patterns if white list is empty treat it as everything in white list