You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 line
1006 B

  1. {"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getFunctionName = getFunctionName;\nexports.default = void 0; // Fork of recompose/getDisplayName with added IE 11 support\n// Simplified polyfill for IE 11 support\n// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3\n\nvar fnNameMatchRegex = /^\\s*function(?:\\s|\\s*\\/\\*.*\\*\\/\\s*)+([^(\\s/]*)\\s*/;\n\nfunction getFunctionName(fn) {\n var match = \"\".concat(fn).match(fnNameMatchRegex);\n var name = match && match[1];\n return name || '';\n}\n\nfunction getDisplayName(Component) {\n if (typeof Component === 'string') {\n return Component;\n }\n\n if (!Component) {\n return undefined;\n }\n\n return Component.displayName || Component.name || getFunctionName(Component) || 'Component';\n}\n\nvar _default = getDisplayName;\nexports.default = _default;","map":null,"metadata":{},"sourceType":"script"}