update
This commit is contained in:
parent
d9becc67b6
commit
9308795b8b
964 changed files with 104265 additions and 16 deletions
32
node_modules/ramda/es/internal/_flatCat.js
generated
vendored
Normal file
32
node_modules/ramda/es/internal/_flatCat.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
import _forceReduced from "./_forceReduced.js";
|
||||
import _isArrayLike from "./_isArrayLike.js";
|
||||
import _reduce from "./_reduce.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var preservingReduced = function (xf) {
|
||||
return {
|
||||
'@@transducer/init': _xfBase.init,
|
||||
'@@transducer/result': function (result) {
|
||||
return xf['@@transducer/result'](result);
|
||||
},
|
||||
'@@transducer/step': function (result, input) {
|
||||
var ret = xf['@@transducer/step'](result, input);
|
||||
return ret['@@transducer/reduced'] ? _forceReduced(ret) : ret;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
var _flatCat = function _xcat(xf) {
|
||||
var rxf = preservingReduced(xf);
|
||||
return {
|
||||
'@@transducer/init': _xfBase.init,
|
||||
'@@transducer/result': function (result) {
|
||||
return rxf['@@transducer/result'](result);
|
||||
},
|
||||
'@@transducer/step': function (result, input) {
|
||||
return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export default _flatCat;
|
Loading…
Add table
Add a link
Reference in a new issue