Comparing version 3.1.1 to 3.2.0
@@ -186,2 +186,35 @@ function pipe(source) { | ||
function makeTrampoline(sink, f) { | ||
var state = [!1, !1, !1]; | ||
return sink( | ||
__(0, [ | ||
function(signal) { | ||
var match = state[1]; | ||
if (signal) { | ||
state[0] = !0; | ||
return 0; | ||
} else if (match) { | ||
state[2] = !0; | ||
return 0; | ||
} else { | ||
state[2] = !0; | ||
state[1] = !0; | ||
while (state[2] && !state[0]) { | ||
var match$1 = f(); | ||
if (void 0 !== match$1) { | ||
state[2] = !1; | ||
sink(__(1, [valFromOption(match$1)])); | ||
} else { | ||
state[0] = !0; | ||
sink(0); | ||
} | ||
} | ||
state[1] = !1; | ||
return 0; | ||
} | ||
} | ||
]) | ||
); | ||
} | ||
var observableSymbol = | ||
@@ -198,40 +231,3 @@ 'function' == typeof Symbol | ||
if ('number' == typeof signal) { | ||
return (function makeTrampoline(sink, f) { | ||
var state = [!1, !1, !1]; | ||
return sink( | ||
__(0, [ | ||
function(signal) { | ||
if (signal || state[0]) { | ||
return 0; | ||
} else { | ||
state[2] = !0; | ||
if (state[1]) { | ||
return 0; | ||
} else { | ||
state[1] = !0; | ||
!(function(_param) { | ||
while (1) { | ||
var match = f(); | ||
if (void 0 !== match) { | ||
state[2] = !1; | ||
sink(__(1, [valFromOption(match)])); | ||
if (state[2]) { | ||
continue; | ||
} else { | ||
return 0; | ||
} | ||
} else { | ||
state[0] = !0; | ||
return sink(0); | ||
} | ||
} | ||
})(); | ||
state[1] = !1; | ||
return 0; | ||
} | ||
} | ||
} | ||
]) | ||
); | ||
})(sink, function() { | ||
return makeTrampoline(sink, function() { | ||
return queue.shift(); | ||
@@ -323,34 +319,10 @@ }); | ||
var size = arr.length; | ||
var state = [0, !1, !1, !1]; | ||
return sink( | ||
__(0, [ | ||
function(signal) { | ||
var match = state[2]; | ||
if (signal) { | ||
state[1] = !0; | ||
return 0; | ||
} else if (match) { | ||
state[3] = !0; | ||
return 0; | ||
} else { | ||
state[3] = !0; | ||
state[2] = !0; | ||
while (state[3] && !state[1]) { | ||
var index = state[0]; | ||
if (index < size) { | ||
var x = arr[index]; | ||
state[0] = (index + 1) | 0; | ||
state[3] = !1; | ||
sink(__(1, [x])); | ||
} else { | ||
state[1] = !0; | ||
sink(0); | ||
} | ||
} | ||
state[2] = !1; | ||
return 0; | ||
} | ||
} | ||
]) | ||
); | ||
var index = [0]; | ||
return makeTrampoline(sink, function() { | ||
if (index[0] < size) { | ||
var x = arr[index[0]]; | ||
index[0] = (index[0] + 1) | 0; | ||
return some(x); | ||
} | ||
}); | ||
}; | ||
@@ -646,33 +618,10 @@ } | ||
return function(sink) { | ||
var state = [ls, !1, !1, !1]; | ||
return sink( | ||
__(0, [ | ||
function(signal) { | ||
var match = state[2]; | ||
if (signal) { | ||
state[1] = !0; | ||
return 0; | ||
} else if (match) { | ||
state[3] = !0; | ||
return 0; | ||
} else { | ||
state[3] = !0; | ||
state[2] = !0; | ||
while (state[3] && !state[1]) { | ||
var match$1 = state[0]; | ||
if (match$1) { | ||
state[0] = match$1[1]; | ||
state[3] = !1; | ||
sink(__(1, [match$1[0]])); | ||
} else { | ||
state[1] = !0; | ||
sink(0); | ||
} | ||
} | ||
state[2] = !1; | ||
return 0; | ||
} | ||
} | ||
]) | ||
); | ||
var value = [ls]; | ||
return makeTrampoline(sink, function() { | ||
var match = value[0]; | ||
if (match) { | ||
value[0] = match[1]; | ||
return some(match[0]); | ||
} | ||
}); | ||
}; | ||
@@ -1476,2 +1425,23 @@ }; | ||
var toArray$2 = function toArray(source) { | ||
var state = [new Array(), talkbackPlaceholder, void 0, !1]; | ||
_1(source, function(signal) { | ||
if ('number' == typeof signal) { | ||
state[3] = !0; | ||
return 0; | ||
} else if (signal.tag) { | ||
state[0].push(signal[0]); | ||
return state[1](0); | ||
} else { | ||
var x = signal[0]; | ||
state[1] = x; | ||
return x(0); | ||
} | ||
}); | ||
if (!state[3]) { | ||
state[1](1); | ||
} | ||
return state[0]; | ||
}; | ||
var debounce$2 = function debounce(f) { | ||
@@ -1882,2 +1852,3 @@ return function(source) { | ||
throttle$2 as throttle, | ||
toArray$2 as toArray, | ||
toCallbag$2 as toCallbag, | ||
@@ -1884,0 +1855,0 @@ toObservable$2 as toObservable, |
@@ -178,2 +178,35 @@ 'use strict'; | ||
function makeTrampoline(sink, f) { | ||
var state = [!1, !1, !1]; | ||
return sink( | ||
__(0, [ | ||
function(signal) { | ||
var match = state[1]; | ||
if (signal) { | ||
state[0] = !0; | ||
return 0; | ||
} else if (match) { | ||
state[2] = !0; | ||
return 0; | ||
} else { | ||
state[2] = !0; | ||
state[1] = !0; | ||
while (state[2] && !state[0]) { | ||
var match$1 = f(); | ||
if (void 0 !== match$1) { | ||
state[2] = !1; | ||
sink(__(1, [valFromOption(match$1)])); | ||
} else { | ||
state[0] = !0; | ||
sink(0); | ||
} | ||
} | ||
state[1] = !1; | ||
return 0; | ||
} | ||
} | ||
]) | ||
); | ||
} | ||
var observableSymbol = | ||
@@ -190,40 +223,3 @@ 'function' == typeof Symbol | ||
if ('number' == typeof signal) { | ||
return (function makeTrampoline(sink, f) { | ||
var state = [!1, !1, !1]; | ||
return sink( | ||
__(0, [ | ||
function(signal) { | ||
if (signal || state[0]) { | ||
return 0; | ||
} else { | ||
state[2] = !0; | ||
if (state[1]) { | ||
return 0; | ||
} else { | ||
state[1] = !0; | ||
!(function(_param) { | ||
while (1) { | ||
var match = f(); | ||
if (void 0 !== match) { | ||
state[2] = !1; | ||
sink(__(1, [valFromOption(match)])); | ||
if (state[2]) { | ||
continue; | ||
} else { | ||
return 0; | ||
} | ||
} else { | ||
state[0] = !0; | ||
return sink(0); | ||
} | ||
} | ||
})(); | ||
state[1] = !1; | ||
return 0; | ||
} | ||
} | ||
} | ||
]) | ||
); | ||
})(sink, function() { | ||
return makeTrampoline(sink, function() { | ||
return queue.shift(); | ||
@@ -315,34 +311,10 @@ }); | ||
var size = arr.length; | ||
var state = [0, !1, !1, !1]; | ||
return sink( | ||
__(0, [ | ||
function(signal) { | ||
var match = state[2]; | ||
if (signal) { | ||
state[1] = !0; | ||
return 0; | ||
} else if (match) { | ||
state[3] = !0; | ||
return 0; | ||
} else { | ||
state[3] = !0; | ||
state[2] = !0; | ||
while (state[3] && !state[1]) { | ||
var index = state[0]; | ||
if (index < size) { | ||
var x = arr[index]; | ||
state[0] = (index + 1) | 0; | ||
state[3] = !1; | ||
sink(__(1, [x])); | ||
} else { | ||
state[1] = !0; | ||
sink(0); | ||
} | ||
} | ||
state[2] = !1; | ||
return 0; | ||
} | ||
} | ||
]) | ||
); | ||
var index = [0]; | ||
return makeTrampoline(sink, function() { | ||
if (index[0] < size) { | ||
var x = arr[index[0]]; | ||
index[0] = (index[0] + 1) | 0; | ||
return some(x); | ||
} | ||
}); | ||
}; | ||
@@ -636,33 +608,10 @@ } | ||
return function(sink) { | ||
var state = [ls, !1, !1, !1]; | ||
return sink( | ||
__(0, [ | ||
function(signal) { | ||
var match = state[2]; | ||
if (signal) { | ||
state[1] = !0; | ||
return 0; | ||
} else if (match) { | ||
state[3] = !0; | ||
return 0; | ||
} else { | ||
state[3] = !0; | ||
state[2] = !0; | ||
while (state[3] && !state[1]) { | ||
var match$1 = state[0]; | ||
if (match$1) { | ||
state[0] = match$1[1]; | ||
state[3] = !1; | ||
sink(__(1, [match$1[0]])); | ||
} else { | ||
state[1] = !0; | ||
sink(0); | ||
} | ||
} | ||
state[2] = !1; | ||
return 0; | ||
} | ||
} | ||
]) | ||
); | ||
var value = [ls]; | ||
return makeTrampoline(sink, function() { | ||
var match = value[0]; | ||
if (match) { | ||
value[0] = match[1]; | ||
return some(match[0]); | ||
} | ||
}); | ||
}; | ||
@@ -1466,2 +1415,23 @@ }; | ||
var toArray$2 = function toArray(source) { | ||
var state = [new Array(), talkbackPlaceholder, void 0, !1]; | ||
_1(source, function(signal) { | ||
if ('number' == typeof signal) { | ||
state[3] = !0; | ||
return 0; | ||
} else if (signal.tag) { | ||
state[0].push(signal[0]); | ||
return state[1](0); | ||
} else { | ||
var x = signal[0]; | ||
state[1] = x; | ||
return x(0); | ||
} | ||
}); | ||
if (!state[3]) { | ||
state[1](1); | ||
} | ||
return state[0]; | ||
}; | ||
var debounce$2 = function debounce(f) { | ||
@@ -1927,2 +1897,4 @@ return function(source) { | ||
exports.toArray = toArray$2; | ||
exports.toCallbag = toCallbag$2; | ||
@@ -1929,0 +1901,0 @@ |
@@ -115,2 +115,23 @@ 'use strict'; | ||
function testSourceOperator(source) { | ||
var res = /* array */[]; | ||
var innerSource = function (sink) { | ||
return Curry._1(source, (function (signal) { | ||
if (typeof signal === "number" || signal.tag) { | ||
return sink(signal); | ||
} else { | ||
var outerTalkback = signal[0]; | ||
return sink(/* Start */Block.__(0, [(function (talkback) { | ||
res.push(talkback); | ||
return outerTalkback(talkback); | ||
})])); | ||
} | ||
})); | ||
}; | ||
return /* tuple */[ | ||
res, | ||
innerSource | ||
]; | ||
} | ||
function observableFromArray(arr) { | ||
@@ -127,4 +148,5 @@ return ZenObservable.from(arr); | ||
exports.testSource = testSource; | ||
exports.testSourceOperator = testSourceOperator; | ||
exports.observableFromArray = observableFromArray; | ||
exports.observableFrom = observableFrom; | ||
/* zen-observable Not a pure module */ |
'use strict'; | ||
var Block = require("bs-platform/lib/js/block.js"); | ||
var Caml_option = require("bs-platform/lib/js/caml_option.js"); | ||
var Wonka_helpers = require("../wonka_helpers.js"); | ||
@@ -8,35 +9,11 @@ function fromArray(arr) { | ||
var size = arr.length; | ||
var state = /* record */[ | ||
/* index */0, | ||
/* ended */false, | ||
/* looping */false, | ||
/* pull */false | ||
]; | ||
return sink(/* Start */Block.__(0, [(function (signal) { | ||
var match = state[/* looping */2]; | ||
if (signal) { | ||
state[/* ended */1] = true; | ||
return /* () */0; | ||
} else if (match) { | ||
state[/* pull */3] = true; | ||
return /* () */0; | ||
} else { | ||
state[/* pull */3] = true; | ||
state[/* looping */2] = true; | ||
while(state[/* pull */3] && !state[/* ended */1]) { | ||
var index = state[/* index */0]; | ||
if (index < size) { | ||
var x = arr[index]; | ||
state[/* index */0] = index + 1 | 0; | ||
state[/* pull */3] = false; | ||
sink(/* Push */Block.__(1, [x])); | ||
} else { | ||
state[/* ended */1] = true; | ||
sink(/* End */0); | ||
} | ||
}; | ||
state[/* looping */2] = false; | ||
return /* () */0; | ||
} | ||
})])); | ||
var index = /* record */[/* contents */0]; | ||
return Wonka_helpers.makeTrampoline(sink, (function () { | ||
if (index[0] < size) { | ||
var x = arr[index[0]]; | ||
index[0] = index[0] + 1 | 0; | ||
return Caml_option.some(x); | ||
} | ||
})); | ||
}); | ||
@@ -43,0 +20,0 @@ } |
'use strict'; | ||
var Block = require("bs-platform/lib/js/block.js"); | ||
var Caml_option = require("bs-platform/lib/js/caml_option.js"); | ||
var Wonka_helpers = require("../wonka_helpers.js"); | ||
function fromList(ls) { | ||
return (function (sink) { | ||
var state = /* record */[ | ||
/* value */ls, | ||
/* ended */false, | ||
/* looping */false, | ||
/* pull */false | ||
]; | ||
return sink(/* Start */Block.__(0, [(function (signal) { | ||
var match = state[/* looping */2]; | ||
if (signal) { | ||
state[/* ended */1] = true; | ||
return /* () */0; | ||
} else if (match) { | ||
state[/* pull */3] = true; | ||
return /* () */0; | ||
} else { | ||
state[/* pull */3] = true; | ||
state[/* looping */2] = true; | ||
while(state[/* pull */3] && !state[/* ended */1]) { | ||
var match$1 = state[/* value */0]; | ||
if (match$1) { | ||
state[/* value */0] = match$1[1]; | ||
state[/* pull */3] = false; | ||
sink(/* Push */Block.__(1, [match$1[0]])); | ||
} else { | ||
state[/* ended */1] = true; | ||
sink(/* End */0); | ||
} | ||
}; | ||
state[/* looping */2] = false; | ||
return /* () */0; | ||
} | ||
})])); | ||
var value = /* record */[/* contents */ls]; | ||
return Wonka_helpers.makeTrampoline(sink, (function () { | ||
var match = value[0]; | ||
if (match) { | ||
value[0] = match[1]; | ||
return Caml_option.some(match[0]); | ||
} | ||
})); | ||
}); | ||
@@ -40,0 +18,0 @@ } |
@@ -26,38 +26,29 @@ 'use strict'; | ||
var state = /* record */[ | ||
/* exhausted */false, | ||
/* inLoop */false, | ||
/* gotSignal */false | ||
/* ended */false, | ||
/* looping */false, | ||
/* pull */false | ||
]; | ||
return sink(/* Start */Block.__(0, [(function (signal) { | ||
var match = state[/* exhausted */0]; | ||
if (signal || match) { | ||
var match = state[/* looping */1]; | ||
if (signal) { | ||
state[/* ended */0] = true; | ||
return /* () */0; | ||
} else if (match) { | ||
state[/* pull */2] = true; | ||
return /* () */0; | ||
} else { | ||
state[/* gotSignal */2] = true; | ||
if (state[/* inLoop */1]) { | ||
return 0; | ||
} else { | ||
var explode = function (_param) { | ||
while(true) { | ||
var match = f(); | ||
if (match !== undefined) { | ||
state[/* gotSignal */2] = false; | ||
sink(/* Push */Block.__(1, [Caml_option.valFromOption(match)])); | ||
if (state[/* gotSignal */2]) { | ||
_param = /* () */0; | ||
continue ; | ||
} else { | ||
return 0; | ||
} | ||
} else { | ||
state[/* exhausted */0] = true; | ||
return sink(/* End */0); | ||
} | ||
}; | ||
}; | ||
state[/* inLoop */1] = true; | ||
explode(/* () */0); | ||
state[/* inLoop */1] = false; | ||
return /* () */0; | ||
} | ||
state[/* pull */2] = true; | ||
state[/* looping */1] = true; | ||
while(state[/* pull */2] && !state[/* ended */0]) { | ||
var match$1 = f(); | ||
if (match$1 !== undefined) { | ||
state[/* pull */2] = false; | ||
sink(/* Push */Block.__(1, [Caml_option.valFromOption(match$1)])); | ||
} else { | ||
state[/* ended */0] = true; | ||
sink(/* End */0); | ||
} | ||
}; | ||
state[/* looping */1] = false; | ||
return /* () */0; | ||
} | ||
@@ -64,0 +55,0 @@ })])); |
'use strict'; | ||
var Wonka_sink_publish = require("./sinks/wonka_sink_publish.js"); | ||
var Wonka_sink_toArray = require("./sinks/wonka_sink_toArray.js"); | ||
var Wonka_sink_subscribe = require("./sinks/wonka_sink_subscribe.js"); | ||
@@ -12,5 +13,8 @@ | ||
var toArray = Wonka_sink_toArray.toArray; | ||
exports.publish = publish; | ||
exports.subscribe = subscribe; | ||
exports.forEach = forEach; | ||
exports.toArray = toArray; | ||
/* No side effect */ |
@@ -84,2 +84,4 @@ 'use strict'; | ||
var toArray = Wonka_sinks.toArray; | ||
var debounce = WonkaJs.debounce; | ||
@@ -147,2 +149,3 @@ | ||
exports.forEach = forEach; | ||
exports.toArray = toArray; | ||
exports.debounce = debounce; | ||
@@ -149,0 +152,0 @@ exports.delay = delay; |
{ | ||
"name": "wonka", | ||
"description": "A fast push & pull stream library for Reason, OCaml, and TypeScript", | ||
"version": "3.1.1", | ||
"description": "A fast push & pull stream library for Reason/OCaml, Flow, and TypeScript", | ||
"version": "3.2.0", | ||
"author": "Phil Pluckthun <phil@kitten.sh>", | ||
@@ -11,2 +11,3 @@ "source": "./src/index.js", | ||
"types": "./src/index.d.ts", | ||
"sideEffects": false, | ||
"files": [ | ||
@@ -49,4 +50,6 @@ "src", | ||
"repository": "https://github.com/kitten/wonka", | ||
"homepage": "https://github.com/kitten/wonka", | ||
"bugs": "https://github.com/kitten/wonka/issues", | ||
"homepage": "https://wonka.kitten.sh", | ||
"bugs": { | ||
"url": "https://github.com/kitten/wonka/issues" | ||
}, | ||
"license": "MIT", | ||
@@ -56,3 +59,3 @@ "dependencies": {}, | ||
"@glennsl/bs-jest": "^0.4.8", | ||
"bs-platform": "^5.0.4", | ||
"bs-platform": "^5.0.6", | ||
"callbag-from-iter": "^1.2.0", | ||
@@ -62,19 +65,19 @@ "callbag-from-obs": "^1.2.0", | ||
"codecov": "^3.5.0", | ||
"flowgen": "^1.8.0", | ||
"gatsby": "^2.11.0", | ||
"gatsby-plugin-netlify": "^2.1.0", | ||
"gatsby-theme-docs-system": "^0.2.0", | ||
"globby": "^9.2.0", | ||
"husky": "^1.3.1", | ||
"lint-staged": "^8.1.6", | ||
"flowgen": "^1.9.2", | ||
"gatsby": "^2.13.41", | ||
"gatsby-plugin-netlify": "^2.1.3", | ||
"gatsby-theme-docs-system": "^0.2.2", | ||
"globby": "^10.0.1", | ||
"husky": "^3.0.1", | ||
"lint-staged": "^9.2.1", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^1.17.0", | ||
"prettier": "^1.18.2", | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"rollup": "^1.11.3", | ||
"rollup-plugin-buble": "^0.19.6", | ||
"rollup-plugin-commonjs": "^9.3.4", | ||
"rollup-plugin-node-resolve": "^4.2.3", | ||
"rollup": "^1.17.0", | ||
"rollup-plugin-buble": "^0.19.8", | ||
"rollup-plugin-commonjs": "^10.0.1", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-prettier": "^0.6.0", | ||
"rollup-plugin-terser": "^4.0.4", | ||
"rollup-plugin-terser": "^5.1.1", | ||
"typescript": "^3.5.3", | ||
@@ -81,0 +84,0 @@ "zen-observable": "^0.8.14" |
import * as Block from "bs-platform/lib/es6/block.js"; | ||
import * as Caml_option from "bs-platform/lib/es6/caml_option.js"; | ||
import * as Wonka_helpers from "../wonka_helpers.js"; | ||
@@ -8,35 +9,11 @@ function fromArray(arr) { | ||
var size = arr.length; | ||
var state = /* record */[ | ||
/* index */0, | ||
/* ended */false, | ||
/* looping */false, | ||
/* pull */false | ||
]; | ||
return sink(/* Start */Block.__(0, [(function (signal) { | ||
var match = state[/* looping */2]; | ||
if (signal) { | ||
state[/* ended */1] = true; | ||
return /* () */0; | ||
} else if (match) { | ||
state[/* pull */3] = true; | ||
return /* () */0; | ||
} else { | ||
state[/* pull */3] = true; | ||
state[/* looping */2] = true; | ||
while(state[/* pull */3] && !state[/* ended */1]) { | ||
var index = state[/* index */0]; | ||
if (index < size) { | ||
var x = arr[index]; | ||
state[/* index */0] = index + 1 | 0; | ||
state[/* pull */3] = false; | ||
sink(/* Push */Block.__(1, [x])); | ||
} else { | ||
state[/* ended */1] = true; | ||
sink(/* End */0); | ||
} | ||
}; | ||
state[/* looping */2] = false; | ||
return /* () */0; | ||
} | ||
})])); | ||
var index = /* record */[/* contents */0]; | ||
return Wonka_helpers.makeTrampoline(sink, (function () { | ||
if (index[0] < size) { | ||
var x = arr[index[0]]; | ||
index[0] = index[0] + 1 | 0; | ||
return Caml_option.some(x); | ||
} | ||
})); | ||
}); | ||
@@ -43,0 +20,0 @@ } |
import * as Block from "bs-platform/lib/es6/block.js"; | ||
import * as Caml_option from "bs-platform/lib/es6/caml_option.js"; | ||
import * as Wonka_helpers from "../wonka_helpers.js"; | ||
function fromList(ls) { | ||
return (function (sink) { | ||
var state = /* record */[ | ||
/* value */ls, | ||
/* ended */false, | ||
/* looping */false, | ||
/* pull */false | ||
]; | ||
return sink(/* Start */Block.__(0, [(function (signal) { | ||
var match = state[/* looping */2]; | ||
if (signal) { | ||
state[/* ended */1] = true; | ||
return /* () */0; | ||
} else if (match) { | ||
state[/* pull */3] = true; | ||
return /* () */0; | ||
} else { | ||
state[/* pull */3] = true; | ||
state[/* looping */2] = true; | ||
while(state[/* pull */3] && !state[/* ended */1]) { | ||
var match$1 = state[/* value */0]; | ||
if (match$1) { | ||
state[/* value */0] = match$1[1]; | ||
state[/* pull */3] = false; | ||
sink(/* Push */Block.__(1, [match$1[0]])); | ||
} else { | ||
state[/* ended */1] = true; | ||
sink(/* End */0); | ||
} | ||
}; | ||
state[/* looping */2] = false; | ||
return /* () */0; | ||
} | ||
})])); | ||
var value = /* record */[/* contents */ls]; | ||
return Wonka_helpers.makeTrampoline(sink, (function () { | ||
var match = value[0]; | ||
if (match) { | ||
value[0] = match[1]; | ||
return Caml_option.some(match[0]); | ||
} | ||
})); | ||
}); | ||
@@ -40,0 +18,0 @@ } |
@@ -26,38 +26,29 @@ | ||
var state = /* record */[ | ||
/* exhausted */false, | ||
/* inLoop */false, | ||
/* gotSignal */false | ||
/* ended */false, | ||
/* looping */false, | ||
/* pull */false | ||
]; | ||
return sink(/* Start */Block.__(0, [(function (signal) { | ||
var match = state[/* exhausted */0]; | ||
if (signal || match) { | ||
var match = state[/* looping */1]; | ||
if (signal) { | ||
state[/* ended */0] = true; | ||
return /* () */0; | ||
} else if (match) { | ||
state[/* pull */2] = true; | ||
return /* () */0; | ||
} else { | ||
state[/* gotSignal */2] = true; | ||
if (state[/* inLoop */1]) { | ||
return 0; | ||
} else { | ||
var explode = function (_param) { | ||
while(true) { | ||
var match = f(); | ||
if (match !== undefined) { | ||
state[/* gotSignal */2] = false; | ||
sink(/* Push */Block.__(1, [Caml_option.valFromOption(match)])); | ||
if (state[/* gotSignal */2]) { | ||
_param = /* () */0; | ||
continue ; | ||
} else { | ||
return 0; | ||
} | ||
} else { | ||
state[/* exhausted */0] = true; | ||
return sink(/* End */0); | ||
} | ||
}; | ||
}; | ||
state[/* inLoop */1] = true; | ||
explode(/* () */0); | ||
state[/* inLoop */1] = false; | ||
return /* () */0; | ||
} | ||
state[/* pull */2] = true; | ||
state[/* looping */1] = true; | ||
while(state[/* pull */2] && !state[/* ended */0]) { | ||
var match$1 = f(); | ||
if (match$1 !== undefined) { | ||
state[/* pull */2] = false; | ||
sink(/* Push */Block.__(1, [Caml_option.valFromOption(match$1)])); | ||
} else { | ||
state[/* ended */0] = true; | ||
sink(/* End */0); | ||
} | ||
}; | ||
state[/* looping */1] = false; | ||
return /* () */0; | ||
} | ||
@@ -64,0 +55,0 @@ })])); |
import * as Wonka_sink_publish from "./sinks/wonka_sink_publish.js"; | ||
import * as Wonka_sink_toArray from "./sinks/wonka_sink_toArray.js"; | ||
import * as Wonka_sink_subscribe from "./sinks/wonka_sink_subscribe.js"; | ||
@@ -12,2 +13,4 @@ | ||
var toArray = Wonka_sink_toArray.toArray; | ||
export { | ||
@@ -17,4 +20,5 @@ publish , | ||
forEach , | ||
toArray , | ||
} | ||
/* No side effect */ |
@@ -34,3 +34,4 @@ /* sources */ | ||
export * from './sinks/wonka_sink_subscribe'; | ||
export * from './sinks/wonka_sink_toArray'; | ||
export * from './web/wonkaJs'; |
@@ -84,2 +84,4 @@ | ||
var toArray = Wonka_sinks.toArray; | ||
var debounce = WonkaJs.debounce; | ||
@@ -148,2 +150,3 @@ | ||
forEach , | ||
toArray , | ||
debounce , | ||
@@ -150,0 +153,0 @@ delay , |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
561426
316
11925
0