@roderickhsiao/react-i13n
Version:
[Experiment] React I13n provides a performant and scalable solution to application instrumentation.
19 lines (16 loc) • 534 B
JavaScript
/**
* Copyright 2015 - Present, Yahoo Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var getDisplayName = (Component, fallback) => {
var _ref, _ref2;
if (!Component) {
return fallback;
}
var {
displayName,
name
} = Component;
return (_ref = (_ref2 = displayName !== null && displayName !== void 0 ? displayName : name) !== null && _ref2 !== void 0 ? _ref2 : fallback) !== null && _ref !== void 0 ? _ref : Component;
};
export default getDisplayName;