UNPKG

@bbashcode/lotide-flex

Version:

A clone of the lodash JavaScript library to practice creating various types of functions using JS.

11 lines (10 loc) 320 B
/** * flatten method is used for as the name suggest, flattening nested arrays * @param {array} source, input param * @return {array} returns a flattened array of the provided nested source */ const flatten = function flatNestedArrays(source){ return source.flat(); } //exporting module module.exports = flatten;