Skip to content

series

Creates a series object around a list of values that should be treated with order.

Usage

const numbers = series([1, 2, 3]);
numbers.first(); // => 1
numbers.last(); // => 3
numbers.next(2); // => 3
numbers.previous(2); // => 1
numbers.spin(2, 1); // => 3
numbers.spin(2, -1); // => 1

Installation

Terminal window
npx atmx add helper series