MCPcopy
hub / github.com/jaredpalmer/formik / insert

Function insert

packages/formik/src/FieldArray.tsx:89–97  ·  view source on GitHub ↗
(
  arrayLike: ArrayLike<T>,
  index: number,
  value: T
)

Source from the content-addressed store, hash-verified

87};
88
89export const insert = <T,>(
90 arrayLike: ArrayLike<T>,
91 index: number,
92 value: T
93) => {
94 const copy = copyArrayLike(arrayLike);
95 copy.splice(index, 0, value);
96 return copy;
97};
98
99export const replace = <T,>(
100 arrayLike: ArrayLike<T>,

Callers 1

FieldArrayInnerClass · 0.85

Calls 1

copyArrayLikeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…