Socket
Socket
Sign inDemoInstall

array-flatten

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

array-flatten

Flatten nested arrays

    3.0.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
29,843,065
decreased by-15.5%

Weekly downloads

Package description

What is array-flatten?

The array-flatten npm package is a utility for flattening nested arrays into a single level array. It is useful for handling operations where you need to process or manipulate data that may be structured in multiple layers of arrays.

What are array-flatten's main functionalities?

Flatten nested arrays

This feature allows you to flatten a nested array of any depth into a single level array. The code sample demonstrates how to use the array-flatten package to flatten an array.

[].concat.apply([], array)

Other packages similar to array-flatten

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

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

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc