src/special/gulp-load-plugins.js
function getIdentifierVariableName(path) {
  if (
    path.isIdentifier()
    && path.parentPath.isCallExpression()
    && path.parentPath.parentPath.isVariableDeclarator()
  ) {
    const variableName = path.parentPath.parentPath.node.id.name;
    return variableName;
  }

  return '';
}
function getIdentifierVariableName(path) {
  if (
    path.isIdentifier()
    && path.parentPath.isCallExpression()
    && path.parentPath.parentPath.isVariableDeclarator()
  ) {
    const variableName = path.parentPath.parentPath.node.id.name;
    return variableName;
  }

  return '';
}
function getIdentifierVariableName ( path ) { if ( path . isIdentifier ( ) && path . parentPath . isCallExpression ( ) && path . parentPath . parentPath . isVariableDeclarator ( ) ) { const variableName = path . parentPath . parentPath . node . id . name ; return variableName ; } return '' ; }
Get the variable name from the variable assigned declaration.
@example With code `$ = loadPlugins()` and `loadPlugins` as path, returns the string `$`.
Get the variable name from the variable assigned declaration .