Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wonka

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wonka - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

src/web/wonkaJs.d.ts

20

bsconfig.json

@@ -6,9 +6,11 @@ {

"refmt": 3,
"package-specs": [{
"module": "commonjs",
"in-source": false
}, {
"module": "es6",
"in-source": false
}],
"package-specs": [
{
"module": "commonjs"
},
{
"module": "es6",
"in-source": true
}
],
"sources": [

@@ -27,3 +29,5 @@ {

],
"bs-dependencies" : [],
"bs-dependencies" : [
"bs-rebel"
],
"bs-dev-dependencies": [

@@ -30,0 +34,0 @@ "@glennsl/bs-jest"

14

lib/js/__tests__/wonka_thelpers.js

@@ -13,3 +13,3 @@ 'use strict';

sink[0] = x;
return Curry._1(x, /* Start */Block.__(0, [(function (signal) {
return x(/* Start */Block.__(0, [(function (signal) {
signals.push(signal);

@@ -33,7 +33,7 @@ return /* () */0;

return new Promise((function (resolve, param) {
Curry._1(sink[0], /* Push */Block.__(1, [1]));
sink[0](/* Push */Block.__(1, [1]));
setTimeout((function (param) {
Curry._1(sink[0], /* Push */Block.__(1, [2]));
sink[0](/* Push */Block.__(1, [2]));
setTimeout((function (param) {
Curry._1(sink[0], /* End */0);
sink[0](/* End */0);
setTimeout((function (param) {

@@ -59,3 +59,3 @@ return resolve(/* tuple */[

var source = function (x) {
Curry._1(x, /* Start */Block.__(0, [(function (signal) {
x(/* Start */Block.__(0, [(function (signal) {
signals.push(signal);

@@ -81,5 +81,5 @@ return /* () */0;

return new Promise((function (resolve, param) {
Curry._1(sink[0], /* Push */Block.__(1, [1]));
sink[0](/* Push */Block.__(1, [1]));
setTimeout((function (param) {
Curry._1(talkback[0], /* End */1);
talkback[0](/* Close */1);
setTimeout((function (param) {

@@ -86,0 +86,0 @@ return resolve(/* tuple */[

@@ -6,8 +6,9 @@ 'use strict';

var Caml_option = require("bs-platform/lib/js/caml_option.js");
var Wonka_helpers = require("../wonka_helpers.js");
function fromListener(addListener, removeListener, sink) {
var handler = function ($$event) {
return Curry._1(sink, /* Push */Block.__(1, [$$event]));
return sink(/* Push */Block.__(1, [$$event]));
};
Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {

@@ -45,5 +46,5 @@ return Curry._1(removeListener, handler);

i[0] = i[0] + 1 | 0;
return Curry._1(sink, /* Push */Block.__(1, [num]));
return sink(/* Push */Block.__(1, [num]));
}), p);
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {

@@ -62,8 +63,8 @@ clearInterval(id);

if (!ended[0]) {
Curry._1(sink, /* Push */Block.__(1, [value]));
Curry._1(sink, /* End */0);
sink(/* Push */Block.__(1, [value]));
sink(/* End */0);
}
return Promise.resolve(/* () */0);
}));
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {

@@ -98,3 +99,3 @@ ended[0] = true;

} else {
return Curry._1(sink, /* End */0);
return sink(/* End */0);
}

@@ -105,5 +106,5 @@ } else if (signal.tag) {

id[0] = undefined;
Curry._1(sink, signal);
sink(signal);
if (gotEndSignal[0]) {
return Curry._1(sink, /* End */0);
return sink(/* End */0);
} else {

@@ -116,8 +117,8 @@ return 0;

var tb = signal[0];
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {
$$clearTimeout$1(/* () */0);
return Curry._1(tb, /* End */1);
return tb(/* Close */1);
} else {
return Curry._1(tb, signal);
return tb(signal);
}

@@ -144,3 +145,3 @@ })]));

$$clearTimeout$1(/* () */0);
return Curry._1(sink, /* End */0);
return sink(/* End */0);
} else if (signal.tag) {

@@ -157,12 +158,12 @@ if (skip[0]) {

}), Curry._1(throttleF, signal[0])));
return Curry._1(sink, signal);
return sink(signal);
}
} else {
var tb = signal[0];
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {
$$clearTimeout$1(/* () */0);
return Curry._1(tb, /* End */1);
return tb(/* Close */1);
} else {
return Curry._1(tb, signal);
return tb(signal);
}

@@ -188,4 +189,4 @@ })]));

state[/* ended */0] = true;
Curry._1(state[/* notifierTalkback */3], /* End */1);
return Curry._1(sink, /* End */0);
state[/* notifierTalkback */3](/* Close */1);
return sink(/* End */0);
} else if (signal.tag) {

@@ -203,8 +204,8 @@ state[/* value */1] = Caml_option.some(signal[0]);

state[/* ended */0] = true;
Curry._1(state[/* sourceTalkback */2], /* End */1);
return Curry._1(sink, /* End */0);
state[/* sourceTalkback */2](/* Close */1);
return sink(/* End */0);
} else if (signal.tag) {
if (match !== undefined && !state[/* ended */0]) {
state[/* value */1] = undefined;
return Curry._1(sink, /* Push */Block.__(1, [Caml_option.valFromOption(match)]));
return sink(/* Push */Block.__(1, [Caml_option.valFromOption(match)]));
} else {

@@ -218,10 +219,10 @@ return /* () */0;

}));
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {
state[/* ended */0] = true;
Curry._1(state[/* sourceTalkback */2], /* End */1);
return Curry._1(state[/* notifierTalkback */3], /* End */1);
state[/* sourceTalkback */2](/* Close */1);
return state[/* notifierTalkback */3](/* Close */1);
} else {
Curry._1(state[/* sourceTalkback */2], /* Pull */0);
return Curry._1(state[/* notifierTalkback */3], /* Pull */0);
state[/* sourceTalkback */2](/* Pull */0);
return state[/* notifierTalkback */3](/* Pull */0);
}

@@ -233,5 +234,3 @@ })]));

var state = /* record */[
/* talkback */(function (param) {
return /* () */0;
}),
/* talkback */Wonka_helpers.talkbackPlaceholder,
/* active */0,

@@ -255,7 +254,7 @@ /* gotEndSignal */false

if (state[/* gotEndSignal */2] && state[/* active */1] === 0) {
Curry._1(sink, /* End */0);
sink(/* End */0);
} else {
state[/* active */1] = state[/* active */1] - 1 | 0;
}
return Curry._1(sink, signal);
return sink(signal);
}), wait);

@@ -267,7 +266,7 @@ return /* () */0;

}));
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {
state[/* gotEndSignal */2] = true;
if (state[/* active */1] === 0) {
return Curry._1(sink, /* End */0);
return sink(/* End */0);
} else {

@@ -279,3 +278,3 @@ return 0;

} else {
return Curry._1(state[/* talkback */0], signal);
return state[/* talkback */0](signal);
}

@@ -282,0 +281,0 @@ })]));

@@ -30,3 +30,3 @@ 'use strict';

];
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
var match = state[/* exhausted */0];

@@ -45,3 +45,3 @@ if (signal || match) {

state[/* gotSignal */2] = false;
Curry._1(sink, /* Push */Block.__(1, [Caml_option.valFromOption(match)]));
sink(/* Push */Block.__(1, [Caml_option.valFromOption(match)]));
if (state[/* gotSignal */2]) {

@@ -55,3 +55,3 @@ _param = /* () */0;

state[/* exhausted */0] = true;
return Curry._1(sink, /* End */0);
return sink(/* End */0);
}

@@ -58,0 +58,0 @@ };

'use strict';
var $$Array = require("bs-platform/lib/js/array.js");
var Block = require("bs-platform/lib/js/block.js");
var Curry = require("bs-platform/lib/js/curry.js");
var Array_js = require("bs-rebel/lib/js/src/js/Array_js.js");
var Caml_option = require("bs-platform/lib/js/caml_option.js");
var Wonka_helpers = require("./wonka_helpers.js");
var Belt_MutableQueue = require("bs-platform/lib/js/belt_MutableQueue.js");
var Belt_MutableMapInt = require("bs-platform/lib/js/belt_MutableMapInt.js");
function create(gen, sink) {
return Wonka_helpers.makeTrampoline(sink, (function () {
return Curry._1(gen, /* () */0);
}));
function fromList(list_, sink) {
var state = /* record */[
/* value */list_,
/* 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;
}
})]));
}
function fromList(l, sink) {
var restL = /* record */[/* contents */l];
return Wonka_helpers.makeTrampoline(sink, (function () {
var match = restL[0];
if (match) {
restL[0] = match[1];
return Caml_option.some(match[0]);
}
}));
function fromArray(arr, sink) {
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;
}
})]));
}
function fromArray(a, sink) {
var size = a.length;
var i = /* record */[/* contents */0];
return Wonka_helpers.makeTrampoline(sink, (function () {
if (i[0] < size) {
var res = Caml_option.some(a[i[0]]);
i[0] = i[0] + 1 | 0;
return res;
}
}));
}
function fromValue(x, sink) {
var ended = /* record */[/* contents */false];
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal || ended[0]) {

@@ -49,4 +88,4 @@ return /* () */0;

ended[0] = true;
Curry._1(sink, /* Push */Block.__(1, [x]));
return Curry._1(sink, /* End */0);
sink(/* Push */Block.__(1, [x]));
return sink(/* End */0);
}

@@ -57,12 +96,8 @@ })]));

function empty(sink) {
Curry._1(sink, /* Start */Block.__(0, [(function (param) {
return /* () */0;
})]));
return Curry._1(sink, /* End */0);
sink(/* Start */Block.__(0, [Wonka_helpers.talkbackPlaceholder]));
return sink(/* End */0);
}
function never(sink) {
return Curry._1(sink, /* Start */Block.__(0, [(function (param) {
return /* () */0;
})]));
return sink(/* Start */Block.__(0, [Wonka_helpers.talkbackPlaceholder]));
}

@@ -76,3 +111,3 @@

);
return Curry._1(sink, tmp);
return sink(tmp);
}));

@@ -84,5 +119,5 @@ }

if (typeof signal === "number" || !(signal.tag && !Curry._1(f, signal[0]))) {
return Curry._1(sink, signal);
return sink(signal);
} else {
return Curry._1(talkback, /* Pull */0);
return talkback(/* Pull */0);
}

@@ -104,3 +139,3 @@ }));

}
return Curry._1(sink, tmp);
return sink(tmp);
}));

