This package has been deprecated

Author message:

flatten is deprecated in favor of utility frameworks such as lodash.

flatten

1.0.3 • Public • Published

flatten

A tiny utility to flatten arrays of arrays (of arrays, etc., recursively, infinitely or to an optional depth) into a single array of non-arrays.

example:

> var flatten = require('flatten');
undefined
> flatten([1, [2, 3], [4, 5, 6], [7, [8, 9]], 10])
[ 1,
  2,
  3,
  4,
  5,
  6,
  7,
  8,
  9,
  10 ]
> flatten([1, [2, [3, [4, [5]]]]], 2)
[ 1,
  2,
  3,
  [ 4, [ 5 ] ] ]

install:

npm install flatten

license:

MIT/X11.

/flatten/

    Package Sidebar

    Install

    npm i flatten

    Weekly Downloads

    2,987,741

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    3.68 kB

    Total Files

    5

    Last publish

    Collaborators

    • jesusabdullah
    • mk-pmb-2fa