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 5.0.0-rc.1 to 6.0.0

dist/types/callbag.d.ts

2176

dist/wonka.js

@@ -1,314 +0,329 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: !0
});
function talkbackPlaceholder(a) {}
var talkbackPlaceholder = e => {};
function fromArray(a) {
return function (b) {
var c = a.length;
let e = !1,
d = !1,
f = !1,
g = 0;
b({
TAG: 0,
_0: function (h) {
if (h) {
e = !0;
} else if (d) {
f = !0;
} else {
for (d = f = !0; f && !e; ) {
g < c
? ((h = a[g]),
(g = (g + 1) | 0),
(f = !1),
b({
TAG: 1,
_0: h,
}))
: ((e = !0), b(0));
}
d = !1;
}
},
});
};
function start(e) {
var r = [ e ];
r.tag = 0;
return r;
}
function _ref() {}
function _ref4(a) {
a(0);
function push(e) {
var r = [ e ];
r.tag = 1;
return r;
}
function empty(a) {
let b = !1;
a({
TAG: 0,
_0: function (c) {
c ? (b = !0) : b || a(0);
},
});
}
function some(a) {
return void 0 === a
? {
BS_PRIVATE_NESTED_SOME_NONE: 0,
function fromArray(e) {
return r => {
var t = !1;
var i = !1;
var s = !1;
var f = 0;
r(start((a => {
if (1 === a) {
t = !0;
} else if (i) {
s = !0;
} else {
for (s = i = !0; s && !t; f++) {
if (f < e.length) {
s = !1;
r(push(e[f]));
} else {
t = !0;
r(0);
}
}
i = !1;
}
: null !== a && void 0 !== a.BS_PRIVATE_NESTED_SOME_NONE
? {
BS_PRIVATE_NESTED_SOME_NONE: (a.BS_PRIVATE_NESTED_SOME_NONE + 1) | 0,
}
: a;
})));
};
}
function valFromOption(a) {
if (null === a || void 0 === a.BS_PRIVATE_NESTED_SOME_NONE) {
return a;
}
if (0 !== (a = a.BS_PRIVATE_NESTED_SOME_NONE)) {
return {
BS_PRIVATE_NESTED_SOME_NONE: (a - 1) | 0,
};
}
}
var identity = e => e;
function concatMap(a) {
return function (b) {
return function (c) {
function e(b) {
'number' == typeof b
? k &&
((k = !1),
void 0 !== (b = d.shift())
? ((b = a(valFromOption(b))), (k = !0), b(e))
: m
? c(0)
: g || ((g = !0), f(0)))
: b.TAG
? k && (c(b), l ? (l = !1) : h(0))
: ((h = b = b._0), (l = !1), b(0));
}
let d = [],
f = talkbackPlaceholder,
g = !1,
h = talkbackPlaceholder,
k = !1,
l = !1,
m = !1;
b(function (b) {
'number' == typeof b
? m ||
((m = !0),
!k &&
(function (a) {
return 0 === a.length;
})(d) &&
c(0))
: b.TAG
? m || ((b = b._0), (g = !1), k ? d.push(b) : ((b = a(b)), (k = !0), b(e)))
: (f = b._0);
});
c({
TAG: 0,
_0: function (c) {
if (c) {
if ((m || ((m = !0), f(1)), k)) {
return (k = !1), h(1);
function concatMap(e) {
return r => t => {
var i = [];
var s = talkbackPlaceholder;
var f = talkbackPlaceholder;
var a = !1;
var l = !1;
var n = !1;
var o = !1;
function applyInnerSource(r) {
n = !0;
r((r => {
if (0 === r) {
if (n) {
n = !1;
if (i.length) {
applyInnerSource(e(i.shift()));
} else if (o) {
t(0);
} else if (!a) {
a = !0;
s(0);
}
}
} else if (0 === r.tag) {
l = !1;
(f = r[0])(0);
} else if (n) {
t(r);
if (l) {
l = !1;
} else {
m || g || ((g = !0), f(0)), k && !l && ((l = !0), h(0));
f(0);
}
},
});
};
}
}));
}
r((r => {
if (o) {} else if (0 === r) {
o = !0;
if (!n && !i.length) {
t(0);
}
} else if (0 === r.tag) {
s = r[0];
} else {
a = !1;
if (n) {
i.push(r[0]);
} else {
applyInnerSource(e(r[0]));
}
}
}));
t(start((e => {
if (1 === e) {
if (!o) {
o = !0;
s(1);
}
if (n) {
n = !1;
f(1);
}
} else {
if (!o && !a) {
a = !0;
s(0);
}
if (n && !l) {
l = !0;
f(0);
}
}
})));
};
}
function _ref3(a) {
return a;
function concatAll(e) {
return concatMap(identity)(e);
}
function _ref4$1(a) {
return a;
}
function _ref7(a) {
return a(0);
}
function mergeMap(a) {
return function (b) {
return function (c) {
let e = talkbackPlaceholder,
d = !1,
f = [],
g = !1;
b(function (b) {
'number' == typeof b
? g || ((g = !0), 0 === f.length && c(0))
: b.TAG
? g ||
((d = !1),
(function (a) {
function b(c) {
return c !== k;
function mergeMap(e) {
return r => t => {
var i = [];
var s = talkbackPlaceholder;
var f = !1;
var a = !1;
r((r => {
if (a) {} else if (0 === r) {
a = !0;
if (!i.length) {
t(0);
}
} else if (0 === r.tag) {
s = r[0];
} else {
f = !1;
!function applyInnerSource(e) {
var r = talkbackPlaceholder;
e((e => {
if (0 === e) {
if (i.length) {
var l = i.indexOf(r);
if (l > -1) {
(i = i.slice()).splice(l, 1);
}
if (!i.length) {
if (a) {
t(0);
} else if (!f) {
f = !0;
s(0);
}
}
}
var h = function (a) {
'number' == typeof a
? 0 !== f.length &&
((f = f.filter(b)),
(a = 0 === f.length),
g && a ? c(0) : !d && a && ((d = !0), e(0)))
: a.TAG
? 0 !== f.length &&
(c({
TAG: 1,
_0: a._0,
}),
k(0))
: ((k = a = a._0), (f = f.concat(a)), a(0));
};
let k = talkbackPlaceholder;
1 === a.length ? a(h) : a.bind(null, h);
})(a(b._0)),
d || ((d = !0), e(0)))
: (e = b._0);
});
c({
TAG: 0,
_0: function (a) {
a
? (g || ((g = !0), e(a)),
f.forEach(function (c) {
return c(a);
}),
(f = []))
: (d || g ? (d = !1) : ((d = !0), e(0)), f.forEach(_ref7));
},
});
};
} else if (0 === e.tag) {
i.push(r = e[0]);
r(0);
} else if (i.length) {
t(e);
r(0);
}
}));
}(e(r[0]));
if (!f) {
f = !0;
s(0);
}
}
}));
t(start((e => {
if (1 === e) {
if (!a) {
a = !0;
s(1);
}
for (var r = 0, t = i, l = i.length; r < l; r++) {
t[r](1);
}
i.length = 0;
} else {
if (!a && !f) {
f = !0;
s(0);
} else {
f = !1;
}
for (var n = 0, o = i, u = i.length; n < u; n++) {
o[n](0);
}
}
})));
};
}
function _ref8(a) {
return a;
function mergeAll(e) {
return mergeMap(identity)(e);
}
function _ref9(a) {
return a;
function onPush(e) {
return r => t => {
var i = !1;
r((r => {
if (i) {} else if (0 === r) {
i = !0;
t(0);
} else if (0 === r.tag) {
var s = r[0];
t(start((e => {
if (1 === e) {
i = !0;
}
s(e);
})));
} else {
e(r[0]);
t(r);
}
}));
};
}
function mergeAll(a) {
return mergeMap(_ref9)(a);
}
function onPush(a) {
return function (b) {
return function (c) {
let e = !1;
return b(function (d) {
if ('number' == typeof d) {
e || ((e = !0), c(d));
} else if (d.TAG) {
e || (a(d._0), c(d));
function switchMap(e) {
return r => t => {
var i = talkbackPlaceholder;
var s = talkbackPlaceholder;
var f = !1;
var a = !1;
var l = !1;
var n = !1;
r((r => {
if (n) {} else if (0 === r) {
n = !0;
if (!l) {
t(0);
}
} else if (0 === r.tag) {
i = r[0];
} else {
if (l) {
s(1);
s = talkbackPlaceholder;
}
if (!f) {
f = !0;
i(0);
} else {
var g = d._0;
c({
TAG: 0,
_0: function (c) {
if (!e) {
return c && (e = !0), g(c);
f = !1;
}
!function applyInnerSource(e) {
l = !0;
e((e => {
if (!l) {} else if (0 === e) {
l = !1;
if (n) {
t(0);
} else if (!f) {
f = !0;
i(0);
}
},
});
} else if (0 === e.tag) {
a = !1;
(s = e[0])(0);
} else {
t(e);
if (!a) {
s(0);
} else {
a = !1;
}
}
}));
}(e(r[0]));
}
}));
t(start((e => {
if (1 === e) {
if (!n) {
n = !0;
i(1);
}
});
};
if (l) {
l = !1;
s(1);
}
} else {
if (!n && !f) {
f = !0;
i(0);
}
if (l && !a) {
a = !0;
s(0);
}
}
})));
};
}
function _ref11(a) {
a(0);
}
function switchMap(a) {
return function (b) {
return function (c) {
function e(a) {
h &&
('number' == typeof a
? ((h = !1), l ? c(a) : f || ((f = !0), d(0)))
: a.TAG
? (c(a), k ? (k = !1) : g(0))
: ((g = a = a._0), (k = !1), a(0)));
function subscribe(e) {
return r => {
var t = talkbackPlaceholder;
var i = !1;
r((r => {
if (0 === r) {
i = !0;
} else if (0 === r.tag) {
(t = r[0])(0);
} else if (!i) {
e(r[0]);
t(0);
}
let d = talkbackPlaceholder,
f = !1,
g = talkbackPlaceholder,
h = !1,
k = !1,
l = !1;
b(function (b) {
'number' == typeof b
? l || ((l = !0), h || c(0))
: b.TAG
? l ||
(h && (g(1), (g = talkbackPlaceholder)),
f ? (f = !1) : ((f = !0), d(0)),
(b = a(b._0)),
(h = !0),
b(e))
: (d = b._0);
});
c({
TAG: 0,
_0: function (a) {
if (a) {
if ((l || ((l = !0), d(1)), h)) {
return (h = !1), g(1);
}
} else {
l || f || ((f = !0), d(0)), h && !k && ((k = !0), g(0));
}
},
});
};
};
}
function _ref16(a) {
return a;
}
function takeLast(a) {
return function (b) {
return function (c) {
let e = [],
d = talkbackPlaceholder;
return b(function (b) {
'number' == typeof b
? fromArray(e)(c)
: b.TAG
? (e.length >= a && 0 < a && e.shift(), e.push(b._0), d(0))
: ((b = b._0), 0 >= a ? (b(1), empty(c)) : ((d = b), b(0)));
});
};
};
}
function subscribe(a) {
return function (b) {
let c = talkbackPlaceholder,
e = !1;
b(function (b) {
'number' == typeof b ? (e = !0) : b.TAG ? e || (a(b._0), c(0)) : ((c = b = b._0), b(0));
});
}));
return {
unsubscribe: function (a) {
if (!e) {
return (e = !0), c(1);
unsubscribe() {
if (!i) {
i = !0;
t(1);
}
},
}
};

@@ -318,902 +333,889 @@ };

function _ref$1(a) {}
var e = "function" == typeof Symbol ? Symbol.observable || (Symbol.observable = Symbol("observable")) : "@@observable";
function _ref$2(a) {}
function _ref2() {}
function _ref3$1() {}
function _ref3$2(a, b, c) {
a.addEventListener(b, c);
}
function _ref4$2(a, b, c) {
a.removeEventListener(b, c);
}
var fromArray$1 = fromArray,
empty$1 = empty,
concatMap$1 = concatMap,
mergeMap$1 = mergeMap,
mergeAll$1 = mergeAll,
flatten$1 = mergeAll,
onPush$1 = onPush,
tap$1 = onPush,
switchMap$1 = switchMap,
takeLast$1 = takeLast,
subscribe$1 = subscribe,
observableSymbol =
'function' == typeof Symbol
? Symbol.observable || (Symbol.observable = Symbol('observable'))
: '@@observable';
exports.buffer = function (a) {
return function (b) {
return function (c) {
function e(a) {
'number' == typeof a
? k ||
((k = !0),
f(1),
0 < d.length &&
c({
TAG: 1,
_0: d,
}),
c(0))
: a.TAG
? !k &&
0 < d.length &&
((a = d),
(d = []),
c({
TAG: 1,
_0: a,
}))
: (g = a._0);
}
let d = [],
f = talkbackPlaceholder,
g = talkbackPlaceholder,
h = !1,
k = !1;
b(function (b) {
'number' == typeof b
? k ||
((k = !0),
g(1),
0 < d.length &&
c({
TAG: 1,
_0: d,
}),
c(0))
: b.TAG
? k || (d.push(b._0), h ? (h = !1) : ((h = !0), f(0), g(0)))
: ((f = b._0), a(e));
});
c({
TAG: 0,
_0: function (c) {
if (!k) {
if (c) {
return (k = !0), f(1), g(1);
exports.buffer = function buffer(e) {
return r => t => {
var i = [];
var s = talkbackPlaceholder;
var f = talkbackPlaceholder;
var a = !1;
var l = !1;
r((r => {
if (l) {} else if (0 === r) {
l = !0;
f(1);
if (i.length) {
t(push(i));
}
t(0);
} else if (0 === r.tag) {
s = r[0];
e((e => {
if (l) {} else if (0 === e) {
l = !0;
s(1);
if (i.length) {
t(push(i));
}
if (!h) {
return (h = !0), f(0), g(0);
}
t(0);
} else if (0 === e.tag) {
f = e[0];
} else if (i.length) {
var r = push(i);
i = [];
t(r);
}
},
});
};
}));
} else {
i.push(r[0]);
if (!a) {
a = !0;
s(0);
f(0);
} else {
a = !1;
}
}
}));
t(start((e => {
if (1 === e && !l) {
l = !0;
s(1);
f(1);
} else if (!l && !a) {
a = !0;
s(0);
f(0);
}
})));
};
};
exports.combine = function (a, b) {
return (function (a, b) {
return function (c) {
let e = talkbackPlaceholder,
d = talkbackPlaceholder,
f = void 0,
g = void 0,
h = !1,
k = 0,
exports.combine = function combine(e, r) {
return t => {
var i;
var s;
var f = talkbackPlaceholder;
var a = talkbackPlaceholder;
var l = !1;
var n = !1;
var o = !1;
e((e => {
if (0 === e) {
if (!n) {
n = !0;
} else {
o = !0;
t(0);
}
} else if (0 === e.tag) {
f = e[0];
} else if (void 0 === s) {
i = e[0];
if (!l) {
a(0);
} else {
l = !1;
}
} else if (!o) {
l = !1;
a(function (a) {
var b = g;
'number' == typeof a
? 1 > k
? (k = (k + 1) | 0)
: l || ((l = !0), c(0))
: a.TAG
? ((a = a._0),
void 0 !== b
? l ||
((f = some(a)),
(h = !1),
c({
TAG: 1,
_0: [a, valFromOption(b)],
}))
: ((f = some(a)), h ? (h = !1) : d(0)))
: (e = a._0);
});
b(function (a) {
var b = f;
'number' == typeof a
? 1 > k
? (k = (k + 1) | 0)
: l || ((l = !0), c(0))
: a.TAG
? ((a = a._0),
void 0 !== b
? l ||
((g = some(a)),
(h = !1),
c({
TAG: 1,
_0: [valFromOption(b), a],
}))
: ((g = some(a)), h ? (h = !1) : e(0)))
: (d = a._0);
});
c({
TAG: 0,
_0: function (c) {
if (!l) {
if (c) {
return (l = !0), e(1), d(1);
}
if (!h) {
return (h = !0), e(c), d(c);
}
}
},
});
};
})(a, b);
t(push([ i = e[0], s ]));
}
}));
r((e => {
if (0 === e) {
if (!n) {
n = !0;
} else {
o = !0;
t(0);
}
} else if (0 === e.tag) {
a = e[0];
} else if (void 0 === i) {
s = e[0];
if (!l) {
f(0);
} else {
l = !1;
}
} else if (!o) {
l = !1;
t(push([ i, s = e[0] ]));
}
}));
t(start((e => {
if (o) {} else if (1 === e) {
o = !0;
f(1);
a(1);
} else if (!l) {
l = !0;
f(0);
a(0);
}
})));
};
};
exports.concat = function (a) {
return concatMap(_ref4$1)(fromArray(a));
exports.concat = function concat(e) {
return concatAll(fromArray(e));
};
exports.concatAll = function (a) {
return concatMap(_ref3)(a);
};
exports.concatAll = concatAll;
exports.concatMap = concatMap$1;
exports.concatMap = concatMap;
exports.debounce = function (a) {
return function (b) {
return function (c) {
let e = void 0,
d = !1,
f = !1;
var g = function (a) {
void 0 !== (a = e) && ((e = void 0), clearTimeout(valFromOption(a)));
};
return b(function (b) {
if ('number' == typeof b) {
f || ((f = !0), void 0 !== e ? (d = !0) : c(0));
} else if (b.TAG) {
f ||
(g(),
(e = some(
setTimeout(function (a) {
e = void 0;
c(b);
d && c(0);
}, a(b._0))
)));
exports.debounce = function debounce(e) {
return r => t => {
var i;
var s = !1;
var f = !1;
r((r => {
if (f) {} else if (0 === r) {
f = !0;
if (i) {
s = !0;
} else {
var l = b._0;
c({
TAG: 0,
_0: function (a) {
if (!f) {
return a ? ((f = !0), (d = !1), g(), l(1)) : l(0);
}
},
});
t(0);
}
});
};
} else if (0 === r.tag) {
var a = r[0];
t(start((e => {
if (1 === e && !f) {
f = !0;
s = !1;
if (i) {
clearTimeout(i);
}
a(1);
} else if (!f) {
a(0);
}
})));
} else {
if (i) {
clearTimeout(i);
}
i = setTimeout((() => {
i = void 0;
t(r);
if (s) {
t(0);
}
}), e(r[0]));
}
}));
};
};
exports.delay = function (a) {
return function (b) {
return function (c) {
let e = 0;
return b(function (b) {
'number' == typeof b || b.TAG
? ((e = (e + 1) | 0),
setTimeout(function (a) {
0 !== e && ((e = (e - 1) | 0), c(b));
}, a))
: c(b);
});
};
exports.delay = function delay(e) {
return r => t => {
var i = 0;
r((r => {
if ("number" != typeof r && 0 === r.tag) {
t(r);
} else {
i++;
setTimeout((() => {
if (i) {
i--;
t(r);
}
}), e);
}
}));
};
};
exports.empty = empty$1;
exports.empty = e => {
var r = !1;
e(start((t => {
if (1 === t) {
r = !0;
} else if (!r) {
r = !0;
e(0);
}
})));
};
exports.filter = function (a) {
return function (b) {
return function (c) {
let e = talkbackPlaceholder;
return b(function (d) {
'number' == typeof d ? c(d) : d.TAG ? (a(d._0) ? c(d) : e(0)) : ((e = d._0), c(d));
});
};
exports.filter = function filter(e) {
return r => t => {
var i = talkbackPlaceholder;
r((r => {
if (0 === r) {
t(0);
} else if (0 === r.tag) {
i = r[0];
t(r);
} else if (!e(r[0])) {
i(0);
} else {
t(r);
}
}));
};
};
exports.flatten = flatten$1;
exports.flatten = mergeAll;
exports.forEach = function (a) {
return function (b) {
subscribe(a)(b);
exports.forEach = function forEach(e) {
return r => {
subscribe(e)(r);
};
};
exports.fromArray = fromArray$1;
exports.fromArray = fromArray;
exports.fromCallbag = function (a) {
return function (b) {
var c = function (a, c) {
switch (a) {
case 0:
b({
TAG: 0,
_0: function (a) {
return a ? c(2) : c(1);
},
});
break;
case 1:
b({
TAG: 1,
_0: c,
});
break;
case 2:
b(0);
exports.fromCallbag = function fromCallbag(e) {
return r => {
e(0, ((e, t) => {
if (0 === e) {
r(start((e => {
if (0 === e) {
t(1);
} else {
t(2);
}
})));
} else if (1 === e) {
r(push(t));
} else if (2 === e) {
r(0);
}
};
return 2 === a.length ? a(0, c) : a.bind(null, 0, c);
}));
};
};
exports.fromDomEvent = function (a, b) {
return (function (a, b) {
return function (c) {
var e = _ref3$2,
d = _ref4$2,
f = function (a) {
c({
TAG: 1,
_0: a,
});
};
c({
TAG: 0,
_0: function (c) {
if (c) {
return d(a, b, f);
}
},
});
return e(a, b, f);
exports.fromDomEvent = function fromDomEvent(e, r) {
return t => {
var handler = e => {
t(push(e));
};
})(a, b);
};
exports.fromList = function (a) {
return function (b) {
let c = !1,
e = !1,
d = !1,
f = a;
b({
TAG: 0,
_0: function (a) {
if (a) {
c = !0;
} else if (e) {
d = !0;
} else {
for (e = d = !0; d && !c; ) {
(a = f)
? ((f = a.tl),
(d = !1),
b({
TAG: 1,
_0: a.hd,
}))
: ((c = !0), b(0));
}
e = !1;
}
},
});
t(start((t => {
if (1 === t) {
e.removeEventListener(r, handler);
}
})));
e.addEventListener(r, handler);
};
};
exports.fromObservable = function (a) {
var b = void 0 !== a[observableSymbol] ? a[observableSymbol]() : a;
return function (a) {
var c = b.subscribe({
next: function (b) {
a({
TAG: 1,
_0: b,
});
exports.fromObservable = function fromObservable(r) {
var t = r[e] ? r[e]() : r;
return e => {
var r = t.subscribe({
next(r) {
e(push(r));
},
complete: function () {
a(0);
complete() {
e(0);
},
error: _ref$2,
error() {}
});
a({
TAG: 0,
_0: function (a) {
if (a) {
return c.unsubscribe();
}
},
});
e(start((e => {
if (1 === e) {
r.unsubscribe();
}
})));
};
};
exports.fromPromise = function (a) {
return function (b) {
let c = !1;
a.then(function (a) {
c ||
(b({
TAG: 1,
_0: a,
}),
b(0));
return Promise.resolve(void 0);
});
b({
TAG: 0,
_0: function (a) {
a && (c = !0);
},
});
exports.fromPromise = function fromPromise(e) {
return r => {
var t = !1;
e.then((e => {
if (!t) {
r(push(e));
r(0);
}
}));
r(start((e => {
if (1 === e) {
t = !0;
}
})));
};
};
exports.fromValue = function (a) {
return function (b) {
let c = !1;
b({
TAG: 0,
_0: function (e) {
e
? (c = !0)
: c ||
((c = !0),
b({
TAG: 1,
_0: a,
}),
b(0));
},
});
exports.fromValue = function fromValue(e) {
return r => {
var t = !1;
r(start((i => {
if (1 === i) {
t = !0;
} else if (!t) {
t = !0;
r(push(e));
r(0);
}
})));
};
};
exports.interval = function (a) {
return function (b) {
let c = 0;
var e = setInterval(function (a) {
a = c;
c = (c + 1) | 0;
b({
TAG: 1,
_0: a,
});
}, a);
b({
TAG: 0,
_0: function (a) {
a && clearInterval(e);
},
});
exports.interval = function interval(e) {
return r => {
var t = 0;
var i = setInterval((() => {
r(push(t++));
}), e);
r(start((e => {
if (1 === e) {
clearInterval(i);
}
})));
};
};
exports.make = function (a) {
return function (b) {
let c = _ref,
e = !1;
c = a({
next: function (d) {
e ||
b({
TAG: 1,
_0: d,
});
exports.make = function make(e) {
return r => {
var t = !1;
var i = e({
next(e) {
if (!t) {
r(push(e));
}
},
complete: function (d) {
e || ((e = !0), b(0));
},
});
b({
TAG: 0,
_0: function (d) {
if (d && !e) {
return (e = !0), c();
complete() {
if (!t) {
t = !0;
r(0);
}
},
}
});
r(start((e => {
if (1 === e && !t) {
t = !0;
i();
}
})));
};
};
exports.makeSubject = function (a) {
let b = [],
c = !1;
exports.makeSubject = function makeSubject() {
var e = [];
var r = !1;
return {
source: function (c) {
function d(d) {
return d !== c;
source(r) {
e.push(r);
r(start((t => {
if (1 === t) {
var i = e.indexOf(r);
if (i > -1) {
(e = e.slice()).splice(i, 1);
}
}
})));
},
next(t) {
if (!r) {
var i = push(t);
for (var s = 0, f = e, a = e.length; s < a; s++) {
f[s](i);
}
}
b = b.concat(c);
c({
TAG: 0,
_0: function (c) {
c && (b = b.filter(d));
},
});
},
next: function (a) {
c ||
b.forEach(function (c) {
c({
TAG: 1,
_0: a,
});
});
},
complete: function (a) {
c || ((c = !0), b.forEach(_ref4));
},
complete() {
if (!r) {
r = !0;
for (var t = 0, i = e, s = e.length; t < s; t++) {
i[t](0);
}
}
}
};
};
exports.map = function (a) {
return function (b) {
return function (c) {
return b(function (b) {
b =
'number' == typeof b
? 0
: b.TAG
? {
TAG: 1,
_0: a(b._0),
}
: {
TAG: 0,
_0: b._0,
};
c(b);
});
};
};
exports.map = function map(e) {
return r => t => r((r => {
if (0 === r || 0 === r.tag) {
t(r);
} else {
t(push(e(r[0])));
}
}));
};
exports.merge = function (a) {
return mergeMap(_ref8)(fromArray(a));
exports.merge = function merge(e) {
return mergeAll(fromArray(e));
};
exports.mergeAll = mergeAll$1;
exports.mergeAll = mergeAll;
exports.mergeMap = mergeMap$1;
exports.mergeMap = mergeMap;
exports.never = function (a) {
a({
TAG: 0,
_0: talkbackPlaceholder,
});
exports.never = e => {
e(start(talkbackPlaceholder));
};
exports.onEnd = function (a) {
return function (b) {
return function (c) {
let e = !1;
return b(function (d) {
if ('number' == typeof d) {
if (e) {
return;
exports.onEnd = function onEnd(e) {
return r => t => {
var i = !1;
r((r => {
if (i) {} else if (0 === r) {
i = !0;
t(0);
e();
} else if (0 === r.tag) {
var s = r[0];
t(start((r => {
if (1 === r) {
i = !0;
s(1);
e();
} else {
s(r);
}
e = !0;
c(d);
return a();
}
if (d.TAG) {
e || c(d);
} else {
var b = d._0;
c({
TAG: 0,
_0: function (c) {
if (!e) {
return c ? ((e = !0), b(c), a()) : b(c);
}
},
});
}
});
};
})));
} else {
t(r);
}
}));
};
};
exports.onPush = onPush$1;
exports.onPush = onPush;
exports.onStart = function (a) {
return function (b) {
return function (c) {
return b(function (b) {
'number' == typeof b ? c(b) : b.TAG ? c(b) : (c(b), a());
});
};
};
exports.onStart = function onStart(e) {
return r => t => r((r => {
if (0 === r) {
t(0);
} else if (0 === r.tag) {
t(r);
e();
} else {
t(r);
}
}));
};
exports.pipe = function () {
for (var a = arguments, b = arguments[0], c = 1, e = arguments.length; c < e; c++) {
b = a[c](b);
exports.pipe = function pipe() {
var e = arguments[0];
for (var r = 1, t = arguments.length; r < t; r++) {
e = arguments[r](e);
}
return b;
return e;
};
exports.publish = function (a) {
return subscribe(_ref$1)(a);
exports.publish = function publish(e) {
subscribe((e => {}))(e);
};
exports.sample = function (a) {
return function (b) {
return function (c) {
let e = talkbackPlaceholder,
d = talkbackPlaceholder,
f = void 0,
g = !1,
h = !1;
b(function (a) {
'number' == typeof a
? h || ((h = !0), d(1), c(0))
: a.TAG
? ((f = some(a._0)), g ? (g = !1) : ((g = !0), d(0), e(0)))
: (e = a._0);
});
a(function (a) {
var b = f;
'number' == typeof a
? h || ((h = !0), e(1), c(0))
: a.TAG
? void 0 === b ||
h ||
((f = void 0),
c({
TAG: 1,
_0: valFromOption(b),
}))
: (d = a._0);
});
c({
TAG: 0,
_0: function (a) {
if (!h) {
if (a) {
return (h = !0), e(1), d(1);
}
if (!g) {
return (g = !0), e(0), d(0);
}
}
},
});
};
exports.sample = function sample(e) {
return r => t => {
var i = talkbackPlaceholder;
var s = talkbackPlaceholder;
var f;
var a = !1;
var l = !1;
r((e => {
if (l) {} else if (0 === e) {
l = !0;
s(1);
t(0);
} else if (0 === e.tag) {
i = e[0];
} else {
f = e[0];
if (!a) {
a = !0;
s(0);
i(0);
} else {
a = !1;
}
}
}));
e((e => {
if (l) {} else if (0 === e) {
l = !0;
i(1);
t(0);
} else if (0 === e.tag) {
s = e[0];
} else if (void 0 !== f) {
var r = push(f);
f = void 0;
t(r);
}
}));
t(start((e => {
if (1 === e && !l) {
l = !0;
i(1);
s(1);
} else if (!l && !a) {
a = !0;
i(0);
s(0);
}
})));
};
};
exports.scan = function (a, b) {
return (function (a, b) {
return function (c) {
return function (e) {
let d = b;
return c(function (c) {
'number' == typeof c
? (c = 0)
: c.TAG
? ((d = a(d, c._0)),
(c = {
TAG: 1,
_0: d,
}))
: (c = {
TAG: 0,
_0: c._0,
});
e(c);
});
};
};
})(a, b);
exports.scan = function scan(e, r) {
return t => i => {
var s = r;
t((r => {
if (0 === r) {
i(0);
} else if (0 === r.tag) {
i(r);
} else {
i(push(s = e(s, r[0])));
}
}));
};
};
exports.share = function (a) {
function b(a) {
'number' == typeof a
? (c.forEach(_ref11), (c = []))
: a.TAG
? ((d = !1),
c.forEach(function (c) {
c(a);
}))
: (e = a._0);
}
let c = [],
e = talkbackPlaceholder,
d = !1;
return function (f) {
function g(c) {
return c !== f;
}
c = c.concat(f);
1 === c.length && a(b);
f({
TAG: 0,
_0: function (a) {
if (a) {
if (((c = c.filter(g)), 0 === c.length)) {
return e(1);
exports.share = function share(e) {
var r = [];
var t = talkbackPlaceholder;
var i = !1;
return s => {
r.push(s);
if (1 === r.length) {
e((e => {
if (0 === e) {
for (var s = 0, f = r, a = r.length; s < a; s++) {
f[s](0);
}
r.length = 0;
} else if (0 === e.tag) {
t = e[0];
} else {
d || ((d = !0), e(a));
i = !1;
for (var l = 0, n = r, o = r.length; l < o; l++) {
n[l](e);
}
}
},
});
}));
}
s(start((e => {
if (1 === e) {
var f = r.indexOf(s);
if (f > -1) {
(r = r.slice()).splice(f, 1);
}
if (!r.length) {
t(1);
}
} else if (!i) {
i = !0;
t(0);
}
})));
};
};
exports.skip = function (a) {
return function (b) {
return function (c) {
let e = talkbackPlaceholder,
d = a;
return b(function (a) {
'number' == typeof a
? c(a)
: a.TAG
? 0 < d
? ((d = (d - 1) | 0), e(0))
: c(a)
: ((e = a._0), c(a));
});
};
exports.skip = function skip(e) {
return r => t => {
var i = talkbackPlaceholder;
var s = e;
r((e => {
if (0 === e) {
t(0);
} else if (0 === e.tag) {
i = e[0];
t(e);
} else if (s-- > 0) {
i(0);
} else {
t(e);
}
}));
};
};
exports.skipUntil = function (a) {
return function (b) {
return function (c) {
function e(a) {
'number' == typeof a
? g && ((k = !0), d(1))
: a.TAG
? ((g = !1), f(1))
: ((f = a = a._0), a(0));
}
let d = talkbackPlaceholder,
f = talkbackPlaceholder,
g = !0,
h = !1,
k = !1;
b(function (b) {
'number' == typeof b
? (g && f(1), (k = !0), c(0))
: b.TAG
? g || k
? h
? (h = !1)
: ((h = !0), d(0), f(0))
: ((h = !1), c(b))
: ((d = b._0), a(e));
});
c({
TAG: 0,
_0: function (a) {
if (!k) {
if (a) {
if (((k = !0), d(1), g)) {
return f(1);
}
} else {
h || ((h = !0), g && f(0), d(0));
exports.skipUntil = function skipUntil(e) {
return r => t => {
var i = talkbackPlaceholder;
var s = talkbackPlaceholder;
var f = !0;
var a = !1;
var l = !1;
r((r => {
if (l) {} else if (0 === r) {
l = !0;
if (f) {
s(1);
}
t(0);
} else if (0 === r.tag) {
i = r[0];
e((e => {
if (0 === e) {
if (f) {
l = !0;
i(1);
}
} else if (0 === e.tag) {
(s = e[0])(0);
} else {
f = !1;
s(1);
}
},
});
};
}));
} else if (!f) {
a = !1;
t(r);
} else if (!a) {
a = !0;
i(0);
s(0);
} else {
a = !1;
}
}));
t(start((e => {
if (1 === e && !l) {
l = !0;
i(1);
if (f) {
s(1);
}
} else if (!l && !a) {
a = !0;
if (f) {
s(0);
}
i(0);
}
})));
};
};
exports.skipWhile = function (a) {
return function (b) {
return function (c) {
let e = talkbackPlaceholder,
d = !0;
return b(function (b) {
'number' == typeof b
? c(b)
: b.TAG
? d
? a(b._0)
? e(0)
: ((d = !1), c(b))
: c(b)
: ((e = b._0), c(b));
});
};
exports.skipWhile = function skipWhile(e) {
return r => t => {
var i = talkbackPlaceholder;
var s = !0;
r((r => {
if (0 === r) {
t(0);
} else if (0 === r.tag) {
i = r[0];
t(r);
} else if (s) {
if (e(r[0])) {
i(0);
} else {
s = !1;
t(r);
}
} else {
t(r);
}
}));
};
};
exports.subscribe = subscribe$1;
exports.subscribe = subscribe;
exports.switchAll = function (a) {
return switchMap(_ref16)(a);
exports.switchAll = function switchAll(e) {
return switchMap(identity)(e);
};
exports.switchMap = switchMap$1;
exports.switchMap = switchMap;
exports.take = function (a) {
return function (b) {
return function (c) {
let e = !1,
d = 0,
f = talkbackPlaceholder;
b(function (b) {
'number' == typeof b
? e || ((e = !0), c(0))
: b.TAG
? d < a && !e && ((d = (d + 1) | 0), c(b), !e && d >= a && ((e = !0), c(0), f(1)))
: ((b = b._0), 0 >= a ? ((e = !0), c(0), b(1)) : (f = b));
});
c({
TAG: 0,
_0: function (c) {
if (!e) {
if (c) {
return (e = !0), f(1);
}
if (d < a) {
return f(0);
}
}
},
});
};
exports.take = function take(e) {
return r => t => {
var i = talkbackPlaceholder;
var s = !1;
var f = 0;
r((r => {
if (s) {} else if (0 === r) {
s = !0;
t(0);
} else if (0 === r.tag) {
if (e <= 0) {
s = !0;
t(0);
r[0](1);
} else {
i = r[0];
}
} else if (f++ < e) {
t(r);
if (!s && f >= e) {
s = !0;
t(0);
i(1);
}
} else {
t(r);
}
}));
t(start((r => {
if (1 === r && !s) {
s = !0;
i(1);
} else if (0 === r && !s && f < e) {
i(0);
}
})));
};
};
exports.takeLast = takeLast$1;
exports.takeLast = function takeLast(e) {
return r => t => {
var i = [];
var s = talkbackPlaceholder;
r((r => {
if (0 === r) {
fromArray(i)(t);
} else if (0 === r.tag) {
if (e <= 0) {
r[0](1);
fromArray(i)(t);
} else {
(s = r[0])(0);
}
} else {
if (i.length >= e && e) {
i.shift();
}
i.push(r[0]);
s(0);
}
}));
};
};
exports.takeUntil = function (a) {
return function (b) {
return function (c) {
function e(a) {
'number' != typeof a && (a.TAG ? ((d = !0), f(1), c(0)) : ((g = a = a._0), a(0)));
exports.takeUntil = function takeUntil(e) {
return r => t => {
var i = talkbackPlaceholder;
var s = talkbackPlaceholder;
var f = !1;
r((r => {
if (f) {} else if (0 === r) {
f = !0;
s(1);
t(0);
} else if (0 === r.tag) {
i = r[0];
e((e => {
if (0 === e) {} else if (0 === e.tag) {
(s = e[0])(0);
} else {
f = !0;
i(1);
t(0);
}
}));
} else {
t(r);
}
let d = !1,
f = talkbackPlaceholder,
g = talkbackPlaceholder;
b(function (b) {
'number' == typeof b ? d || ((d = !0), g(1), c(0)) : b.TAG ? d || c(b) : ((f = b._0), a(e));
});
c({
TAG: 0,
_0: function (a) {
if (!d) {
return a ? ((d = !0), f(1), g(1)) : f(0);
}
},
});
};
}));
t(start((e => {
if (1 === e && !f) {
f = !0;
i(1);
s(1);
} else if (!f) {
i(0);
}
})));
};
};
exports.takeWhile = function (a) {
return function (b) {
return function (c) {
let e = talkbackPlaceholder,
d = !1;
return b(function (b) {
'number' == typeof b
? d || ((d = !0), c(0))
: b.TAG
? d || (a(b._0) ? c(b) : ((d = !0), c(0), e(1)))
: ((e = b._0), c(b));
});
};
exports.takeWhile = function takeWhile(e) {
return r => t => {
var i = talkbackPlaceholder;
var s = !1;
r((r => {
if (s) {} else if (0 === r) {
s = !0;
t(0);
} else if (0 === r.tag) {
i = r[0];
t(r);
} else if (!e(r[0])) {
s = !0;
t(0);
i(1);
} else {
t(r);
}
}));
};
};
exports.tap = tap$1;
exports.tap = onPush;
exports.throttle = function (a) {
return function (b) {
return function (c) {
function e(a) {
f = void 0;
d = !1;
exports.throttle = function throttle(e) {
return r => t => {
var i = !1;
var s;
r((r => {
if (0 === r) {
if (s) {
clearTimeout(s);
}
t(0);
} else if (0 === r.tag) {
var f = r[0];
t(start((e => {
if (1 === e) {
if (s) {
clearTimeout(s);
}
f(1);
} else {
f(0);
}
})));
} else if (!i) {
i = !0;
if (s) {
clearTimeout(s);
}
s = setTimeout((() => {
s = void 0;
i = !1;
}), e(r[0]));
t(r);
}
let d = !1,
f = void 0;
var g = function (a) {
void 0 !== (a = f) && clearTimeout(valFromOption(a));
};
return b(function (b) {
if ('number' == typeof b) {
g(), c(0);
} else if (b.TAG) {
d || ((d = !0), g(), (f = some(setTimeout(e, a(b._0)))), c(b));
} else {
var h = b._0;
c({
TAG: 0,
_0: function (a) {
return a ? (g(), h(1)) : h(a);
},
});
}
});
};
}));
};
};
exports.toArray = function (a) {
let b = [],
c = talkbackPlaceholder,
e = !1;
a(function (a) {
'number' == typeof a ? (e = !0) : a.TAG ? (b.push(a._0), c(0)) : ((c = a = a._0), a(0));
});
e || c(1);
return b;
exports.toArray = function toArray(e) {
var r = [];
var t = talkbackPlaceholder;
var i = !1;
e((e => {
if (0 === e) {
i = !0;
} else if (0 === e.tag) {
(t = e[0])(0);
} else {
r.push(e[0]);
t(0);
}
}));
if (!i) {
t(1);
}
return r;
};
exports.toCallbag = function (a) {
return function (b, c) {
if (0 === b) {
return a(function (a) {
if ('number' == typeof a) {
return 2 === c.length ? c(2, void 0) : c.bind(null, 2, void 0);
exports.toCallbag = function toCallbag(e) {
return (r, t) => {
if (0 === r) {
e((e => {
if (0 === e) {
t(2);
} else if (0 === e.tag) {
t(0, (r => {
if (1 === r) {
e[0](0);
} else if (2 === r) {
e[0](1);
}
}));
} else {
t(1, e[0]);
}
if (a.TAG) {
return (a = a._0), 2 === c.length ? c(1, a) : c.bind(null, 1, a);
}
var b = a._0;
a = function (a) {
switch (a) {
case 1:
b(0);
break;
case 2:
b(1);
}
};
return 2 === c.length ? c(0, a) : c.bind(null, 0, a);
});
}));
}

@@ -1223,45 +1225,49 @@ };

exports.toObservable = function (a) {
var b = {
subscribe: function (b, e, d) {
var c = ('object' == typeof b ? b.next.bind(b) : b) || _ref2,
g = ('object' == typeof b ? b.complete.bind(b) : d) || _ref3$1;
let h = talkbackPlaceholder,
k = !1;
a(function (a) {
if ('number' == typeof a) {
return (k = !0), g();
exports.toObservable = function toObservable(r) {
var t = {
subscribe(e) {
var t = talkbackPlaceholder;
var i = !1;
r((r => {
if (i) {} else if (0 === r) {
i = !0;
e.complete();
} else if (0 === r.tag) {
(t = r[0])(0);
} else {
e.next(r[0]);
t(0);
}
if (a.TAG) {
if (k) {
return;
}
c(a._0);
return h(0);
}));
var s = {
closed: !1,
unsubscribe() {
s.closed = !0;
i = !0;
t(1);
}
h = a = a._0;
a(0);
});
return {
unsubscribe: function () {
if (!k) {
return (this.closed = !1), (k = !0), h(1);
}
},
closed: !1,
};
},
return s;
}
};
b[observableSymbol] = function (a) {
return b;
};
return b;
t[e] = () => t;
return t;
};
exports.toPromise = function (a) {
return new Promise(function (b, c) {
takeLast(1)(a)(function (a) {
'number' != typeof a && (a.TAG ? b(a._0) : a._0(0));
});
});
exports.toPromise = function toPromise(e) {
return new Promise((r => {
var t = talkbackPlaceholder;
var i;
e((e => {
if (0 === e) {
r(i);
} else if (0 === e.tag) {
(t = e[0])(0);
} else {
i = e[0];
t(0);
}
}));
}));
};
//# sourceMappingURL=wonka.js.map

@@ -80,4 +80,4 @@ ---

'test',
x => x + ' this',
x => x.toUpperCase()
(x) => x + ' this',
(x) => x.toUpperCase()
);

@@ -84,0 +84,0 @@

@@ -24,20 +24,11 @@ ---

## Compatibility
## Reason Support
Wonka is written in [Reason](https://reasonml.github.io/), a dialect of OCaml, and can hence be used
for native applications. It is also compiled using [BuckleScript](https://bucklescript.github.io) to plain
JavaScript and has typings for [TypeScript](https://www.typescriptlang.org/) and [Flow](https://flow.org/).
Wonka used to be written in [Reason](https://reasonml.github.io/),, a dialect of OCaml, and was usable
for native development and compileable with [BuckleScript](https://bucklescript.github.io).
Out of the box it supported usage with BuckleScript, `bs-native`, Dune, and Esy.
This means that out of the box Wonka is usable in any project that use the following:
If you're looking for the legacy version that supported this, you may want to install v4 or v5 rather
than v6 onwards, which converted the project to TypeScript.
- Plain JavaScript
- TypeScript
- Flow
- Reason/OCaml with BuckleScript
- Reason/OCaml with `bs-native`
- Reason/OCaml with Dune and Esy
In summary, Wonka provides a consistent interface in and works across
TypeScript/Flow/Reason/OCaml environments with full type safety.
## About the docs

@@ -44,0 +35,0 @@

@@ -9,2 +9,19 @@ ---

## v6.0.0
In `v6.0.0` of Wonka, we've migrated fully to TypeScript.
If you're using this project with Reason or OCaml before, we're sorry for
the inconvenience. However, v4 and v5-rc will remain usable for these
platforms and languages.
The internal API and data structures of Wonka haven't changed in `v6.0.0`
compared to the prior releases and are based on `v4.0.14`. This means that
from a TypeScript, Flow, and JS perspective, `v6.0.0` is backwards compatible
and continues to function as before.
However, the `fromList` API has been removed so far, and we reserve ourselves
room to make more breaking changes were behaviour before was broken.
We're also dropping IE11 support and are now bundling against an ES2015 target.
## v4.0.0

@@ -11,0 +28,0 @@

MIT License
Copyright (c) 2018 Phil Plückthun
Copyright (c) 2018–2022 0no.co

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "wonka",
"description": "A fast push & pull stream library for Reason/OCaml, Flow, and TypeScript",
"version": "5.0.0-rc.1",
"author": "Phil Pluckthun <phil@kitten.sh>",
"source": "./src/Wonka.ts",
"description": "A tiny but capable push & pull stream library for TypeScript and Flow",
"version": "6.0.0",
"author": "0no.co <hi@0no.co>",
"source": "./src/index.ts",
"main": "./dist/wonka",
"module": "./dist/wonka.mjs",
"types": "./dist/types/src/Wonka.d.ts",
"types": "./dist/types/index.d.ts",
"exports": {

@@ -14,4 +14,4 @@ ".": {

"require": "./dist/wonka.js",
"types": "./dist/types/src/Wonka.d.ts",
"source": "./src/Wonka.ts"
"types": "./dist/types/index.d.ts",
"source": "./src/index.ts"
},

@@ -26,32 +26,9 @@ "./package.json": "./package.json",

"docs/*.md",
"*.md",
"index.js.flow",
"esy.lock",
"dune-project",
"wonka.opam",
"esy.json",
"bsconfig.json"
"*.md"
],
"scripts": {
"docs:dev": "gatsby develop",
"docs:build": "gatsby build",
"check:ts": "tsc --noEmit",
"check:flow": "flow focus-check ./src/helpers/Wonka_flow_test.js",
"check": "run-s check:ts check:flow",
"bs:clean": "bsb -clean-world",
"bs:build": "bsb -make-world",
"bs:watch": "bsb -make-world -w",
"test": "jest",
"refmt": "bsrefmt --in-place **/**/*.{re,rei}",
"flowgen": "./scripts/generate-flow-files.js",
"bundle:clean": "rimraf dist node_modules/.cache",
"bundle": "rollup -c rollup.config.js",
"clean": "run-s bs:clean bundle:clean",
"build": "run-s bs:build bundle flowgen",
"prepublishOnly": "run-s clean build check test"
},
"keywords": [
"wonka",
"reason",
"bucklescript",
"typescript",
"events",
"callbag",

@@ -63,91 +40,75 @@ "callback",

],
"repository": "https://github.com/kitten/wonka",
"homepage": "https://wonka.kitten.sh",
"scripts": {
"test": "jest",
"check": "tsc",
"lint": "eslint --ext=js,ts .",
"build": "rollup -c rollup.config.js",
"clean": "rimraf dist node_modules/.cache",
"prepublishOnly": "run-s clean build check test"
},
"repository": "https://github.com/0no-co/wonka",
"bugs": {
"url": "https://github.com/kitten/wonka/issues"
"url": "https://github.com/0no-co/wonka/issues"
},
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@ampproject/rollup-plugin-closure-compiler": "^0.26.0",
"@babel/core": "^7.10.4",
"@babel/plugin-syntax-typescript": "^7.10.4",
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@glennsl/bs-jest": "^0.5.1",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-node-resolve": "^8.1.0",
"@types/jest": "^26.0.3",
"@types/zen-observable": "^0.8.0",
"babel-plugin-closure-elimination": "^1.3.1",
"bs-platform": "^8.0.3",
"callbag-from-iter": "^1.2.0",
"callbag-iterate": "^1.0.0",
"callbag-take": "^1.5.0",
"coveralls": "^3.1.0",
"flow-bin": "^0.128.0",
"flowgen": "^1.11.0",
"gatsby": "^2.23.17",
"gatsby-plugin-netlify": "^2.3.10",
"gatsby-theme-docs-system": "^0.2.2",
"gentype": "^3.26.0",
"globby": "^11.0.1",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"rimraf": "^3.0.2",
"rollup": "^2.18.2",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-prettier": "^2.1.0",
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-typescript2": "^0.27.1",
"ts-jest": "^26.1.1",
"typescript": "^3.9.6",
"zen-observable": "^0.8.15"
"prettier": {
"singleQuote": true,
"tabWidth": 2,
"printWidth": 100
},
"lint-staged": {
"*.{d.ts,js}": [
"prettier --write"
],
"*.{re,rei}": [
"bsrefmt --in-place"
]
"*.{ts,js}": "eslint -c scripts/eslint-preset.js --fix",
"*.json": "prettier --write",
"*.md": "prettier --write"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged --quiet --relative"
}
},
"prettier": {
"singleQuote": true,
"printWidth": 100
"eslintConfig": {
"root": true,
"extends": [
"./scripts/eslint-preset.js"
]
},
"jest": {
"testEnvironment": "node",
"testRegex": "(src/.*(\\.|/)(test|spec))\\.(t|j)sx?$",
"moduleFileExtensions": [
"js",
"ts",
"tsx"
],
"transform": {
"\\.jsx?$": "<rootDir>/scripts/jest-transform-esm.js",
"\\.tsx?$": "ts-jest"
},
"transformIgnorePatterns": [
"/node_modules/(?!bs-platform)"
],
"collectCoverageFrom": [
"!<rootDir>/src/wonka.{ts,bs.js}",
"!<rootDir>/src/wonka_types.{ts,bs.js}",
"!<rootDir>/src/include/**",
"!<rootDir>/src/helpers/**",
"!<rootDir>/src/**/*.{shim,gen}.{ts,tsx}",
"<rootDir>/src/**/*.{js,ts,tsx}"
]
"^.+\\.tsx?$": "@sucrase/jest-plugin"
}
},
"dependencies": {},
"devDependencies": {
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-typescript": "^8.3.4",
"@rollup/pluginutils": "^4.2.1",
"@sucrase/jest-plugin": "^2.2.1",
"@types/jest": "^28.1.6",
"@types/node": "^18.7.2",
"@types/zen-observable": "^0.8.3",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"callbag-from-iter": "^1.3.0",
"callbag-iterate": "^1.0.0",
"callbag-take": "^1.5.0",
"eslint": "^8.21.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.8.2",
"eslint-plugin-prettier": "^4.2.1",
"flowgen": "^1.20.1",
"glob": "^8.0.3",
"husky-v4": "^4.3.8",
"jest": "^28.1.3",
"lint-staged": "^13.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"rollup": "^2.77.3",
"rollup-plugin-terser": "^7.0.2",
"tslib": "^2.4.0",
"typescript": "^4.7.4",
"zen-observable": "^0.8.15"
}
}
# Wonka
A fast push & pull stream library for Reason, loosely following the [callbag spec](https://github.com/callbag/callbag)
A tiny but capable push & pull stream library for TypeScript and Flow,
loosely following the [callbag spec](https://github.com/callbag/callbag)
> **NOTE:** The `master` branch currently points to the v4 Release Candidate version!
> If you're looking for v3, [please check the `v3.2.2`](https://github.com/kitten/wonka/tree/v3.2.2)
> **NOTE:** The currently released version v6 is only compatible now with TypeScript, Flow, and JavaScript.
> If you're looking for Reason/OCaml/esy/dune support, please check v5, and if you're looking for the legacy version
> of this library check v4.

@@ -37,15 +39,2 @@ <br>

Wonka is written in [Reason](https://reasonml.github.io/), a dialect of OCaml, and can hence be used
for native applications. It is also compiled using [BuckleScript](https://bucklescript.github.io) to plain
JavaScript and has typings for [TypeScript](https://www.typescriptlang.org/) and [Flow](https://flow.org/).
This means that out of the box Wonka is usable in any project that use the following:
- Plain JavaScript
- TypeScript
- Flow
- Reason/OCaml with BuckleScript
- Reason/OCaml with `bs-native`
- Reason/OCaml with Dune and Esy
## [Documentation](https://wonka.kitten.sh/)

@@ -52,0 +41,0 @@

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