mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-13 01:54:52 +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>
31 lines
971 B
JavaScript
31 lines
971 B
JavaScript
import _curry2 from './_curry2.js';
|
|
import _xfBase from './_xfBase.js';
|
|
|
|
var XDropRepeatsWith = /*#__PURE__*/function () {
|
|
function XDropRepeatsWith(pred, xf) {
|
|
this.xf = xf;
|
|
this.pred = pred;
|
|
this.lastValue = undefined;
|
|
this.seenFirstValue = false;
|
|
}
|
|
|
|
XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase.init;
|
|
XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase.result;
|
|
XDropRepeatsWith.prototype['@@transducer/step'] = function (result, input) {
|
|
var sameAsLast = false;
|
|
if (!this.seenFirstValue) {
|
|
this.seenFirstValue = true;
|
|
} else if (this.pred(this.lastValue, input)) {
|
|
sameAsLast = true;
|
|
}
|
|
this.lastValue = input;
|
|
return sameAsLast ? result : this.xf['@@transducer/step'](result, input);
|
|
};
|
|
|
|
return XDropRepeatsWith;
|
|
}();
|
|
|
|
var _xdropRepeatsWith = /*#__PURE__*/_curry2(function _xdropRepeatsWith(pred, xf) {
|
|
return new XDropRepeatsWith(pred, xf);
|
|
});
|
|
export default _xdropRepeatsWith; |