Checks whether an
MemberExpression references a specific import from a specific package.
referencesImport, but works with ES2015, CommonJS and AMD syntax.
This package contains a single named export:
referencesImport(path: NodePath, packageName: string, importName: string): boolean;
pathis a path to the node that you want to test whether it references an import from a package.
packageNameis the name of the package.
importNameis the name of the import. It can take a special value,
*, to indicate that you want to test that the whole namespace is imported, for example when testing that
import * as foo from 'package';or
const foo = require('package');