Sha256: e81ed7f9e666046b00e8259fc110dabef37b5fa4a68c722bf9c6bf107e921651

Contents?: true

Size: 460 Bytes

Versions: 35

Compression:

Stored size: 460 Bytes

Contents

# 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:

```js
> 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.

Version data entries

35 entries across 34 versions & 12 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/flatten/README.md
disco_app-0.18.0 test/dummy/node_modules/flatten/README.md
disco_app-0.18.2 test/dummy/node_modules/flatten/README.md
disco_app-0.16.1 test/dummy/node_modules/flatten/README.md
disco_app-0.15.2 test/dummy/node_modules/flatten/README.md
disco_app-0.18.4 test/dummy/node_modules/flatten/README.md
disco_app-0.18.1 test/dummy/node_modules/flatten/README.md
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/flatten/README.md
disco_app-0.14.0 test/dummy/node_modules/flatten/README.md
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/flatten/README.md
tang-0.2.1 spec/tang_app/node_modules/flatten/README.md
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/flatten/README.md
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/flatten/README.md
ruby2js-4.0.4 lib/tasks/testrails/node_modules/flatten/README.md
ruby2js-4.0.3 lib/tasks/testrails/node_modules/flatten/README.md
tang-0.2.0 spec/tang_app/node_modules/flatten/README.md
tang-0.1.0 spec/tang_app/node_modules/flatten/README.md
tang-0.0.9 spec/tang_app/node_modules/flatten/README.md
enju_library-0.3.8 spec/dummy/node_modules/flatten/README.md
ilog-0.4.1 node_modules/flatten/README.md