just-flatten
v1.0.1
Published
Just flatten. srsly
Downloads
337
Readme
Recursively flatten arrays!
npm install just-flatten
var flatten = require('just-flatten')
Usage
flatten([[1,2,[3]],4]) // => [1,2,3,4]
The function expects a single argument: an array to be flattened. Any other value is returned as-is.