@arr/flatten

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

Stats

StarsIssuesVersionUpdatedCreatedSize
@arr/flatten
24521.0.12 years ago4 years agoMinified + gzip package size for @arr/flatten in KB

Readme

@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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.