Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
function arraySwap
import { arraySwap } from "https://deno.land/x/netzo@0.3.66/deps/@dnd-kit/sortable.ts";

Swap an array item to a different position. Returns a new array with the item swapped to the new position.

Parameters

array: T[]
from: number
to: number