@@ -111,5 +146,3 @@ }

var size = sources.length;
var talkbacks = $$Array.map((function (param) {
return Wonka_helpers.talkbackPlaceholder;
}), sources);
var talkbacks = Array_js.make(size, Wonka_helpers.talkbackPlaceholder);
var state = /* record */[

@@ -124,3 +157,3 @@ /* started */0,

if (i < size) {
Curry._1(talkbacks[i], signal);
talkbacks[i](signal);
_i = i + 1 | 0;

@@ -143,3 +176,3 @@ continue ;

if (state[/* ended */1] === size) {
return Curry._1(sink, /* End */0);
return sink(/* End */0);
} else {

@@ -149,3 +182,3 @@ return 0;

} else if (signal.tag) {
return Curry._1(sink, signal);
return sink(signal);
} else {

@@ -155,3 +188,3 @@ talkbacks[i] = signal[0];

if (state[/* started */0] === size) {
return Curry._1(sink, /* Start */Block.__(0, [talkback]));
return sink(/* Start */Block.__(0, [talkback]));
} else {

@@ -181,3 +214,3 @@ return 0;

} else if (signal.tag) {
return Curry._1(sink, signal);
return sink(signal);
} else {

@@ -187,11 +220,11 @@ var tb = signal[0];

if (i === 0) {
Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return Curry._1(talkback[0], signal);
sink(/* Start */Block.__(0, [(function (signal) {
return talkback[0](signal);
})]));
}
return Curry._1(tb, /* Pull */0);
return tb(/* Pull */0);
}
}));
} else {
return Curry._1(sink, /* End */0);
return sink(/* End */0);
}

