Skip to content

flat

Given an array of arrays, returns a single dimensional array with all items in it.

Usage

flat([[1, 2], [[3], 4], [5]]);
// [1, 2, [3], 4, 5]

Installation

Terminal window
npx atmx add helper flat