MCPcopy Create free account
hub / github.com/FormidableLabs/babel-plugin-transform-define / isImportIdentifier

Function isImportIdentifier

lib/index.js:71–75  ·  view source on GitHub ↗
(identifierNodePath)

Source from the content-addressed store, hash-verified

69 * @return {boolean} Indicates if the provided node is an import specifier or references one
70 */
71const isImportIdentifier = (identifierNodePath) => {
72 const containerType = get(identifierNodePath, ["container", "type"]);
73
74 return containerType === "ImportDefaultSpecifier" || containerType === "ImportSpecifier";
75};
76
77const memberExpressionComparator = (nodePath, value) => nodePath.matchesPattern(value);
78const identifierComparator = (nodePath, value) => nodePath.node.name === value;

Callers 1

IdentifierFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…