🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

npm-array-flatten

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-array-flatten

Receives multilevel nested array as an input and flattens it into one dimensional.

1.0.4
latest
Source
npm
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

npm-array-flatten

Npm array flatten includes flat, magikflata modules. It Receives multilevel nested array as an input and flattens it into one dimensional.

Installation

npm i npm-array-flatten

Usage

var arrayFlatten = require('npm-array-flatten');

flat(array)

Receives the nested input array and makes it into single dimensional.

 var inputArray = [1,2,3,4,[5,[6,12,21,[1,2,3],5],9],7,8,9];
 arrayFlatten.flat(inputArray)  
 //  [1,2,3,4,5,6,12,21,1,2,3,5,9,7,8,9]

Demo

Demo @array-flatten | https://tonicdev.com/npm/npm-array-flatten

Author

Krishcdbry [krishcdbry@gmail.com]

Licence

MIT @krishcdbry

Keywords

array-flatten

FAQs

Package last updated on 15 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts