source: node_modules/ramda/src/internal/_xtakeWhile.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 669 bytes
Line 
1var _reduced =
2/*#__PURE__*/
3require("./_reduced.js");
4
5var _xfBase =
6/*#__PURE__*/
7require("./_xfBase.js");
8
9var XTakeWhile =
10/*#__PURE__*/
11function () {
12 function XTakeWhile(f, xf) {
13 this.xf = xf;
14 this.f = f;
15 }
16
17 XTakeWhile.prototype['@@transducer/init'] = _xfBase.init;
18 XTakeWhile.prototype['@@transducer/result'] = _xfBase.result;
19
20 XTakeWhile.prototype['@@transducer/step'] = function (result, input) {
21 return this.f(input) ? this.xf['@@transducer/step'](result, input) : _reduced(result);
22 };
23
24 return XTakeWhile;
25}();
26
27function _xtakeWhile(f) {
28 return function (xf) {
29 return new XTakeWhile(f, xf);
30 };
31}
32
33module.exports = _xtakeWhile;
Note: See TracBrowser for help on using the repository browser.