@@ -204,30 +237,24 @@ };

var state = /* record */[
/* sinks */Belt_MutableMapInt.make(/* () */0),
/* idCounter */0,
/* sinks */new Array(),
/* talkback */Wonka_helpers.talkbackPlaceholder,
/* ended */false,
/* gotSignal */false
];
return (function (sink) {
var id = state[/* idCounter */1];
Belt_MutableMapInt.set(state[/* sinks */0], id, sink);
state[/* idCounter */1] = state[/* idCounter */1] + 1 | 0;
if (id === 0) {
state[/* sinks */0] = state[/* sinks */0].concat(sink);
if (state[/* sinks */0].length === 1) {
Curry._1(source, (function (signal) {
if (typeof signal === "number") {
state[/* ended */3] = true;
return Belt_MutableMapInt.forEachU(state[/* sinks */0], (function (param, sink) {
return Curry._1(sink, /* End */0);
}));
state[/* sinks */0].forEach((function (sink) {
return sink(/* End */0);
}));
state[/* sinks */0] = new Array();
return /* () */0;
} else if (signal.tag) {
if (state[/* ended */3]) {
return /* () */0;
} else {
state[/* gotSignal */4] = false;
return Belt_MutableMapInt.forEachU(state[/* sinks */0], (function (param, sink) {
return Curry._1(sink, signal);
}));
}
state[/* gotSignal */2] = false;
state[/* sinks */0].forEach((function (sink) {
return sink(signal);
}));
return /* () */0;
} else {
state[/* talkback */2] = signal[0];
state[/* talkback */1] = signal[0];
return /* () */0;

@@ -237,16 +264,17 @@ }

}
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {
Belt_MutableMapInt.remove(state[/* sinks */0], id);
if (Belt_MutableMapInt.isEmpty(state[/* sinks */0])) {
state[/* ended */3] = true;
return Curry._1(state[/* talkback */2], /* End */1);
state[/* sinks */0] = state[/* sinks */0].filter((function (x) {
return x !== sink;
}));
if (state[/* sinks */0].length === 0) {
return state[/* talkback */1](/* Close */1);
} else {
return 0;
}
} else if (state[/* gotSignal */4]) {
} else if (state[/* gotSignal */2]) {
return /* () */0;
} else {
state[/* gotSignal */4] = true;
return Curry._1(state[/* talkback */2], signal);
state[/* gotSignal */2] = true;
return state[/* talkback */1](signal);
}

@@ -277,3 +305,3 @@ })]));

state[/* ended */6] = true;
return Curry._1(sink, /* End */0);
return sink(/* End */0);
}

@@ -288,3 +316,3 @@ } else if (signal.tag) {

state[/* gotSignal */4] = false;
return Curry._1(sink, /* Push */Block.__(1, [/* tuple */[
return sink(/* Push */Block.__(1, [/* tuple */[
a,

@@ -314,3 +342,3 @@ Caml_option.valFromOption(match)

state[/* ended */6] = true;
return Curry._1(sink, /* End */0);
return sink(/* End */0);
}

@@ -325,3 +353,3 @@ } else if (signal.tag) {

state[/* gotSignal */4] = false;
return Curry._1(sink, /* Push */Block.__(1, [/* tuple */[
return sink(/* Push */Block.__(1, [/* tuple */[
Caml_option.valFromOption(match),

@@ -341,3 +369,3 @@ b

}));
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (state[/* ended */6]) {

@@ -347,4 +375,4 @@ return 0;

state[/* ended */6] = true;
Curry._1(state[/* talkbackA */0], /* End */1);
return Curry._1(state[/* talkbackB */1], /* End */1);
state[/* talkbackA */0](/* Close */1);
return state[/* talkbackB */1](/* Close */1);
} else if (state[/* gotSignal */4]) {

@@ -354,4 +382,4 @@ return /* () */0;

state[/* gotSignal */4] = true;
Curry._1(state[/* talkbackA */0], signal);
return Curry._1(state[/* talkbackB */1], signal);
state[/* talkbackA */0](signal);
return state[/* talkbackB */1](signal);
}

@@ -370,3 +398,3 @@ })]));

state[/* taken */0] = max;
return Curry._1(sink, /* End */0);
return sink(/* End */0);
} else {

@@ -378,6 +406,6 @@ return /* () */0;

state[/* taken */0] = state[/* taken */0] + 1 | 0;
Curry._1(sink, signal);
sink(signal);
if (state[/* taken */0] === max) {
Curry._1(sink, /* End */0);
return Curry._1(state[/* talkback */1], /* End */1);
sink(/* End */0);
return state[/* talkback */1](/* Close */1);
} else {

@@ -394,9 +422,9 @@ return 0;

}));
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (state[/* taken */0] < max) {
if (signal) {
state[/* taken */0] = max;
return Curry._1(state[/* talkback */1], /* End */1);
return state[/* talkback */1](/* Close */1);
} else {
return Curry._1(state[/* talkback */1], /* Pull */0);
return state[/* talkback */1](/* Pull */0);
}

@@ -410,17 +438,17 @@ } else {

function takeLast(max, source, sink) {
var queue = Belt_MutableQueue.make(/* () */0);
var queue = new Array();
return Wonka_helpers.captureTalkback(source, (function (signal, talkback) {
if (typeof signal === "number") {
return Wonka_helpers.makeTrampoline(sink, (function () {
return Belt_MutableQueue.pop(queue);
return queue.shift();
}));
} else if (signal.tag) {
var size = Belt_MutableQueue.size(queue);
var size = queue.length;
if (size >= max && max > 0) {
Belt_MutableQueue.pop(queue);
queue.shift();
}
Belt_MutableQueue.add(queue, signal[0]);
return Curry._1(talkback, /* Pull */0);
queue.push(signal[0]);
return talkback(/* Pull */0);
} else {
return Curry._1(talkback, /* Pull */0);
return talkback(/* Pull */0);
}

@@ -439,3 +467,3 @@ }));

ended[0] = true;
return Curry._1(sink, /* End */0);
return sink(/* End */0);
}

@@ -446,14 +474,14 @@ } else if (signal.tag) {

} else if (Curry._1(predicate, signal[0])) {
return Curry._1(sink, signal);
return sink(signal);
} else {
ended[0] = true;
Curry._1(sink, /* End */0);
return Curry._1(talkback[0], /* End */1);
sink(/* End */0);
return talkback[0](/* Close */1);
}
} else {
talkback[0] = signal[0];
return Curry._1(sink, signal);
return sink(signal);
}
}));
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (ended[0]) {

@@ -463,5 +491,5 @@ return 0;

ended[0] = true;
return Curry._1(talkback[0], /* End */1);
return talkback[0](/* Close */1);
} else {
return Curry._1(talkback[0], /* Pull */0);
return talkback[0](/* Pull */0);
}

@@ -482,5 +510,5 @@ })]));

} else {
Curry._1(state[/* notifierTalkback */2], /* End */1);
state[/* notifierTalkback */2](/* Close */1);
state[/* ended */0] = true;
return Curry._1(sink, /* End */0);
return sink(/* End */0);
}

