bit-bin
Version:
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b
21 lines (19 loc) • 395 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = flatten;
/**
* flatten arrays to a single dimension.
* @name flatten
* @param {[[*]]} arrays
* @returns [*] a flatten array
* @example
* ```js
* flatten([[1], [2], [3]]) // => [1, 2, 3]
* ```
*/
function flatten(arrays) {
const concat = [].concat;
return concat.apply([], arrays);
}
;