Commit c6474446 authored by rkpattnaik780's avatar rkpattnaik780

Chore: replace underscore with lodash for in /app/assets/javascripts/helpers

Loadash has been added as a dependency and underscore has been replaced with Loadash in app/assets/javascripts/helpers.

Addresses #196666
parent bd2736fb
import _ from 'underscore';
import { escape } from 'lodash';
import { getFirstCharacterCapitalized } from '~/lib/utils/text_utility';
export const DEFAULT_SIZE_CLASS = 's40';
......@@ -19,7 +19,7 @@ export function renderIdenticon(entity, options = {}) {
const bgClass = getIdenticonBackgroundClass(entity.id);
const title = getIdenticonTitle(entity.name);
return `<div class="avatar identicon ${_.escape(sizeClass)} ${_.escape(bgClass)}">${_.escape(
return `<div class="avatar identicon ${escape(sizeClass)} ${escape(bgClass)}">${escape(
title,
)}</div>`;
}
......@@ -31,5 +31,5 @@ export function renderAvatar(entity, options = {}) {
const { sizeClass = DEFAULT_SIZE_CLASS } = options;
return `<img src="${_.escape(entity.avatar_url)}" class="avatar ${_.escape(sizeClass)}" />`;
return `<img src="${escape(entity.avatar_url)}" class="avatar ${escape(sizeClass)}" />`;
}
---
title: Replace underscore with lodash in /app/assets/javascripts/helpers
merge_request: 25014
author: rkpattnaik780
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment