Skip to content

Commit

Permalink
Persona: remove direct lodash import (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
yndx-madfriend authored Aug 21, 2023
1 parent c1599b7 commit c07987b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Persona/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _ from 'lodash';
import get from 'lodash/get';

import type {PersonaText} from './types';

Expand All @@ -20,5 +20,5 @@ export const extractTextView = (text: PersonaText = '') => {

export function getTwoLetters(text: string) {
const words = text.split(' ');
return [_.get(words, '[0][0]'), _.get(words, '[1][0]')].filter(Boolean).join('');
return [get(words, '[0][0]'), get(words, '[1][0]')].filter(Boolean).join('');
}
2 changes: 1 addition & 1 deletion src/components/Select/__tests__/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import {act, render} from '@testing-library/react';
import {range} from 'lodash';
import range from 'lodash/range';

import {Select} from '..';
import type {SelectOption, SelectOptionGroup, SelectProps} from '..';
Expand Down

0 comments on commit c07987b

Please sign in to comment.