mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-10 13:44:39 +08:00
DISABLE_THIRD_PARTY_CHECK=new npm module causes package-lock change We can get rid of a custom script and use ESLint for these rules. Additionally this means editors will highlight the issue in the editor. Change-Id: I552b52e7f07b4e7430b3f685dbc3b5fad36ffff2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2052167 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
32 lines
963 B
JavaScript
32 lines
963 B
JavaScript
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; |