@arr/flatten
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@arr/flatten

Tiny (139B) & fast utility to recursively flatten an array of arrays!

Install

$ npm install --save @arr/flatten

Usage

import flatten from '@arr/flatten';

flatten(['a', ['b', ['c']], 'd', ['e', [['f']]]]);
//=> ['a', 'b', 'c', 'd', 'e', 'f']

API

flatten(arr)

arr

Type: Array
The array to iterate upon.

License

MIT © Luke Edwards

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @arr/flatten

      Weekly Downloads

      1,389

      Version

      1.0.1

      License

      MIT

      Unpacked Size

      1.57 kB

      Total Files

      5

      Last publish

      Collaborators

      • lukeed