Commit d9209acf authored by Dhiraj Bodicherla's avatar Dhiraj Bodicherla

Use lodash instead of underscore in frequent items

parent f3a7b371
<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