@chakra-ui/avatar
Advanced tools
Comparing version 0.0.0-dev-20230424225650 to 0.0.0-dev-20230428142007
@@ -61,6 +61,6 @@ "use strict"; | ||
function initials(name) { | ||
var _a, _b; | ||
var _a; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = (_b = names.at(-1)) != null ? _b : ""; | ||
const lastName = names.length > 1 ? names.at(-1) : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -67,0 +67,0 @@ } |
@@ -40,6 +40,6 @@ "use strict"; | ||
function initials(name) { | ||
var _a, _b; | ||
var _a; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = (_b = names.at(-1)) != null ? _b : ""; | ||
const lastName = names.length > 1 ? names.at(-1) : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -46,0 +46,0 @@ } |
@@ -47,6 +47,6 @@ "use strict"; | ||
function initials(name) { | ||
var _a, _b; | ||
var _a; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = (_b = names.at(-1)) != null ? _b : ""; | ||
const lastName = names.length > 1 ? names.at(-1) : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -53,0 +53,0 @@ } |
@@ -52,6 +52,6 @@ "use strict"; | ||
function initials(name) { | ||
var _a, _b; | ||
var _a; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = (_b = names.at(-1)) != null ? _b : ""; | ||
const lastName = names.length > 1 ? names.at(-1) : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -58,0 +58,0 @@ } |
{ | ||
"name": "@chakra-ui/avatar", | ||
"version": "0.0.0-dev-20230424225650", | ||
"version": "0.0.0-dev-20230428142007", | ||
"description": "A React component used to show users avatar or initials", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@chakra-ui/image": "0.0.0-dev-20230424225650", | ||
"@chakra-ui/image": "2.0.16", | ||
"@chakra-ui/shared-utils": "2.0.5", | ||
@@ -44,8 +44,8 @@ "@chakra-ui/react-context": "2.0.8", | ||
"clean-package": "2.2.0", | ||
"@chakra-ui/object-utils": "0.0.0-dev-20230424225650", | ||
"@chakra-ui/system": "0.0.0-dev-20230424225650", | ||
"@chakra-ui/layout": "0.0.0-dev-20230424225650" | ||
"@chakra-ui/object-utils": "2.1.0", | ||
"@chakra-ui/system": "2.5.6", | ||
"@chakra-ui/layout": "2.1.19" | ||
}, | ||
"peerDependencies": { | ||
"@chakra-ui/system": "0.0.0-dev-20230424225650", | ||
"@chakra-ui/system": ">=2.0.0", | ||
"react": ">=18" | ||
@@ -52,0 +52,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61726
+ Added@chakra-ui/anatomy@2.2.2(transitive)
+ Added@chakra-ui/color-mode@2.2.0(transitive)
+ Added@chakra-ui/image@2.0.16(transitive)
+ Added@chakra-ui/object-utils@2.1.0(transitive)
+ Added@chakra-ui/react-use-safe-layout-effect@2.1.0(transitive)
+ Added@chakra-ui/styled-system@2.9.2(transitive)
+ Added@chakra-ui/system@2.6.2(transitive)
+ Added@chakra-ui/theme@3.3.1(transitive)
+ Added@chakra-ui/theme-tools@2.1.2(transitive)
+ Added@chakra-ui/theme-utils@2.0.21(transitive)
+ Addedreact-fast-compare@3.2.2(transitive)
- Removed@chakra-ui/anatomy@2.1.2(transitive)
- Removed@chakra-ui/color-mode@2.1.12(transitive)
- Removed@chakra-ui/image@0.0.0-dev-20230424225650(transitive)
- Removed@chakra-ui/object-utils@0.0.0-dev-20230424225650(transitive)
- Removed@chakra-ui/styled-system@0.0.0-dev-202304242256502.10.3(transitive)
- Removed@chakra-ui/system@0.0.0-dev-20230424225650(transitive)
- Removed@chakra-ui/theme@0.0.0-dev-20230424225650(transitive)
- Removed@chakra-ui/theme-tools@2.0.17(transitive)
- Removed@chakra-ui/theme-utils@0.0.0-dev-20230424225650(transitive)
- Removed@chakra-ui/utils@2.1.3(transitive)
- Removed@types/lodash.mergewith@4.6.9(transitive)
- Removedreact-fast-compare@3.2.1(transitive)
Updated@chakra-ui/image@2.0.16