Commit 11235473 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch...

Merge branch '196645-replace-underscore-with-lodash-for-app-assets-javascripts-frequent_items' into 'master'

Replace underscore with lodash methods in frequent_items components

Closes #196645

See merge request gitlab-org/gitlab!25479
parents 692e578c d9209acf
<script>
/* eslint-disable vue/require-default-prop */
import _ from 'underscore';
import { isEmpty, isString } from 'lodash';
import Identicon from '~/vue_shared/components/identicon.vue';
import highlight from '~/lib/utils/highlight';
import { truncateNamespace } from '~/lib/utils/text_utility';
......@@ -39,7 +39,7 @@ export default {
},
computed: {
hasAvatar() {
return _.isString(this.avatarUrl) && !_.isEmpty(this.avatarUrl);
return isString(this.avatarUrl) && !isEmpty(this.avatarUrl);
},
truncatedNamespace() {
return truncateNamespace(this.namespace);
......
<script>
import _ from 'underscore';
import { debounce } from 'lodash';
import { mapActions } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue';
import eventHub from '../event_hub';
......@@ -21,7 +21,7 @@ export default {
},
},
watch: {
searchQuery: _.debounce(function debounceSearchQuery() {
searchQuery: debounce(function debounceSearchQuery() {
this.setSearchQuery(this.searchQuery);
}, 500),
},
......
import _ from 'underscore';
import { take } from 'lodash';
import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
import sanitize from 'sanitize-html';
import { FREQUENT_ITEMS, HOUR_IN_MS } from './constants';
......@@ -31,7 +31,7 @@ export const getTopFrequentItems = items => {
return 0;
});
return _.first(frequentItems, frequentItemsCount);
return take(frequentItems, frequentItemsCount);
};
export const updateExistingFrequentItem = (frequentItem, item) => {
......
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