mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
5 lines
165 B
TypeScript
5 lines
165 B
TypeScript
|
export const arrayMove = <T>(array: T[], fromIndex: number, toIndex: number): T[] => {
|
||
|
array.splice(toIndex, 0, array.splice(fromIndex, 1)[0]);
|
||
|
return array;
|
||
|
};
|