Skip to content

krishcdbry/npm-array-flatten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published