Gitlab: https://gitlab.com/reedrichards-javascript/typescript/flatten-array
Docs: https://reedrichards-javascript.gitlab.io/typescript/flatten-array/index.html
npm install flatten-array-ts
import flattenArray from 'flattenArray'
flattenArray([[1, 2, 3], [101, 2, 1, 10], [2, 1]])
// Output: [1, 2, 3, 101, 2, 1, 10, 2, 1]
npm t
: Run test suitenpm start
: Run npm run build
in watch modenpm run test:watch
: Run test suite in interactive watch modenpm run test:prod
: Run linting and generate coveragenpm run build
: Generate bundles and typings, create docsnpm run lint
: Lints codeArray to be flattened
Input: [[1, 2, 3], [101, 2, 1, 10], [2, 1]]
Output = [1, 2, 3, 101, 2, 1, 10, 2, 1]
Generated using TypeDoc
flattenArray recursively flattens array