@@ -491,3 +519,3 @@ } else if (signal.tag) {

} else {
return Curry._1(sink, signal);
return sink(signal);
}

@@ -501,9 +529,9 @@ } else {

state[/* ended */0] = true;
Curry._1(state[/* notifierTalkback */2], /* End */1);
Curry._1(state[/* sourceTalkback */1], /* End */1);
return Curry._1(sink, /* End */0);
state[/* notifierTalkback */2](/* Close */1);
state[/* sourceTalkback */1](/* Close */1);
return sink(/* End */0);
} else {
var innerTb = signal[0];
state[/* notifierTalkback */2] = innerTb;
return Curry._1(innerTb, /* Pull */0);
return innerTb(/* Pull */0);
}

@@ -513,10 +541,10 @@ }));

}));
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (state[/* ended */0]) {
return 0;
} else if (signal) {
Curry._1(state[/* sourceTalkback */1], /* End */1);
return Curry._1(state[/* notifierTalkback */2], /* End */1);
state[/* sourceTalkback */1](/* Close */1);
return state[/* notifierTalkback */2](/* Close */1);
} else {
return Curry._1(state[/* sourceTalkback */1], /* Pull */0);
return state[/* sourceTalkback */1](/* Pull */0);
}

@@ -530,6 +558,6 @@ })]));

