Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/@dnd-kit/sortable.ts>arraySwap

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function arraySwap
import { arraySwap } from "https://deno.land/x/netzo@0.4.87/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