@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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1,493
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1,493
  • 1.0.0
    0
  • 0.2.0
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i @arr/flatten

Weekly Downloads

1,493

Version

1.0.1

License

MIT

Unpacked Size

1.57 kB

Total Files

5

Last publish

Collaborators

  • lukeed