if (typeof signal === "number" || !(signal.tag && rest[0] > 0)) {
return Curry._1(sink, signal);
return sink(signal);
} else {
rest[0] = rest[0] - 1 | 0;
return Curry._1(talkback, /* Pull */0);
return talkback(/* Pull */0);
}

@@ -543,8 +571,8 @@ }));

if (typeof signal === "number" || !(signal.tag && skip[0])) {
return Curry._1(sink, signal);
return sink(signal);
} else if (Curry._1(predicate, signal[0])) {
return Curry._1(talkback, /* Pull */0);
return talkback(/* Pull */0);
} else {
skip[0] = false;
return Curry._1(sink, signal);
return sink(signal);
}

@@ -565,9 +593,9 @@ }));

if (state[/* skip */0]) {
Curry._1(state[/* notifierTalkback */4], /* End */1);
state[/* notifierTalkback */4](/* Close */1);
}
state[/* ended */1] = true;
return Curry._1(sink, /* End */0);
return sink(/* End */0);
} else if (signal.tag) {
if (state[/* skip */0] && !state[/* ended */1]) {
return Curry._1(state[/* sourceTalkback */3], /* Pull */0);
return state[/* sourceTalkback */3](/* Pull */0);
} else if (state[/* ended */1]) {

@@ -577,3 +605,3 @@ return /* () */0;

state[/* gotSignal */2] = false;
return Curry._1(sink, signal);
return sink(signal);
}

@@ -588,8 +616,8 @@ } else {

state[/* skip */0] = false;
return Curry._1(state[/* notifierTalkback */4], /* End */1);
return state[/* notifierTalkback */4](/* Close */1);
} else {
var innerTb = signal[0];
state[/* notifierTalkback */4] = innerTb;
Curry._1(innerTb, /* Pull */0);
return Curry._1(tb, /* Pull */0);
innerTb(/* Pull */0);
return tb(/* Pull */0);
}

