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. Accepts an optional depth argument.
Installation
npm install array-flatten --saveUsage
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]
(function () {
flatten(arguments); //=> [1, 2, 3]
})(1, [2, 3]);License
MIT