JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 35242189
  • Score
    100M100P100Q228666F
  • License MIT

Flatten a multi-dimensional array.

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

NPM version Build status Test coverage Gittip

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