Skip to content

fork

Split an array into two array based on a true/false condition function.

Usage

fork([1, 2, 3, 4], (n) => n % 2 === 0);
// [[2, 4], [1, 3]]

Installation

Terminal window
npx atmx add helper fork