Skip to content

Commit

Permalink
perf: use specific lodash imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hurali97 committed Sep 12, 2024
1 parent 4f3a1a1 commit 562d1a1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/API.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// Use this deferred lib so we don't have a dependency on jQuery (so we can use this module in mobile)
import {Deferred} from 'simply-deferred';
import {has} from 'lodash';
import has from 'lodash/has';
import ExpensifyAPIDeferred from './APIDeferred';
import * as Utils from './utils';

Expand Down
2 changes: 1 addition & 1 deletion lib/APIDeferred.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* WIP, This is in the process of migration from web-e. Please add methods to this as is needed.|
* ----------------------------------------------------------------------------------------------
*/
import {once} from 'lodash';
import once from 'lodash/once';
import * as Utils from './utils';
import * as Func from './Func';

Expand Down
2 changes: 1 addition & 1 deletion lib/PubSub.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import has from 'lodash/has';
import {once} from 'lodash';
import once from 'lodash/once';
import Log from './Log';
import * as Utils from './utils';

Expand Down
2 changes: 1 addition & 1 deletion lib/Templates.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import $ from 'jquery';
import {template as createTemplate} from 'lodash';
import createTemplate from 'lodash/template';
import * as Utils from './utils';

/**
Expand Down
6 changes: 5 additions & 1 deletion lib/components/form/element/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import cn from 'classnames';
import {defer, has, isEqual, template, uniqBy} from 'lodash';
import defer from 'lodash/defer';
import has from 'lodash/has';
import isEqual from 'lodash/isEqual';
import template from 'lodash/template';
import uniqBy from 'lodash/uniqBy';
import Str from '../../../str';
import DropDown from './dropdown';
import * as Utils from '../../../utils';
Expand Down
2 changes: 1 addition & 1 deletion lib/components/form/element/dropdown.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import {uniqueId} from 'lodash';
import uniqueId from 'lodash/uniqueId';
import DropDownItem from './dropdownItem';

const propTypes = {
Expand Down

0 comments on commit 562d1a1

Please sign in to comment.