utils-flatten
Version:
flatten() utility function
34 lines (19 loc) • 613 B
Markdown
# utils-flatten
Flattens an array.
## Install
$ npm install utils-flatten
## Usage
```javascript
var arr = ['one', ['two', ['three', 'four'], 'five']];
flatten(arr);
// => ['one', 'two', 'three', 'four', 'five']
```
## Tests
$ npm install
$ npm test
[](http://travis-ci.org/jaredhanson/utils-flatten)
## Credits
- [Jared Hanson](http://github.com/jaredhanson)
## License
[The MIT License](http://opensource.org/licenses/MIT)
Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>