/ never-odd-or-even / back / node_modules / array-flatten /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[   ]LICENSE39 years ago1.1K 
[TXT]README.md39 years ago1.5K 
[TXT]array-flatten.d.ts39 years ago526  
[   ]array-flatten.js39 years ago1.9K 
[   ]package.json2 years ago1.9K 
README.md

Array Flatten

NPM version NPM downloads Build status Test coverage

Flatten nested arrays.

Installation

npm install array-flatten --save

Usage

var flatten = require('array-flatten')

flatten([1, [2, [3, [4, [5], 6], 7], 8], 9])
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]

flatten.depth([1, [2, [3, [4, [5], 6], 7], 8], 9], 2)
//=> [1, 2, 3, [4, [5], 6], 7, 8, 9]

(function () {
  flatten.from(arguments) //=> [1, 2, 3]
})(1, [2, 3])

Methods

License

MIT

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80