Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

utils-flatten

jaredhanson228.2k1.0.0

flatten() utility function

util, array

readme

utils-flatten

Flattens an array.

Install

$ npm install utils-flatten

Usage

var arr = ['one', ['two', ['three', 'four'], 'five']];

flatten(arr);
// => ['one', 'two', 'three', 'four', 'five']

Tests

$ npm install
$ npm test

Build Status

Credits

License

The MIT License

Copyright (c) 2013 Jared Hanson <http://jaredhanson.net/>