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

Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.

Use Array.prototype.slice() to get the desired argument at index n.

type

(n: number) => unknown