@@ -599,12 +627,12 @@ }));

}));
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {
if (state[/* skip */0]) {
Curry._1(state[/* notifierTalkback */4], /* End */1);
state[/* notifierTalkback */4](/* Close */1);
}
state[/* ended */1] = true;
return Curry._1(state[/* sourceTalkback */3], /* End */1);
return state[/* sourceTalkback */3](/* Close */1);
} else if (!state[/* gotSignal */2] && !state[/* ended */1]) {
state[/* gotSignal */2] = true;
return Curry._1(state[/* sourceTalkback */3], /* Pull */0);
return state[/* sourceTalkback */3](/* Pull */0);
} else {

@@ -626,3 +654,3 @@ return /* () */0;

if (state[/* innerEnded */3]) {
return Curry._1(sink, /* End */0);
return sink(/* End */0);
} else {

@@ -637,17 +665,17 @@ state[/* sourceEnded */2] = true;

if (state[/* sourceEnded */2]) {
return Curry._1(state[/* sourceTalkback */0], /* End */1);
return state[/* sourceTalkback */0](/* Close */1);
} else {
state[/* innerEnded */3] = true;
return Curry._1(state[/* sourceTalkback */0], /* Pull */0);
return state[/* sourceTalkback */0](/* Pull */0);
}
} else if (signal.tag) {
return Curry._1(sink, signal);
return sink(signal);
} else {
var tb = signal[0];
if (!state[/* innerEnded */3]) {
Curry._1(state[/* innerTalkback */1], /* End */1);
state[/* innerTalkback */1](/* Close */1);
}
state[/* innerEnded */3] = false;
state[/* innerTalkback */1] = tb;
return Curry._1(tb, /* Pull */0);
return tb(/* Pull */0);
}

@@ -660,12 +688,12 @@ }));

}));
return Curry._1(sink, /* Start */Block.__(0, [(function (signal) {
return sink(/* Start */Block.__(0, [(function (signal) {
if (signal) {
Curry._1(state[/* sourceTalkback */0], /* End */1);
return Curry._1(state[/* innerTalkback */1], /* End */1);
state[/* sourceTalkback */0](/* Close */1);
return state[/* innerTalkback */1](/* Close */1);
} else if (!state[/* innerEnded */3] && !state[/* sourceEnded */2]) {
return Curry._1(state[/* innerTalkback */1], /* Pull */0);
return state[/* innerTalkback */1](/* Pull */0);
} else if (state[/* sourceEnded */2]) {
return /* () */0;
} else {
return Curry._1(state[/* sourceTalkback */0], /* Pull */0);
return state[/* sourceTalkback */0](/* Pull */0);
}

@@ -681,5 +709,5 @@ })]));

Curry._1(f, signal[0]);
return Curry._1(talkback, /* Pull */0);
return talkback(/* Pull */0);
} else {
return Curry._1(talkback, /* Pull */0);
return talkback(/* Pull */0);
}

@@ -700,7 +728,7 @@ }));

Curry._1(f, signal[0]);
return Curry._1(talkback[0], /* Pull */0);
return talkback[0](/* Pull */0);
}
} else {
talkback[0] = signal[0];
return Curry._1(talkback[0], /* Pull */0);
return talkback[0](/* Pull */0);
}

