mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.
* Remove unnecessary _ import from Graph component
* Enforce lodash import style
* Fix remaining lodash imports
13 lines
230 B
TypeScript
13 lines
230 B
TypeScript
// eslint-disable-next-line lodash/import-scope
|
|
import _ from 'lodash';
|
|
|
|
/*
|
|
Mixins :)
|
|
*/
|
|
_.mixin({
|
|
move: (array, fromIndex, toIndex) => {
|
|
array.splice(toIndex, 0, array.splice(fromIndex, 1)[0]);
|
|
return array;
|
|
},
|
|
});
|