@chakra-ui/avatar
Advanced tools
Comparing version 0.0.0-dev-20230502211538 to 0.0.0-dev-20230528183722
@@ -63,4 +63,4 @@ "use strict"; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = names.length > 1 ? names.at(-1) : ""; | ||
const firstName = (_a = names[0]) != null ? _a : ""; | ||
const lastName = names.length > 1 ? names[names.length - 1] : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -67,0 +67,0 @@ } |
@@ -42,4 +42,4 @@ "use strict"; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = names.length > 1 ? names.at(-1) : ""; | ||
const firstName = (_a = names[0]) != null ? _a : ""; | ||
const lastName = names.length > 1 ? names[names.length - 1] : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -46,0 +46,0 @@ } |
@@ -49,4 +49,4 @@ "use strict"; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = names.length > 1 ? names.at(-1) : ""; | ||
const firstName = (_a = names[0]) != null ? _a : ""; | ||
const lastName = names.length > 1 ? names[names.length - 1] : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -53,0 +53,0 @@ } |
@@ -54,4 +54,4 @@ "use strict"; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = names.length > 1 ? names.at(-1) : ""; | ||
const firstName = (_a = names[0]) != null ? _a : ""; | ||
const lastName = names.length > 1 ? names[names.length - 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-20230502211538", | ||
"version": "0.0.0-dev-20230528183722", | ||
"description": "A React component used to show users avatar or initials", | ||
@@ -44,7 +44,7 @@ "keywords": [ | ||
"@chakra-ui/object-utils": "2.1.0", | ||
"@chakra-ui/system": "0.0.0-dev-20230502211538", | ||
"@chakra-ui/layout": "2.1.19" | ||
"@chakra-ui/system": "0.0.0-dev-20230528183722", | ||
"@chakra-ui/layout": "0.0.0-dev-20230528183722" | ||
}, | ||
"peerDependencies": { | ||
"@chakra-ui/system": "0.0.0-dev-20230502211538", | ||
"@chakra-ui/system": "0.0.0-dev-20230528183722", | ||
"react": ">=18" | ||
@@ -51,0 +51,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
61820