1.0.3 • Published 4 years ago
node-array-flatten v1.0.3
node-array-flatten
The node-array-flatten method creates a new array with all sub-array elements concatenated into it.
Installation
Use the package manager npm to install node-array-flatten.
npm install node-array-flatten or npm i node-array-flatten
Usage
var flatten = require('node-array-flatten');
flatten([1, [2, 3],[4, 5, 6]]) # returns [1,2,3,4,5,6]
flatten([1, [2, 3],'',[4, 5, 6]]) # returns [1,2,3,4,5,6]
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.