Package Exports
- @bemoje/arr-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 (@bemoje/arr-flatten) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@bemoje/arr-flatten
Flattens the passed array recursively.
Version
Travis CI
Dependencies
Stats
Donate
Installation
npm install @bemoje/arr-flatten
npm install --save @bemoje/arr-flatten
npm install --save-dev @bemoje/arr-flatten
Usage
import arrFlatten from '@bemoje/arr-flatten'
arrFlatten([1, [2]])
//=> [1, 2]
arrFlatten([1, [2, [3]]])
//=> [1, 2, 3]
Tests
Uses Jest to test module functionality. Run tests to get coverage details.
npm run test
API
arrFlatten
Flattens the passed array recursively.
Parameters
arr
Array the array to flatten
Returns
Array<any>