New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@umbraco-ui/uui-avatar

Package Overview
Dependencies
Maintainers
5
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umbraco-ui/uui-avatar - npm Package Compare versions

Comparing version

to
1.2.0-rc.0

16

lib/index.js

@@ -42,9 +42,13 @@ import { defineElement } from '@umbraco-ui/uui-base/lib/registration';

let initials = "";
if (name) {
const words = name.match(/(\w+)/g) || [];
initials = words[0].substring(0, 1);
if (words.length > 1) {
initials += words[words.length - 1].substring(0, 1);
}
if (!name) {
return initials;
}
const words = name.match(/(\w+)/g);
if (!(words == null ? void 0 : words.length)) {
return initials;
}
initials = words[0].substring(0, 1);
if (words.length > 1) {
initials += words[words.length - 1].substring(0, 1);
}
return initials.toUpperCase();

@@ -51,0 +55,0 @@ }

{
"name": "@umbraco-ui/uui-avatar",
"version": "1.1.0",
"version": "1.2.0-rc.0",
"license": "MIT",

@@ -33,3 +33,3 @@ "description": "An avatar web component for displaying user avatars.",

"dependencies": {
"@umbraco-ui/uui-base": "1.1.0"
"@umbraco-ui/uui-base": "1.2.0-rc.0"
},

@@ -45,3 +45,3 @@ "scripts": {

"homepage": "https://uui.umbraco.com/?path=/story/uui-avatar",
"gitHead": "5159a81e353c893c30073cdbf2fdd94306477d6e"
"gitHead": "43f1b9a8bd1721af30ba7c145517ee665d874df3"
}