reduce-flatten
Flatten an array into the supplied array.
Example
const flatten = require('reduce-flatten')
flatten() ⏏
Kind: Exported function
Example
> numbers = [ 1, 2, [ 3, 4 ], 5 ]
> numbers.reduce(flatten, [])
[ 1, 2, 3, 4, 5 ]
| Name |
Last commit
fb6bdbed
-
初回コミット
|
History
|
Last Update |
|---|---|---|
| .. | ||
| .travis.yml | Loading commit data... | |
| LICENSE | Loading commit data... | |
| README.hbs | Loading commit data... | |
| README.md | Loading commit data... | |
| index.js | Loading commit data... | |
| package.json | Loading commit data... | |
| test.js | Loading commit data... |
Flatten an array into the supplied array.
Example
const flatten = require('reduce-flatten')
Kind: Exported function
Example
> numbers = [ 1, 2, [ 3, 4 ], 5 ]
> numbers.reduce(flatten, [])
[ 1, 2, 3, 4, 5 ]