We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21b6fe6 commit 35339baCopy full SHA for 35339ba
src/util/getNodeType.js
@@ -0,0 +1,15 @@
1
+'use strict';
2
+
3
+const getNodeType = node => {
4
+ const { name } = node;
5
6
+ if (name.type === 'JSXMemberExpression') {
7
+ const { object, property } = name;
8
+ return `${object.name}.${property.name}`;
9
+ }
10
11
+ return node.name.name;
12
+};
13
14
+export default getNodeType;
15
0 commit comments