MCPcopy
hub / github.com/mathuo/dockview / pushToEnd

Function pushToEnd

packages/dockview-core/src/array.ts:41–48  ·  view source on GitHub ↗
(arr: T[], value: T)

Source from the content-addressed store, hash-verified

39 * Pushes an element to the end of the array, if found.
40 */
41export function pushToEnd<T>(arr: T[], value: T): void {
42 const index = arr.indexOf(value);
43
44 if (index > -1) {
45 arr.splice(index, 1);
46 arr.push(value);
47 }
48}
49
50export function firstIndex<T>(
51 array: T[] | ReadonlyArray<T>,

Callers 3

distributeEmptySpaceMethod · 0.90
SplitviewClass · 0.90
array.spec.tsFile · 0.90

Calls 2

pushMethod · 0.80
indexOfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…