src/special/gulp-load-plugins.js
function getPackageName(content, pluginLookup, identifierPath) {
  let memberPath = identifierPath.parentPath;
  while (memberPath.isMemberExpression()) {
    const code = content.slice(identifierPath.node.end, memberPath.node.end);
    const pluginName = pluginLookup[code];
    if (pluginName) {
      return pluginName;
    }

    memberPath = memberPath.parentPath;
  }

  return '';
}
function getPackageName(content, pluginLookup, identifierPath) {
  let memberPath = identifierPath.parentPath;
  while (memberPath.isMemberExpression()) {
    const code = content.slice(identifierPath.node.end, memberPath.node.end);
    const pluginName = pluginLookup[code];
    if (pluginName) {
      return pluginName;
    }

    memberPath = memberPath.parentPath;
  }

  return '';
}
function getPackageName ( content , pluginLookup , identifierPath ) { let memberPath = identifierPath . parentPath ; while ( memberPath . isMemberExpression ( ) ) { const code = content . slice ( identifierPath . node . end , memberPath . node . end ) ; const pluginName = pluginLookup [ code ] ; if ( pluginName ) { return pluginName ; } memberPath = memberPath . parentPath ; } return '' ; }
Get the package name from the identifier call path.
@example With code `$.jshint()` and `$` as path, returns `gulp-jshint` string.
Get the package name from the identifier call path .