Big update!Introducing GitHub Bot Commands. Learn more
Socket
BlogLoveLog in
Book a demo

array-flatten

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Issues
File Explorer

Advanced tools

array-flatten

Flatten nested arrays

    3.0.0latest

Version published
Maintainers
1
Weekly downloads
34,662,320
increased by1.82%

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,177,773 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
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc