server-json/node_modules/ramda/es/internal/_xtakeWhile.js
2024-11-01 08:00:42 +00:00

19 lines
No EOL
612 B
JavaScript

import _reduced from "./_reduced.js";
import _xfBase from "./_xfBase.js";
var XTakeWhile = /*#__PURE__*/function () {
function XTakeWhile(f, xf) {
this.xf = xf;
this.f = f;
}
XTakeWhile.prototype['@@transducer/init'] = _xfBase.init;
XTakeWhile.prototype['@@transducer/result'] = _xfBase.result;
XTakeWhile.prototype['@@transducer/step'] = function (result, input) {
return this.f(input) ? this.xf['@@transducer/step'](result, input) : _reduced(result);
};
return XTakeWhile;
}();
export default function _xtakeWhile(f) {
return function (xf) {
return new XTakeWhile(f, xf);
};
}