in packages/fb-babel-plugin-utils/RequireCheck.js [25:39]
function isRequireAlias(path) {
const grandParent = path.parentPath.parent;
const parent = path.parent;
const node = path.node;
return (
grandParent.type === 'Program' &&
parent.type === 'VariableDeclaration' &&
node.type === 'VariableDeclarator' &&
node.id.type === 'Identifier' &&
node.init &&
isRequireCall(node.init) &&
!node.init._isGeneratedInlinedRequire
);
}