You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
3 weeks ago | |
---|---|---|
.. | ||
.travis.yml | 3 weeks ago | |
LICENSE | 3 weeks ago | |
README.hbs | 3 weeks ago | |
README.md | 3 weeks ago | |
index.js | 3 weeks ago | |
package.json | 3 weeks ago | |
test.js | 3 weeks ago |
README.md
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 ]
© 2016-18 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.