flatten-util

1.0.1 • Public • Published

Flatten arrays

This library helps you to flatten nested arrays into a single level array.

Installation

$ npm install flatten-util --save

Usage

import flatten from 'flatten-util'

let flattened = flatten([[1,[[2,[[3,4,[5]],6],[7]],8],[9]],[[10,11,[12]],13]])

console.log(flattened) // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]

Tests

To run the test suite, first install the dependencies, then run npm test:

$ npm install
$ npm test

License

[MIT](LICENSE)

Readme

Keywords

Package Sidebar

Install

npm i flatten-util

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • frang