@chakra-ui/avatar
Advanced tools
Comparing version 0.0.0-dev-20230424222806 to 0.0.0-dev-20230424225650
@@ -61,3 +61,6 @@ "use strict"; | ||
function initials(name) { | ||
const [firstName, lastName] = name.split(" "); | ||
var _a, _b; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = (_b = names.at(-1)) != null ? _b : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -64,0 +67,0 @@ } |
@@ -40,3 +40,6 @@ "use strict"; | ||
function initials(name) { | ||
const [firstName, lastName] = name.split(" "); | ||
var _a, _b; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = (_b = names.at(-1)) != null ? _b : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -43,0 +46,0 @@ } |
@@ -47,3 +47,6 @@ "use strict"; | ||
function initials(name) { | ||
const [firstName, lastName] = name.split(" "); | ||
var _a, _b; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = (_b = names.at(-1)) != null ? _b : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -50,0 +53,0 @@ } |
@@ -52,3 +52,6 @@ "use strict"; | ||
function initials(name) { | ||
const [firstName, lastName] = name.split(" "); | ||
var _a, _b; | ||
const names = name.split(" "); | ||
const firstName = (_a = names.at(0)) != null ? _a : ""; | ||
const lastName = (_b = names.at(-1)) != null ? _b : ""; | ||
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0); | ||
@@ -55,0 +58,0 @@ } |
{ | ||
"name": "@chakra-ui/avatar", | ||
"version": "0.0.0-dev-20230424222806", | ||
"version": "0.0.0-dev-20230424225650", | ||
"description": "A React component used to show users avatar or initials", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@chakra-ui/image": "0.0.0-dev-20230424222806", | ||
"@chakra-ui/image": "0.0.0-dev-20230424225650", | ||
"@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-20230424222806", | ||
"@chakra-ui/system": "0.0.0-dev-20230424222806", | ||
"@chakra-ui/layout": "0.0.0-dev-20230424222806" | ||
"@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" | ||
}, | ||
"peerDependencies": { | ||
"@chakra-ui/system": "0.0.0-dev-20230424222806", | ||
"@chakra-ui/system": "0.0.0-dev-20230424225650", | ||
"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
61842
1874
+ Added@chakra-ui/image@0.0.0-dev-20230424225650(transitive)
+ Added@chakra-ui/object-utils@0.0.0-dev-20230424225650(transitive)
+ Added@chakra-ui/styled-system@0.0.0-dev-20230424225650(transitive)
+ Added@chakra-ui/system@0.0.0-dev-20230424225650(transitive)
+ Added@chakra-ui/theme@0.0.0-dev-20230424225650(transitive)
+ Added@chakra-ui/theme-utils@0.0.0-dev-20230424225650(transitive)
- Removed@chakra-ui/image@0.0.0-dev-20230424222806(transitive)
- Removed@chakra-ui/object-utils@0.0.0-dev-20230424222806(transitive)
- Removed@chakra-ui/styled-system@0.0.0-dev-20230424222806(transitive)
- Removed@chakra-ui/system@0.0.0-dev-20230424222806(transitive)
- Removed@chakra-ui/theme@0.0.0-dev-20230424222806(transitive)
- Removed@chakra-ui/theme-utils@0.0.0-dev-20230424222806(transitive)