@lucid-softworks/array-rotate
v0.1.0
Published
Return an immutable array rotation by an integer offset.
Maintainers
Readme
@lucid-softworks/array-rotate
Return an immutable rotation. Positive offsets rotate right; negative offsets rotate left.
import { rotate } from "@lucid-softworks/array-rotate";
rotate([1, 2, 3], 1); // [3, 1, 2]