1 | "use strict";
|
2 |
|
3 | require("core-js/modules/es.function.name");
|
4 |
|
5 | Object.defineProperty(exports, "__esModule", {
|
6 | value: true
|
7 | });
|
8 | exports.getType = getType;
|
9 | exports.getDisplayName = getDisplayName;
|
10 |
|
11 | var _reactIs = require("react-is");
|
12 |
|
13 | function getType(typeOrMemo) {
|
14 | return (0, _reactIs.isMemo)(typeOrMemo) ? typeOrMemo.type : typeOrMemo;
|
15 | }
|
16 |
|
17 | function getDisplayName(typeOrMemo) {
|
18 | if (typeof typeOrMemo === 'string') {
|
19 | return typeOrMemo;
|
20 | }
|
21 |
|
22 | var type = getType(typeOrMemo);
|
23 | return type.displayName || type.name || 'Unknown';
|
24 | } |
\ | No newline at end of file |