Skip to content

Commit a786b3f

Browse files
authored
test: detectExportDeclaration
1 parent 177c9a6 commit a786b3f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default function detectExportDeclaration(node) {
2+
return (node.type === 'ExportNamedDeclaration' ||
3+
node.type === 'ExportAllDeclaration') &&
4+
node.source &&
5+
node.source.value
6+
? [node.source.value]
7+
: [];
8+
}

0 commit comments

Comments
 (0)