Skip to main content
variable insertAtImmutable
import { insertAtImmutable } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Insert the given values at the specified index.

Use Array.prototype.slice() with an appropriate index and a delete count of 0, spreading the given values to be inserted.

type

(
arr: any[],
i: number,
...v: any[],
) => unknown