@hsds/utils-react
Advanced tools
Comparing version 7.9.2-alpha.6 to 8.0.0
@@ -5,2 +5,4 @@ # Changelog | ||
## [8.0.0](https://github.com/helpscout/hsds/compare/utils-react-7.1.3...utils-react-8.0.0) (2023-09-05) | ||
### [7.9.2-alpha.6](https://github.com/helpscout/hsds/compare/utils-react-7.9.2-alpha.5...utils-react-7.9.2-alpha.6) (2023-08-21) | ||
@@ -12,2 +14,8 @@ | ||
### [7.9.2-alpha.6](https://github.com/helpscout/hsds/compare/utils-react-7.9.2-alpha.5...utils-react-7.9.2-alpha.6) (2023-08-21) | ||
### [7.9.2-alpha.5](https://github.com/helpscout/hsds/compare/utils-react-7.1.2...utils-react-7.9.2-alpha.5) (2023-08-10) | ||
### [7.9.2-alpha.4](https://github.com/helpscout/hsds/compare/utils-react-7.9.2-alpha.3...utils-react-7.9.2-alpha.4) (2023-07-17) | ||
### [7.1.2](https://github.com/helpscout/hsds/compare/utils-react-7.1.1...utils-react-7.1.2) (2023-08-07) | ||
@@ -14,0 +22,0 @@ |
{ | ||
"name": "@hsds/utils-react", | ||
"version": "7.9.2-alpha.6", | ||
"version": "8.0.0", | ||
"peerDependencies": { | ||
@@ -11,5 +11,5 @@ "react": "~16.14.0 || ~17.0.2" | ||
"dependencies": { | ||
"lodash.get": "4.4.2", | ||
"lodash.isplainobject": "4.0.6" | ||
"lodash.get": "^4.4.2", | ||
"lodash.isplainobject": "^4.0.6" | ||
} | ||
} |
@@ -52,3 +52,6 @@ "use strict"; | ||
if (!isReactComponent(Component)) return ''; | ||
return (0, _lodash.default)(Component, 'displayName') || (0, _lodash.default)(Component, 'name') || 'Component'; | ||
return (0, _lodash.default)(Component, 'displayName') || (0, _lodash.default)(Component, 'name') || | ||
// need to also check the type.displayName and type.name | ||
// when checking component children | ||
(0, _lodash.default)(Component, 'type.displayName') || (0, _lodash.default)(Component, 'type.name') || 'Component'; | ||
} | ||
@@ -55,0 +58,0 @@ /** |
@@ -29,3 +29,1 @@ # react | ||
Run `nx test react` to execute the unit tests via [Jest](https://jestjs.io). | ||
> Up to date with hsds-react `v3.54.11` |
@@ -47,3 +47,11 @@ /* eslint-disable no-misleading-character-class */ | ||
if (!isReactComponent(Component)) return '' | ||
return get(Component, 'displayName') || get(Component, 'name') || 'Component' | ||
return ( | ||
get(Component, 'displayName') || | ||
get(Component, 'name') || | ||
// need to also check the type.displayName and type.name | ||
// when checking component children | ||
get(Component, 'type.displayName') || | ||
get(Component, 'type.name') || | ||
'Component' | ||
) | ||
} | ||
@@ -50,0 +58,0 @@ /** |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
30235
461
1
29
Updatedlodash.get@^4.4.2
Updatedlodash.isplainobject@^4.0.6