flattenme

1.0.1 • Public • Published

Flatten N-dimensional array into One dimensional

For Example:- Input is [[1, [2, [3, [4]]]], 5, [6, [7, 8, [9]]], 10] , output will be [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ]

Usage

var FlattenArr = require('Flattenme'); //For ES6 import :- import Flattenme from "flattenme";
let FlattenedArr = Flattenme([[1,[3,4,5]]]) //expectedOutput :- [1,3,4,5]

Readme

Keywords

none

Package Sidebar

Install

npm i flattenme

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

2.19 kB

Total Files

4

Last publish

Collaborators

  • hitanshushah