MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getImportKey

Function getImportKey

packages/dev/codemods/src/use-subpaths/src/codemod.ts:14–19  ·  view source on GitHub ↗
(specifier: t.ImportSpecifier)

Source from the content-addressed store, hash-verified

12}
13
14function getImportKey(specifier: t.ImportSpecifier): string {
15 const importedName = getImportedName(specifier);
16 const localName = specifier.local?.name ?? importedName;
17 const importKind = specifier.importKind ?? 'value';
18 return `${importKind}:${importedName}:${localName}`;
19}
20
21function getImportDeclarationKey(node: t.ImportDeclaration): string {
22 return (node.importKind ?? 'value') + ':' + node.source.value;

Callers 2

getNamedSpecifierKeysFunction · 0.85
transformerFunction · 0.85

Calls 1

getImportedNameFunction · 0.85

Tested by

no test coverage detected