mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
27 lines
652 B
TypeScript
27 lines
652 B
TypeScript
// Loaded from https://deno.land/x/ramda@v0.27.2/source/unnest.js
|
|
|
|
|
|
import _identity from './internal/_identity.js';
|
|
import chain from './chain.js';
|
|
|
|
|
|
/**
|
|
* Shorthand for `R.chain(R.identity)`, which removes one level of nesting from
|
|
* any [Chain](https://github.com/fantasyland/fantasy-land#chain).
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.3.0
|
|
* @category List
|
|
* @sig Chain c => c (c a) -> c a
|
|
* @param {*} list
|
|
* @return {*}
|
|
* @see R.flatten, R.chain
|
|
* @example
|
|
*
|
|
* R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]]
|
|
* R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6]
|
|
*/
|
|
var unnest = chain(_identity);
|
|
export default unnest;
|