| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 12 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { is } from 'ramda' |
||
| 2 | |||
| 3 | /** |
||
| 4 | * Get the display name for the given component. |
||
| 5 | * @function |
||
| 6 | * @param {React.Component} comp - The react component |
||
| 7 | * @return The display name for the component |
||
| 8 | */ |
||
| 9 | const getDisplayName = comp => |
||
| 10 | (is(String, comp) && comp) || comp.displayName || comp.name || 'Component' |
||
| 11 | |||
| 12 | export default getDisplayName |
||
| 13 |