Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

array-flatten

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Issues
File Explorer

Advanced tools

array-flatten

Flatten nested arrays

    3.0.0latest
    Github

Version published
Maintainers
1
Weekly downloads
35,350,581
increased by1.44%

Weekly downloads

Changelog

Source

Simplify Package

Added

  • Better TypeScript support for array flattening

Changed

  • Added ES2015 distributable and renamed primary export to exports.flatten

Removed

  • Removed array type checked entry to flatten, prefer performance and smaller code
  • Removed depth version of functions, if you know the depth it's better to use something like Array#flat or flatten helpers explicitly in code - you typically don't need anything between 1 and infinity in every day code

Readme

Source

Array Flatten

NPM version NPM downloads Build status Test coverage Bundle size

Flatten nested arrays.

Installation

npm install array-flatten --save

Usage

import { flatten } from "array-flatten"; flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]); //=> [1, 2, 3, 4, 5, 6, 7, 8, 9] (function() { flatten(arguments); //=> [1, 2, 3] })(1, [2, 3]);

License

MIT

Keywords

FAQs

What is array-flatten?

Flatten nested arrays

Is array-flatten popular?

The npm package array-flatten receives a total of 33,634,284 weekly downloads. As such, array-flatten popularity was classified as popular.

Is array-flatten well maintained?

We found that array-flatten demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 21 Nov 2019

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc