UNPKG

@pmwcs/base

Version:
16 lines (12 loc) 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getDisplayName = void 0; var getDisplayName = function getDisplayName(childInput) { var _child$type, _child$constructor, _child$constructor2; var child = Array.isArray(childInput) ? childInput[0] : childInput; var displayName = (child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) || (child === null || child === void 0 ? void 0 : (_child$constructor = child.constructor) === null || _child$constructor === void 0 ? void 0 : _child$constructor.displayName) || (child === null || child === void 0 ? void 0 : child.displayName) || (child === null || child === void 0 ? void 0 : child.name) || (child === null || child === void 0 ? void 0 : (_child$constructor2 = child.constructor) === null || _child$constructor2 === void 0 ? void 0 : _child$constructor2.name) || 'Unknown'; return displayName; }; exports.getDisplayName = getDisplayName;