mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 20:22:26 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
27 lines
686 B
TypeScript
27 lines
686 B
TypeScript
// Loaded from https://deno.land/x/ramda@v0.27.2/source/flatten.js
|
|
|
|
|
|
import _curry1 from './internal/_curry1.js';
|
|
import _makeFlat from './internal/_makeFlat.js';
|
|
|
|
|
|
/**
|
|
* Returns a new list by pulling every item out of it (and all its sub-arrays)
|
|
* and putting them in a new array, depth-first.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.1.0
|
|
* @category List
|
|
* @sig [a] -> [b]
|
|
* @param {Array} list The array to consider.
|
|
* @return {Array} The flattened list.
|
|
* @see R.unnest
|
|
* @example
|
|
*
|
|
* R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]);
|
|
* //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
*/
|
|
var flatten = _curry1(_makeFlat(true));
|
|
export default flatten;
|