Package Exports
- array-flatten
- array-flatten/array-flatten
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-flatten) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Array Flatten
Flatten an array of nested arrays into a single flat array.
Installation
npm install array-flatten --save
Usage
var flatten = require('array-flatten');
flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]);
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2);
//=> [1, 2, 3, [4, [5], 6], 7, 8, 9]
License
MIT