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

Package detail

@sydneycoding/flatten

sydneycoding4MIT1.0.0

Recursivly flatten arrays of any type!

readme

Recursivly flatten arrays of any type!

Install

$ npm install @sydneycoding/flatten

Usage

const flatten = require('./flatten');
flat = flatten(['a', ['b', ['c']], 'd', ['e']]);
console.log(flat) // [ 'a', 'b', 'c', 'd', 'e' ]