@@ -713,3 +741,3 @@ }));

ended[0] = true;
return Curry._1(talkback[0], /* End */1);
return talkback[0](/* Close */1);
}

@@ -719,3 +747,5 @@ });

exports.create = create;
var Types = 0;
exports.Types = Types;
exports.fromList = fromList;

@@ -722,0 +752,0 @@ exports.fromArray = fromArray;

{
"name": "wonka",
"version": "1.0.0",
"version": "1.0.1",
"author": "Phil Pluckthun <phil@kitten.sh>",
"main": "./dist/wonka.js",
"module": "./dist/wonka.m.js",
"main": "./lib/js/src/wonka.js",
"module": "./src/wonka.js",
"jsnext:main": "./src/wonka.js",
"types": "./src/wonka.d.ts",
"files": [
"dist",
"src",
"lib/es6",
"lib/js",

@@ -23,7 +23,3 @@ "docs/*.md",

"test:watch": "jest --watch",
"prebundle": "run-s build",
"bundle": "microbundle -i ./.index.js",
"prebundlesize": "run-s bundle",
"bundlesize": "bundlesize",
"prepublishOnly": "run-s clean build test bundle"
"prepublishOnly": "run-s clean build test"
},

@@ -44,2 +40,5 @@ "keywords": [

"license": "MIT",
"dependencies": {
"bs-rebel": "^0.2.2"
},
"peerDependencies": {

@@ -51,5 +50,3 @@ "bs-platform": ">=2.2.0"

"bs-platform": "^4.0.17",
"bundlesize": "^0.16.0",
"coveralls": "^3.0.0",
"microbundle": "^0.4.4",
"npm-run-all": "^4.1.2"

@@ -62,3 +59,3 @@ },

"testMatch": [
"**/__tests__/*_test.js"
"**/lib/js/__tests__/*_test.js"
],

@@ -68,9 +65,3 @@ "modulePathIgnorePatterns": [

]
},
"bundlesize": [
{
"path": "./dist/wonka.js",
"maxSize": "4 kB"
}
]
}
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc