Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

flattenarray

0.0.1 • Public • Published

flatten-array

Recursively flatten an array.

Install

npm install flattenarray
bower install flatten-array

Usage

var flatten = require('flatten');
 
console.log(flatten('a')); // ["a"]
console.log(flatten([[['b']]])); // ["b"]
console.log(flatten(['a',['b'],['c']])); // ["a","b","c"]
console.log(flatten([['a'],'b',['c',['d']]])); // ["a","b","c","d"]

License

MIT

install

npm i flattenarray

Downloadsweekly downloads

1

version

0.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability