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

61

dist/wonka.js

@@ -115,4 +115,4 @@ 'use strict';

TAG: 0,
_0: function (a) {
if (a) {
_0: function (c) {
if (c) {
if ((m || ((m = !0), f(1)), k)) {

@@ -156,4 +156,4 @@ return (k = !1), h(1);

(function (a) {
function b(a) {
return a !== k;
function b(c) {
return c !== k;
}

@@ -222,5 +222,5 @@ var h = function (a) {

TAG: 0,
_0: function (a) {
_0: function (c) {
if (!e) {
return a && (e = !0), g(a);
return c && (e = !0), g(c);
}

@@ -325,3 +325,7 @@ },

function _ref3$1(a, b, c) {
function _ref2() {}
function _ref3$1() {}
function _ref3$2(a, b, c) {
a.addEventListener(b, c);

@@ -462,9 +466,9 @@ }

TAG: 0,
_0: function (a) {
_0: function (c) {
if (!l) {
if (a) {
if (c) {
return (l = !0), e(1), d(1);
}
if (!h) {
return (h = !0), e(a), d(a);
return (h = !0), e(c), d(c);
}

@@ -596,3 +600,3 @@ }

return function (c) {
var e = _ref3$1,
var e = _ref3$2,
d = _ref4$2,

@@ -781,4 +785,4 @@ f = function (a) {

c ||
b.forEach(function (d) {
d({
b.forEach(function (c) {
c({
TAG: 1,

@@ -972,4 +976,4 @@ _0: a,

return function (f) {
function g(a) {
return a !== f;
function g(c) {
return c !== f;
}

@@ -1098,5 +1102,5 @@ c = c.concat(f);

TAG: 0,
_0: function (b) {
_0: function (c) {
if (!e) {
if (b) {
if (c) {
return (e = !0), f(1);

@@ -1229,17 +1233,19 @@ }

var b = {
subscribe: function (b) {
let c = talkbackPlaceholder,
d = !1;
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 (d = !0), b.complete();
return (k = !0), g();
}
if (a.TAG) {
if (d) {
if (k) {
return;
}
b.next(a._0);
return c(0);
c(a._0);
return h(0);
}
c = a = a._0;
h = a = a._0;
a(0);

@@ -1249,6 +1255,7 @@ });

unsubscribe: function () {
if (!d) {
return (d = !0), c(1);
if (!k) {
return (this.closed = !1), (k = !0), h(1);
}
},
closed: !1,
};

@@ -1255,0 +1262,0 @@ },

@@ -1,1 +0,1 @@

"use strict";function n(n){}function t(n){return function(t){var e=n.length;let r=!1,u=!1,o=!1,i=0;t({TAG:0,_0:function(f){if(f)r=!0;else if(u)o=!0;else{for(u=o=!0;o&&!r;)i<e?(f=n[i],i=i+1|0,o=!1,t({TAG:1,_0:f})):(r=!0,t(0));u=!1}}})}}function e(){}function r(n){n(0)}function u(n){let t=!1;n({TAG:0,_0:function(e){e?t=!0:t||n(0)}})}var o=t,i=u;function f(n){return void 0===n?{BS_PRIVATE_NESTED_SOME_NONE:0}:null!==n&&void 0!==n.BS_PRIVATE_NESTED_SOME_NONE?{BS_PRIVATE_NESTED_SOME_NONE:n.BS_PRIVATE_NESTED_SOME_NONE+1|0}:n}function c(n){return null===n||void 0===n.BS_PRIVATE_NESTED_SOME_NONE?n:0!==(n=n.BS_PRIVATE_NESTED_SOME_NONE)?{BS_PRIVATE_NESTED_SOME_NONE:n-1|0}:void 0}function _(t){return function(e){return function(r){function u(n){"number"==typeof n?l&&(l=!1,void 0!==(n=o.shift())?(n=t(c(n)),l=!0,n(u)):p?r(0):f||(f=!0,i(0))):n.TAG?l&&(r(n),s?s=!1:_(0)):(_=n=n._0,s=!1,n(0))}let o=[],i=n,f=!1,_=n,l=!1,s=!1,p=!1;e((function(n){"number"==typeof n?p||(p=!0,!l&&function(n){return 0===n.length}(o)&&r(0)):n.TAG?p||(n=n._0,f=!1,l?o.push(n):(n=t(n),l=!0,n(u))):i=n._0})),r({TAG:0,_0:function(n){if(n){if(p||(p=!0,i(1)),l)return l=!1,_(1)}else p||f||(f=!0,i(0)),l&&!s&&(s=!0,_(0))}})}}}function l(n){return n}function s(n){return n}function p(n){return n(0)}function T(t){return function(e){return function(r){let u=n,o=!1,i=[],f=!1;e((function(e){"number"==typeof e?f||(f=!0,0===i.length&&r(0)):e.TAG?f||(o=!1,function(t){function e(n){return n!==_}var c=function(n){"number"==typeof n?0!==i.length&&(i=i.filter(e),n=0===i.length,f&&n?r(0):!o&&n&&(o=!0,u(0))):n.TAG?0!==i.length&&(r({TAG:1,_0:n._0}),_(0)):(_=n=n._0,i=i.concat(n),n(0))};let _=n;1===t.length?t(c):t.bind(null,c)}(t(e._0)),o||(o=!0,u(0))):u=e._0})),r({TAG:0,_0:function(n){n?(f||(f=!0,u(n)),i.forEach((function(t){return t(n)})),i=[]):(o||f?o=!1:(o=!0,u(0)),i.forEach(p))}})}}}function A(n){return n}function G(n){return n}function a(n){return T(G)(n)}function b(n){return function(t){return function(e){let r=!1;return t((function(t){if("number"==typeof t)r||(r=!0,e(t));else if(t.TAG)r||(n(t._0),e(t));else{var u=t._0;e({TAG:0,_0:function(n){if(!r)return n&&(r=!0),u(n)}})}}))}}}function m(n){n(0)}function v(t){return function(e){return function(r){function u(n){c&&("number"==typeof n?(c=!1,l?r(n):i||(i=!0,o(0))):n.TAG?(r(n),_?_=!1:f(0)):(f=n=n._0,_=!1,n(0)))}let o=n,i=!1,f=n,c=!1,_=!1,l=!1;e((function(e){"number"==typeof e?l||(l=!0,c||r(0)):e.TAG?l||(c&&(f(1),f=n),i?i=!1:(i=!0,o(0)),e=t(e._0),c=!0,e(u)):o=e._0})),r({TAG:0,_0:function(n){if(n){if(l||(l=!0,o(1)),c)return c=!1,f(1)}else l||i||(i=!0,o(0)),c&&!_&&(_=!0,f(0))}})}}}function x(n){return n}function E(e){return function(r){return function(o){let i=[],f=n;return r((function(n){"number"==typeof n?t(i)(o):n.TAG?(i.length>=e&&0<e&&i.shift(),i.push(n._0),f(0)):(n=n._0,0>=e?(n(1),u(o)):(f=n,n(0)))}))}}}var y=_,h=T,d=a,S=a,g=b,N=b,O=v,k=E;function P(t){return function(e){let r=n,u=!1;return e((function(n){"number"==typeof n?u=!0:n.TAG?u||(t(n._0),r(0)):(r=n=n._0,n(0))})),{unsubscribe:function(n){if(!u)return u=!0,r(1)}}}}function M(n){}var I=P,D="function"==typeof Symbol?Symbol.observable||(Symbol.observable=Symbol("observable")):"@@observable";function V(n){}function B(n,t,e){n.addEventListener(t,e)}function R(n,t,e){n.removeEventListener(t,e)}exports.buffer=function(t){return function(e){return function(r){function u(n){"number"==typeof n?_||(_=!0,i(1),0<o.length&&r({TAG:1,_0:o}),r(0)):n.TAG?!_&&0<o.length&&(n=o,o=[],r({TAG:1,_0:n})):f=n._0}let o=[],i=n,f=n,c=!1,_=!1;e((function(n){"number"==typeof n?_||(_=!0,f(1),0<o.length&&r({TAG:1,_0:o}),r(0)):n.TAG?_||(o.push(n._0),c?c=!1:(c=!0,i(0),f(0))):(i=n._0,t(u))})),r({TAG:0,_0:function(n){if(!_){if(n)return _=!0,i(1),f(1);if(!c)return c=!0,i(0),f(0)}}})}}},exports.combine=function(t,e){return function(t,e){return function(r){let u=n,o=n,i=void 0,_=void 0,l=!1,s=0,p=!1;t((function(n){var t=_;"number"==typeof n?1>s?s=s+1|0:p||(p=!0,r(0)):n.TAG?(n=n._0,void 0!==t?p||(i=f(n),l=!1,r({TAG:1,_0:[n,c(t)]})):(i=f(n),l?l=!1:o(0))):u=n._0})),e((function(n){var t=i;"number"==typeof n?1>s?s=s+1|0:p||(p=!0,r(0)):n.TAG?(n=n._0,void 0!==t?p||(_=f(n),l=!1,r({TAG:1,_0:[c(t),n]})):(_=f(n),l?l=!1:u(0))):o=n._0})),r({TAG:0,_0:function(n){if(!p){if(n)return p=!0,u(1),o(1);if(!l)return l=!0,u(n),o(n)}}})}}(t,e)},exports.concat=function(n){return _(s)(t(n))},exports.concatAll=function(n){return _(l)(n)},exports.concatMap=y,exports.debounce=function(n){return function(t){return function(e){let r=void 0,u=!1,o=!1;var i=function(n){void 0!==(n=r)&&(r=void 0,clearTimeout(c(n)))};return t((function(t){if("number"==typeof t)o||(o=!0,void 0!==r?u=!0:e(0));else if(t.TAG)o||(i(),r=f(setTimeout((function(n){r=void 0,e(t),u&&e(0)}),n(t._0))));else{var c=t._0;e({TAG:0,_0:function(n){if(!o)return n?(o=!0,u=!1,i(),c(1)):c(0)}})}}))}}},exports.delay=function(n){return function(t){return function(e){let r=0;return t((function(t){"number"==typeof t||t.TAG?(r=r+1|0,setTimeout((function(n){0!==r&&(r=r-1|0,e(t))}),n)):e(t)}))}}},exports.empty=i,exports.filter=function(t){return function(e){return function(r){let u=n;return e((function(n){"number"==typeof n?r(n):n.TAG?t(n._0)?r(n):u(0):(u=n._0,r(n))}))}}},exports.flatten=S,exports.forEach=function(n){return function(t){P(n)(t)}},exports.fromArray=o,exports.fromCallbag=function(n){return function(t){var e=function(n,e){switch(n){case 0:t({TAG:0,_0:function(n){return e(n?2:1)}});break;case 1:t({TAG:1,_0:e});break;case 2:t(0)}};return 2===n.length?n(0,e):n.bind(null,0,e)}},exports.fromDomEvent=function(n,t){return function(n,t){return function(e){var r=B,u=R,o=function(n){e({TAG:1,_0:n})};return e({TAG:0,_0:function(e){if(e)return u(n,t,o)}}),r(n,t,o)}}(n,t)},exports.fromList=function(n){return function(t){let e=!1,r=!1,u=!1,o=n;t({TAG:0,_0:function(n){if(n)e=!0;else if(r)u=!0;else{for(r=u=!0;u&&!e;)(n=o)?(o=n.tl,u=!1,t({TAG:1,_0:n.hd})):(e=!0,t(0));r=!1}}})}},exports.fromObservable=function(n){var t=void 0!==n[D]?n[D]():n;return function(n){var e=t.subscribe({next:function(t){n({TAG:1,_0:t})},complete:function(){n(0)},error:V});n({TAG:0,_0:function(n){if(n)return e.unsubscribe()}})}},exports.fromPromise=function(n){return function(t){let e=!1;n.then((function(n){return e||(t({TAG:1,_0:n}),t(0)),Promise.resolve(void 0)})),t({TAG:0,_0:function(n){n&&(e=!0)}})}},exports.fromValue=function(n){return function(t){let e=!1;t({TAG:0,_0:function(r){r?e=!0:e||(e=!0,t({TAG:1,_0:n}),t(0))}})}},exports.interval=function(n){return function(t){let e=0;var r=setInterval((function(n){n=e,e=e+1|0,t({TAG:1,_0:n})}),n);t({TAG:0,_0:function(n){n&&clearInterval(r)}})}},exports.make=function(n){return function(t){let r=e,u=!1;r=n({next:function(n){u||t({TAG:1,_0:n})},complete:function(n){u||(u=!0,t(0))}}),t({TAG:0,_0:function(n){if(n&&!u)return u=!0,r()}})}},exports.makeSubject=function(n){let t=[],e=!1;return{source:function(n){function e(t){return t!==n}t=t.concat(n),n({TAG:0,_0:function(n){n&&(t=t.filter(e))}})},next:function(n){e||t.forEach((function(t){t({TAG:1,_0:n})}))},complete:function(n){e||(e=!0,t.forEach(r))}}},exports.map=function(n){return function(t){return function(e){return t((function(t){t="number"==typeof t?0:t.TAG?{TAG:1,_0:n(t._0)}:{TAG:0,_0:t._0},e(t)}))}}},exports.merge=function(n){return T(A)(t(n))},exports.mergeAll=d,exports.mergeMap=h,exports.never=function(t){t({TAG:0,_0:n})},exports.onEnd=function(n){return function(t){return function(e){let r=!1;return t((function(t){if("number"==typeof t){if(r)return;return r=!0,e(t),n()}if(t.TAG)r||e(t);else{var u=t._0;e({TAG:0,_0:function(t){if(!r)return t?(r=!0,u(t),n()):u(t)}})}}))}}},exports.onPush=g,exports.onStart=function(n){return function(t){return function(e){return t((function(t){"number"==typeof t||t.TAG?e(t):(e(t),n())}))}}},exports.pipe=function(){for(var n=arguments,t=arguments[0],e=1,r=arguments.length;e<r;e++)t=n[e](t);return t},exports.publish=function(n){return P(M)(n)},exports.sample=function(t){return function(e){return function(r){let u=n,o=n,i=void 0,_=!1,l=!1;e((function(n){"number"==typeof n?l||(l=!0,o(1),r(0)):n.TAG?(i=f(n._0),_?_=!1:(_=!0,o(0),u(0))):u=n._0})),t((function(n){var t=i;"number"==typeof n?l||(l=!0,u(1),r(0)):n.TAG?void 0===t||l||(i=void 0,r({TAG:1,_0:c(t)})):o=n._0})),r({TAG:0,_0:function(n){if(!l){if(n)return l=!0,u(1),o(1);if(!_)return _=!0,u(0),o(0)}}})}}},exports.scan=function(n,t){return function(n,t){return function(e){return function(r){let u=t;return e((function(t){"number"==typeof t?t=0:t.TAG?(u=n(u,t._0),t={TAG:1,_0:u}):t={TAG:0,_0:t._0},r(t)}))}}}(n,t)},exports.share=function(t){function e(n){"number"==typeof n?(r.forEach(m),r=[]):n.TAG?(o=!1,r.forEach((function(t){t(n)}))):u=n._0}let r=[],u=n,o=!1;return function(n){function i(t){return t!==n}r=r.concat(n),1===r.length&&t(e),n({TAG:0,_0:function(n){if(n){if(r=r.filter(i),0===r.length)return u(1)}else o||(o=!0,u(n))}})}},exports.skip=function(t){return function(e){return function(r){let u=n,o=t;return e((function(n){"number"==typeof n?r(n):n.TAG?0<o?(o=o-1|0,u(0)):r(n):(u=n._0,r(n))}))}}},exports.skipUntil=function(t){return function(e){return function(r){function u(n){"number"==typeof n?f&&(_=!0,o(1)):n.TAG?(f=!1,i(1)):(i=n=n._0,n(0))}let o=n,i=n,f=!0,c=!1,_=!1;e((function(n){"number"==typeof n?(f&&i(1),_=!0,r(0)):n.TAG?f||_?c?c=!1:(c=!0,o(0),i(0)):(c=!1,r(n)):(o=n._0,t(u))})),r({TAG:0,_0:function(n){if(!_)if(n){if(_=!0,o(1),f)return i(1)}else c||(c=!0,f&&i(0),o(0))}})}}},exports.skipWhile=function(t){return function(e){return function(r){let u=n,o=!0;return e((function(n){"number"==typeof n?r(n):n.TAG?o?t(n._0)?u(0):(o=!1,r(n)):r(n):(u=n._0,r(n))}))}}},exports.subscribe=I,exports.switchAll=function(n){return v(x)(n)},exports.switchMap=O,exports.take=function(t){return function(e){return function(r){let u=!1,o=0,i=n;e((function(n){"number"==typeof n?u||(u=!0,r(0)):n.TAG?o<t&&!u&&(o=o+1|0,r(n),!u&&o>=t&&(u=!0,r(0),i(1))):(n=n._0,0>=t?(u=!0,r(0),n(1)):i=n)})),r({TAG:0,_0:function(n){if(!u){if(n)return u=!0,i(1);if(o<t)return i(0)}}})}}},exports.takeLast=k,exports.takeUntil=function(t){return function(e){return function(r){function u(n){"number"!=typeof n&&(n.TAG?(o=!0,i(1),r(0)):(f=n=n._0,n(0)))}let o=!1,i=n,f=n;e((function(n){"number"==typeof n?o||(o=!0,f(1),r(0)):n.TAG?o||r(n):(i=n._0,t(u))})),r({TAG:0,_0:function(n){if(!o)return n?(o=!0,i(1),f(1)):i(0)}})}}},exports.takeWhile=function(t){return function(e){return function(r){let u=n,o=!1;return e((function(n){"number"==typeof n?o||(o=!0,r(0)):n.TAG?o||(t(n._0)?r(n):(o=!0,r(0),u(1))):(u=n._0,r(n))}))}}},exports.tap=N,exports.throttle=function(n){return function(t){return function(e){function r(n){o=void 0,u=!1}let u=!1,o=void 0;var i=function(n){void 0!==(n=o)&&clearTimeout(c(n))};return t((function(t){if("number"==typeof t)i(),e(0);else if(t.TAG)u||(u=!0,i(),o=f(setTimeout(r,n(t._0))),e(t));else{var c=t._0;e({TAG:0,_0:function(n){return n?(i(),c(1)):c(n)}})}}))}}},exports.toArray=function(t){let e=[],r=n,u=!1;return t((function(n){"number"==typeof n?u=!0:n.TAG?(e.push(n._0),r(0)):(r=n=n._0,n(0))})),u||r(1),e},exports.toCallbag=function(n){return function(t,e){if(0===t)return n((function(n){if("number"==typeof n)return 2===e.length?e(2,void 0):e.bind(null,2,void 0);if(n.TAG)return n=n._0,2===e.length?e(1,n):e.bind(null,1,n);var t=n._0;return n=function(n){switch(n){case 1:t(0);break;case 2:t(1)}},2===e.length?e(0,n):e.bind(null,0,n)}))}},exports.toObservable=function(t){var e={subscribe:function(e){let r=n,u=!1;return t((function(n){if("number"==typeof n)return u=!0,e.complete();if(n.TAG){if(u)return;return e.next(n._0),r(0)}r=n=n._0,n(0)})),{unsubscribe:function(){if(!u)return u=!0,r(1)}}}};return e[D]=function(n){return e},e},exports.toPromise=function(n){return new Promise((function(t,e){E(1)(n)((function(n){"number"!=typeof n&&(n.TAG?t(n._0):n._0(0))}))}))};
"use strict";function n(n){}function t(n){return function(t){var e=n.length;let r=!1,u=!1,o=!1,i=0;t({TAG:0,_0:function(f){if(f)r=!0;else if(u)o=!0;else{for(u=o=!0;o&&!r;)i<e?(f=n[i],i=i+1|0,o=!1,t({TAG:1,_0:f})):(r=!0,t(0));u=!1}}})}}function e(){}function r(n){n(0)}function u(n){let t=!1;n({TAG:0,_0:function(e){e?t=!0:t||n(0)}})}var o=t,i=u;function f(n){return void 0===n?{BS_PRIVATE_NESTED_SOME_NONE:0}:null!==n&&void 0!==n.BS_PRIVATE_NESTED_SOME_NONE?{BS_PRIVATE_NESTED_SOME_NONE:n.BS_PRIVATE_NESTED_SOME_NONE+1|0}:n}function c(n){return null===n||void 0===n.BS_PRIVATE_NESTED_SOME_NONE?n:0!==(n=n.BS_PRIVATE_NESTED_SOME_NONE)?{BS_PRIVATE_NESTED_SOME_NONE:n-1|0}:void 0}function _(t){return function(e){return function(r){function u(n){"number"==typeof n?l&&(l=!1,void 0!==(n=o.shift())?(n=t(c(n)),l=!0,n(u)):p?r(0):f||(f=!0,i(0))):n.TAG?l&&(r(n),s?s=!1:_(0)):(_=n=n._0,s=!1,n(0))}let o=[],i=n,f=!1,_=n,l=!1,s=!1,p=!1;e((function(n){"number"==typeof n?p||(p=!0,!l&&function(n){return 0===n.length}(o)&&r(0)):n.TAG?p||(n=n._0,f=!1,l?o.push(n):(n=t(n),l=!0,n(u))):i=n._0})),r({TAG:0,_0:function(n){if(n){if(p||(p=!0,i(1)),l)return l=!1,_(1)}else p||f||(f=!0,i(0)),l&&!s&&(s=!0,_(0))}})}}}function l(n){return n}function s(n){return n}function p(n){return n(0)}function T(t){return function(e){return function(r){let u=n,o=!1,i=[],f=!1;e((function(e){"number"==typeof e?f||(f=!0,0===i.length&&r(0)):e.TAG?f||(o=!1,function(t){function e(n){return n!==_}var c=function(n){"number"==typeof n?0!==i.length&&(i=i.filter(e),n=0===i.length,f&&n?r(0):!o&&n&&(o=!0,u(0))):n.TAG?0!==i.length&&(r({TAG:1,_0:n._0}),_(0)):(_=n=n._0,i=i.concat(n),n(0))};let _=n;1===t.length?t(c):t.bind(null,c)}(t(e._0)),o||(o=!0,u(0))):u=e._0})),r({TAG:0,_0:function(n){n?(f||(f=!0,u(n)),i.forEach((function(t){return t(n)})),i=[]):(o||f?o=!1:(o=!0,u(0)),i.forEach(p))}})}}}function A(n){return n}function b(n){return n}function G(n){return T(b)(n)}function a(n){return function(t){return function(e){let r=!1;return t((function(t){if("number"==typeof t)r||(r=!0,e(t));else if(t.TAG)r||(n(t._0),e(t));else{var u=t._0;e({TAG:0,_0:function(n){if(!r)return n&&(r=!0),u(n)}})}}))}}}function m(n){n(0)}function v(t){return function(e){return function(r){function u(n){c&&("number"==typeof n?(c=!1,l?r(n):i||(i=!0,o(0))):n.TAG?(r(n),_?_=!1:f(0)):(f=n=n._0,_=!1,n(0)))}let o=n,i=!1,f=n,c=!1,_=!1,l=!1;e((function(e){"number"==typeof e?l||(l=!0,c||r(0)):e.TAG?l||(c&&(f(1),f=n),i?i=!1:(i=!0,o(0)),e=t(e._0),c=!0,e(u)):o=e._0})),r({TAG:0,_0:function(n){if(n){if(l||(l=!0,o(1)),c)return c=!1,f(1)}else l||i||(i=!0,o(0)),c&&!_&&(_=!0,f(0))}})}}}function x(n){return n}function y(e){return function(r){return function(o){let i=[],f=n;return r((function(n){"number"==typeof n?t(i)(o):n.TAG?(i.length>=e&&0<e&&i.shift(),i.push(n._0),f(0)):(n=n._0,0>=e?(n(1),u(o)):(f=n,n(0)))}))}}}var E=_,h=T,d=G,S=G,g=a,N=a,O=v,k=y;function P(t){return function(e){let r=n,u=!1;return e((function(n){"number"==typeof n?u=!0:n.TAG?u||(t(n._0),r(0)):(r=n=n._0,n(0))})),{unsubscribe:function(n){if(!u)return u=!0,r(1)}}}}function M(n){}var I=P,D="function"==typeof Symbol?Symbol.observable||(Symbol.observable=Symbol("observable")):"@@observable";function V(n){}function B(){}function R(){}function w(n,t,e){n.addEventListener(t,e)}function L(n,t,e){n.removeEventListener(t,e)}exports.buffer=function(t){return function(e){return function(r){function u(n){"number"==typeof n?_||(_=!0,i(1),0<o.length&&r({TAG:1,_0:o}),r(0)):n.TAG?!_&&0<o.length&&(n=o,o=[],r({TAG:1,_0:n})):f=n._0}let o=[],i=n,f=n,c=!1,_=!1;e((function(n){"number"==typeof n?_||(_=!0,f(1),0<o.length&&r({TAG:1,_0:o}),r(0)):n.TAG?_||(o.push(n._0),c?c=!1:(c=!0,i(0),f(0))):(i=n._0,t(u))})),r({TAG:0,_0:function(n){if(!_){if(n)return _=!0,i(1),f(1);if(!c)return c=!0,i(0),f(0)}}})}}},exports.combine=function(t,e){return function(t,e){return function(r){let u=n,o=n,i=void 0,_=void 0,l=!1,s=0,p=!1;t((function(n){var t=_;"number"==typeof n?1>s?s=s+1|0:p||(p=!0,r(0)):n.TAG?(n=n._0,void 0!==t?p||(i=f(n),l=!1,r({TAG:1,_0:[n,c(t)]})):(i=f(n),l?l=!1:o(0))):u=n._0})),e((function(n){var t=i;"number"==typeof n?1>s?s=s+1|0:p||(p=!0,r(0)):n.TAG?(n=n._0,void 0!==t?p||(_=f(n),l=!1,r({TAG:1,_0:[c(t),n]})):(_=f(n),l?l=!1:u(0))):o=n._0})),r({TAG:0,_0:function(n){if(!p){if(n)return p=!0,u(1),o(1);if(!l)return l=!0,u(n),o(n)}}})}}(t,e)},exports.concat=function(n){return _(s)(t(n))},exports.concatAll=function(n){return _(l)(n)},exports.concatMap=E,exports.debounce=function(n){return function(t){return function(e){let r=void 0,u=!1,o=!1;var i=function(n){void 0!==(n=r)&&(r=void 0,clearTimeout(c(n)))};return t((function(t){if("number"==typeof t)o||(o=!0,void 0!==r?u=!0:e(0));else if(t.TAG)o||(i(),r=f(setTimeout((function(n){r=void 0,e(t),u&&e(0)}),n(t._0))));else{var c=t._0;e({TAG:0,_0:function(n){if(!o)return n?(o=!0,u=!1,i(),c(1)):c(0)}})}}))}}},exports.delay=function(n){return function(t){return function(e){let r=0;return t((function(t){"number"==typeof t||t.TAG?(r=r+1|0,setTimeout((function(n){0!==r&&(r=r-1|0,e(t))}),n)):e(t)}))}}},exports.empty=i,exports.filter=function(t){return function(e){return function(r){let u=n;return e((function(n){"number"==typeof n?r(n):n.TAG?t(n._0)?r(n):u(0):(u=n._0,r(n))}))}}},exports.flatten=S,exports.forEach=function(n){return function(t){P(n)(t)}},exports.fromArray=o,exports.fromCallbag=function(n){return function(t){var e=function(n,e){switch(n){case 0:t({TAG:0,_0:function(n){return e(n?2:1)}});break;case 1:t({TAG:1,_0:e});break;case 2:t(0)}};return 2===n.length?n(0,e):n.bind(null,0,e)}},exports.fromDomEvent=function(n,t){return function(n,t){return function(e){var r=w,u=L,o=function(n){e({TAG:1,_0:n})};return e({TAG:0,_0:function(e){if(e)return u(n,t,o)}}),r(n,t,o)}}(n,t)},exports.fromList=function(n){return function(t){let e=!1,r=!1,u=!1,o=n;t({TAG:0,_0:function(n){if(n)e=!0;else if(r)u=!0;else{for(r=u=!0;u&&!e;)(n=o)?(o=n.tl,u=!1,t({TAG:1,_0:n.hd})):(e=!0,t(0));r=!1}}})}},exports.fromObservable=function(n){var t=void 0!==n[D]?n[D]():n;return function(n){var e=t.subscribe({next:function(t){n({TAG:1,_0:t})},complete:function(){n(0)},error:V});n({TAG:0,_0:function(n){if(n)return e.unsubscribe()}})}},exports.fromPromise=function(n){return function(t){let e=!1;n.then((function(n){return e||(t({TAG:1,_0:n}),t(0)),Promise.resolve(void 0)})),t({TAG:0,_0:function(n){n&&(e=!0)}})}},exports.fromValue=function(n){return function(t){let e=!1;t({TAG:0,_0:function(r){r?e=!0:e||(e=!0,t({TAG:1,_0:n}),t(0))}})}},exports.interval=function(n){return function(t){let e=0;var r=setInterval((function(n){n=e,e=e+1|0,t({TAG:1,_0:n})}),n);t({TAG:0,_0:function(n){n&&clearInterval(r)}})}},exports.make=function(n){return function(t){let r=e,u=!1;r=n({next:function(n){u||t({TAG:1,_0:n})},complete:function(n){u||(u=!0,t(0))}}),t({TAG:0,_0:function(n){if(n&&!u)return u=!0,r()}})}},exports.makeSubject=function(n){let t=[],e=!1;return{source:function(n){function e(t){return t!==n}t=t.concat(n),n({TAG:0,_0:function(n){n&&(t=t.filter(e))}})},next:function(n){e||t.forEach((function(t){t({TAG:1,_0:n})}))},complete:function(n){e||(e=!0,t.forEach(r))}}},exports.map=function(n){return function(t){return function(e){return t((function(t){t="number"==typeof t?0:t.TAG?{TAG:1,_0:n(t._0)}:{TAG:0,_0:t._0},e(t)}))}}},exports.merge=function(n){return T(A)(t(n))},exports.mergeAll=d,exports.mergeMap=h,exports.never=function(t){t({TAG:0,_0:n})},exports.onEnd=function(n){return function(t){return function(e){let r=!1;return t((function(t){if("number"==typeof t){if(r)return;return r=!0,e(t),n()}if(t.TAG)r||e(t);else{var u=t._0;e({TAG:0,_0:function(t){if(!r)return t?(r=!0,u(t),n()):u(t)}})}}))}}},exports.onPush=g,exports.onStart=function(n){return function(t){return function(e){return t((function(t){"number"==typeof t||t.TAG?e(t):(e(t),n())}))}}},exports.pipe=function(){for(var n=arguments,t=arguments[0],e=1,r=arguments.length;e<r;e++)t=n[e](t);return t},exports.publish=function(n){return P(M)(n)},exports.sample=function(t){return function(e){return function(r){let u=n,o=n,i=void 0,_=!1,l=!1;e((function(n){"number"==typeof n?l||(l=!0,o(1),r(0)):n.TAG?(i=f(n._0),_?_=!1:(_=!0,o(0),u(0))):u=n._0})),t((function(n){var t=i;"number"==typeof n?l||(l=!0,u(1),r(0)):n.TAG?void 0===t||l||(i=void 0,r({TAG:1,_0:c(t)})):o=n._0})),r({TAG:0,_0:function(n){if(!l){if(n)return l=!0,u(1),o(1);if(!_)return _=!0,u(0),o(0)}}})}}},exports.scan=function(n,t){return function(n,t){return function(e){return function(r){let u=t;return e((function(t){"number"==typeof t?t=0:t.TAG?(u=n(u,t._0),t={TAG:1,_0:u}):t={TAG:0,_0:t._0},r(t)}))}}}(n,t)},exports.share=function(t){function e(n){"number"==typeof n?(r.forEach(m),r=[]):n.TAG?(o=!1,r.forEach((function(t){t(n)}))):u=n._0}let r=[],u=n,o=!1;return function(n){function i(t){return t!==n}r=r.concat(n),1===r.length&&t(e),n({TAG:0,_0:function(n){if(n){if(r=r.filter(i),0===r.length)return u(1)}else o||(o=!0,u(n))}})}},exports.skip=function(t){return function(e){return function(r){let u=n,o=t;return e((function(n){"number"==typeof n?r(n):n.TAG?0<o?(o=o-1|0,u(0)):r(n):(u=n._0,r(n))}))}}},exports.skipUntil=function(t){return function(e){return function(r){function u(n){"number"==typeof n?f&&(_=!0,o(1)):n.TAG?(f=!1,i(1)):(i=n=n._0,n(0))}let o=n,i=n,f=!0,c=!1,_=!1;e((function(n){"number"==typeof n?(f&&i(1),_=!0,r(0)):n.TAG?f||_?c?c=!1:(c=!0,o(0),i(0)):(c=!1,r(n)):(o=n._0,t(u))})),r({TAG:0,_0:function(n){if(!_)if(n){if(_=!0,o(1),f)return i(1)}else c||(c=!0,f&&i(0),o(0))}})}}},exports.skipWhile=function(t){return function(e){return function(r){let u=n,o=!0;return e((function(n){"number"==typeof n?r(n):n.TAG?o?t(n._0)?u(0):(o=!1,r(n)):r(n):(u=n._0,r(n))}))}}},exports.subscribe=I,exports.switchAll=function(n){return v(x)(n)},exports.switchMap=O,exports.take=function(t){return function(e){return function(r){let u=!1,o=0,i=n;e((function(n){"number"==typeof n?u||(u=!0,r(0)):n.TAG?o<t&&!u&&(o=o+1|0,r(n),!u&&o>=t&&(u=!0,r(0),i(1))):(n=n._0,0>=t?(u=!0,r(0),n(1)):i=n)})),r({TAG:0,_0:function(n){if(!u){if(n)return u=!0,i(1);if(o<t)return i(0)}}})}}},exports.takeLast=k,exports.takeUntil=function(t){return function(e){return function(r){function u(n){"number"!=typeof n&&(n.TAG?(o=!0,i(1),r(0)):(f=n=n._0,n(0)))}let o=!1,i=n,f=n;e((function(n){"number"==typeof n?o||(o=!0,f(1),r(0)):n.TAG?o||r(n):(i=n._0,t(u))})),r({TAG:0,_0:function(n){if(!o)return n?(o=!0,i(1),f(1)):i(0)}})}}},exports.takeWhile=function(t){return function(e){return function(r){let u=n,o=!1;return e((function(n){"number"==typeof n?o||(o=!0,r(0)):n.TAG?o||(t(n._0)?r(n):(o=!0,r(0),u(1))):(u=n._0,r(n))}))}}},exports.tap=N,exports.throttle=function(n){return function(t){return function(e){function r(n){o=void 0,u=!1}let u=!1,o=void 0;var i=function(n){void 0!==(n=o)&&clearTimeout(c(n))};return t((function(t){if("number"==typeof t)i(),e(0);else if(t.TAG)u||(u=!0,i(),o=f(setTimeout(r,n(t._0))),e(t));else{var c=t._0;e({TAG:0,_0:function(n){return n?(i(),c(1)):c(n)}})}}))}}},exports.toArray=function(t){let e=[],r=n,u=!1;return t((function(n){"number"==typeof n?u=!0:n.TAG?(e.push(n._0),r(0)):(r=n=n._0,n(0))})),u||r(1),e},exports.toCallbag=function(n){return function(t,e){if(0===t)return n((function(n){if("number"==typeof n)return 2===e.length?e(2,void 0):e.bind(null,2,void 0);if(n.TAG)return n=n._0,2===e.length?e(1,n):e.bind(null,1,n);var t=n._0;return n=function(n){switch(n){case 1:t(0);break;case 2:t(1)}},2===e.length?e(0,n):e.bind(null,0,n)}))}},exports.toObservable=function(t){var e={subscribe:function(e,r,u){var o=("object"==typeof e?e.next.bind(e):e)||B,i=("object"==typeof e?e.complete.bind(e):u)||R;let f=n,c=!1;return t((function(n){if("number"==typeof n)return c=!0,i();if(n.TAG){if(c)return;return o(n._0),f(0)}f=n=n._0,n(0)})),{unsubscribe:function(){if(!c)return this.closed=!1,c=!0,f(1)},closed:!1}}};return e[D]=function(n){return e},e},exports.toPromise=function(n){return new Promise((function(t,e){y(1)(n)((function(n){"number"!=typeof n&&(n.TAG?t(n._0):n._0(0))}))}))};
{
"name": "wonka",
"description": "A fast push & pull stream library for Reason/OCaml, Flow, and TypeScript",
"version": "5.0.0-rc.0",
"version": "5.0.0-rc.1",
"author": "Phil Pluckthun <phil@kitten.sh>",

@@ -17,3 +17,4 @@ "source": "./src/Wonka.ts",

},
"./package.json": "./package.json"
"./package.json": "./package.json",
"./": "./"
},

@@ -20,0 +21,0 @@ "sideEffects": false,

@@ -43,3 +43,5 @@

var observable = {
subscribe: (function (observer) {
subscribe: (function (_observer) {
var next = ((typeof _observer === 'object' ? _observer.next.bind(_observer) : _observer) || function () {});
var complete = ((typeof _observer === 'object' ? _observer.complete.bind(_observer) : arguments[2]) || function () {});
var state = {

@@ -52,7 +54,7 @@ talkback: Wonka_helpers.talkbackPlaceholder,

state.ended = true;
return observer.complete();
return complete();
}
if (signal.TAG) {
if (!state.ended) {
observer.next(signal._0);
next(signal._0);
return state.talkback(/* Pull */0);

@@ -67,11 +69,15 @@ } else {

}));
return {
unsubscribe: (function () {
if (!state.ended) {
state.ended = true;
return state.talkback(/* Close */1);
}
})
};
var subscription = {
unsubscribe: (function () {
var self = this ;
if (!state.ended) {
self["closed"] = false;
state.ended = true;
return state.talkback(/* Close */1);
}
})
};
subscription["closed"] = false;
return subscription;
})

@@ -78,0 +84,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