/flatten-deep-js

ƛ A function for flattening of arbitrarily nested arrays.

Primary LanguageJavaScriptMIT LicenseMIT

flatten-deep Build Status

ƛ Flattens arbitrarily nested arrays.

Installation

# NPM
npm install github:mareksuscak/flatten-deep-js

# Yarn
yarn add https://github.com/mareksuscak/flatten-deep-js

How To Use

import flattenDeep from 'flattenDeep'
// or
// var flattenDeep = require('flatten-deep')

flattenDeep([1, [2, [3]], 4]) // -> [1, 2, 3, 4]

Running Tests

Interactive mode

// NPM
npm test -- --watch

// Yarn
yarn test -- --watch

Single run mode:

// NPM
npm test

// Yarn
yarn test

Known Issues

Contributing

See our Contribution Guidelines.

License

See the License.