Utilities
combine
Section titled “combine”Composes cleanup functions and makes the composed cleanup idempotent.
const cleanup = combine(cleanupDraggable, cleanupTarget, cleanupMonitor);cleanup();cleanup(); // no-opRuns a function once and returns the first result for later calls.
const setup = once(() => expensiveSetup());reorder
Section titled “reorder”Returns a reordered copy of a list without mutating the original.
const next = reorder({ list: tasks, startIndex: 0, finishIndex: 2,});