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

kefir

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kefir - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

bower.json
{
"name": "kefir",
"version": "0.1.5",
"version": "0.1.6",
"homepage": "https://github.com/pozadi/kefir",

@@ -5,0 +5,0 @@ "authors": [

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

/*! kefir - 0.1.5
/*! kefir - 0.1.6
* https://github.com/pozadi/kefir

@@ -338,3 +338,3 @@ */

if (this.__hasCached) {
callback(this.__cached);
callback.call(context, this.__cached);
}

@@ -341,0 +341,0 @@ this.onChanges(callback, context);

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

/*! kefir - 0.1.5
/*! kefir - 0.1.6
* https://github.com/pozadi/kefir
*/
!function(a){"use strict";function b(){}function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function d(a){return Array.prototype.slice.call(a)}function e(a){var b=function(){};return b.prototype=a,new b}function f(){var a=d(arguments);if(1===a.length)return a[0];for(var b=a.shift(),e=0;e<a.length;e++)for(var f in a[e])c(a[e],f)&&(b[f]=a[e][f]);return b}function g(a,b,c){return a.prototype=e(b.prototype),a.prototype.constructor=a,c&&f(a.prototype,c),a}function h(a,b){for(var c=0;c<a.length;)a[c]===b?a.splice(c,1):c++}function i(a){for(var b=0;b<a.length;b++)if(a[b])return!1;return!0}function j(a){return"[object Array]"===Object.prototype.toString.call(a[0])?a[0]:d(a)}function k(a,b){if(!a)throw new Error(b)}function l(a){return"function"==typeof a}var m={};m.END=["<end>"],m.NO_MORE=["<no more>"];var n=m.Callbacks=g(function(){this.__subscribers=null,this.__contexts=null},Object,{add:function(a,b){null===this.__subscribers&&(this.__subscribers=[],this.__contexts=[]),this.__subscribers.push(a),this.__contexts.push(b)},remove:function(a,b){if(!this.isEmpty()){for(var c=0;c<this.__subscribers.length;c++)this.__subscribers[c]===a&&this.__contexts[c]===b&&(this.__subscribers[c]=null,this.__contexts[c]=null);i(this.__subscribers)&&(this.__subscribers=null,this.__contexts=null)}},isEmpty:function(){return null===this.__subscribers},hasOne:function(){return!this.isEmpty()&&1===this.__subscribers.length},send:function(a){if(!this.isEmpty())for(var b=0,c=this.__subscribers.length;c>b;b++){var d=this.__subscribers[b],e=this.__contexts[b];l(d)&&m.NO_MORE===d.call(e,a)&&this.remove(d,e)}}}),o={__Constructor:function(a){this.__source=a,a.onEnd(this.__sendEnd,this),a instanceof r&&this instanceof r&&a.hasCached()&&this.__handle(a.getCached())},__handle:function(a){this._send(a)},__onFirstIn:function(){this.__source.onChanges(this.__handle,this)},__onLastOut:function(){this.__source.off(this.__handle,this)},__end:function(){this.__source=null}},p=m.Stream=g(function(a,b){l(a)&&(this.__onFirstIn=a),l(b)&&(this.__onLastOut=b),this.__subscribers=new n,this.__endSubscribers=new n},Object,{_send:function(a){this.isEnded()||(a===m.END?this.__end():this.__deliver(a))},__deliver:function(a){this.__subscribers.isEmpty()||(this.__subscribers.send(a),this.__subscribers.isEmpty()&&this.__onLastOut())},on:function(a,b){this.isEnded()||(this.__subscribers.add(a,b),this.__subscribers.hasOne()&&this.__onFirstIn())},onChanges:function(a,b){this.on(a,b)},off:function(a,b){this.isEnded()||(this.__subscribers.remove(a,b),this.__subscribers.isEmpty()&&this.__onLastOut())},onEnd:function(a,b){this.isEnded()?a.call(b):this.__endSubscribers.add(a,b)},offEnd:function(a,b){this.isEnded()||this.__endSubscribers.remove(a,b)},isEnded:function(){return null===this.__subscribers},hasSubscribers:function(){return!this.isEnded()&&!this.__subscribers.isEmpty()},__onFirstIn:b,__onLastOut:b,__sendEnd:function(){this._send(m.END)},__end:function(){this.isEnded()||(this.__onLastOut(),this.__endSubscribers.send(),c(this,"__onFirstIn")&&(this.__onFirstIn=null),c(this,"__onLastOut")&&(this.__onLastOut=null),this.__subscribers=null,this.__endSubscribers=null)}}),q=e(p.prototype);q.__subscribers=null,m.never=function(){return q},m.OnceStream=g(function(a){p.call(this),this.__value=a},p,{__onFirstIn:function(){this._send(this.__value),this.__value=null,this._send(m.END)}}),m.once=function(a){return new m.OnceStream(a)};var r=m.Property=g(function(a,b,c){p.call(this,a,b),this.__hasCached="undefined"!=typeof c,this.__cached=c},p,{onChanges:function(a,b){p.prototype.on.call(this,a,b)},on:function(a,b){this.__hasCached&&a(this.__cached),this.onChanges(a,b)},_send:function(a){this.isEnded()||(this.__hasCached=!0,this.__cached=a),p.prototype._send.call(this,a)},toProperty:function(a){return k("undefined"==typeof a,"can't convert Property to Property with new initial value"),this},hasCached:function(){return this.__hasCached},getCached:function(){return this.__cached}});m.PropertyFromStream=g(function(a,b){r.call(this,null,null,b),this.__Constructor.call(this,a)},r,f({},o,{__end:function(){r.prototype.__end.call(this),o.__end.call(this)}})),p.prototype.toProperty=function(a){return new m.PropertyFromStream(this,a)},m.ChangesStream=g(function(a){p.call(this),this.__Constructor.call(this,a)},p,f({},o,{__end:function(){p.prototype.__end.call(this),o.__end.call(this)}})),r.prototype.changes=function(){return new m.ChangesStream(this)},m.FromBinderStream=g(function(a){p.call(this),this.__subscribe=a},p,{__onFirstIn:function(){var a=this;this.__usubscriber=this.__subscribe(function(b){a._send(b)})},__onLastOut:function(){l(this.__usubscriber)&&this.__usubscriber(),this.__usubscriber=null},__end:function(){p.prototype.__end.call(this),this.__subscribe=null}}),m.fromBinder=function(a){return new m.FromBinderStream(a)},m.Bus=g(function(){p.call(this),this.__plugged=[]},p,{push:function(a){this._send(a)},plug:function(a){if(!this.isEnded()){this.__plugged.push(a),this.hasSubscribers()&&a.on(this._send,this);var b=this;a.onEnd(function(){b.unplug(a)})}},unplug:function(a){this.isEnded()||(a.off(this._send,this),h(this.__plugged,a))},end:function(){this._send(m.END)},__onFirstIn:function(){for(var a=0;a<this.__plugged.length;a++)this.__plugged[a].on(this._send,this)},__onLastOut:function(){for(var a=0;a<this.__plugged.length;a++)this.__plugged[a].off(this._send,this)},__end:function(){p.prototype.__end.call(this),this.__plugged=null,this.push=b}}),m.bus=function(){return new m.Bus};var s=m.FromPollStream=g(function(a,b){p.call(this),this.__interval=a,this.__intervalId=null;var c=this;this.__send=function(){c._send(b())}},p,{__onFirstIn:function(){this.__intervalId=setInterval(this.__send,this.__interval)},__onLastOut:function(){null!==this.__intervalId&&(clearInterval(this.__intervalId),this.__intervalId=null)},__end:function(){p.prototype.__end.call(this),this.__send=null}});m.fromPoll=function(a,b){return new s(a,b)},m.interval=function(a,b){return new s(a,function(){return b})},m.sequentially=function(a,b){return b=b.slice(0),new s(a,function(){return 0===b.length?m.END:b.shift()})},m.repeatedly=function(a,b){var c=-1;return new s(a,function(){return b[++c%b.length]})};var t=f({},o,{__Constructor:function(a,b){a instanceof r?r.call(this):p.call(this),this.__mapFn=b,o.__Constructor.call(this,a)},__handle:function(a){this._send(this.__mapFn(a))},__end:function(){p.prototype.__end.call(this),o.__end.call(this),this.__mapFn=null}});m.MappedStream=g(function(){this.__Constructor.apply(this,arguments)},p,t),m.MappedProperty=g(function(){this.__Constructor.apply(this,arguments)},r,t),p.prototype.map=function(a){return this instanceof r?new m.MappedProperty(this,a):new m.MappedStream(this,a)};var u=f({},t,{__handle:function(a){this.__mapFn(a)&&this._send(a)}});m.FilteredStream=g(function(){this.__Constructor.apply(this,arguments)},p,u),m.FilteredProperty=g(function(){this.__Constructor.apply(this,arguments)},r,u),p.prototype.filter=function(a){return this instanceof r?new m.FilteredProperty(this,a):new m.FilteredStream(this,a)};var v=f({},t,{__handle:function(a){this._send(this.__mapFn(a)?a:m.END)}});m.TakeWhileStream=g(function(){this.__Constructor.apply(this,arguments)},p,v),m.TakeWhileProperty=g(function(){this.__Constructor.apply(this,arguments)},r,v),p.prototype.takeWhile=function(a){return this instanceof r?new m.TakeWhileProperty(this,a):new m.TakeWhileStream(this,a)},p.prototype.take=function(a){return this.takeWhile(function(){return a-->0})},m.FlatMappedStream=g(function(a,b){p.call(this),this.__sourceStream=a,this.__plugged=[],this.__mapFn=b,a.onEnd(this.__sendEnd,this)},p,{__plugResult:function(a){this.__plug(this.__mapFn(a))},__onFirstIn:function(){this.__sourceStream.on(this.__plugResult,this);for(var a=0;a<this.__plugged.length;a++)this.__plugged[a].on(this._send,this)},__onLastOut:function(){this.__sourceStream.off(this.__plugResult,this);for(var a=0;a<this.__plugged.length;a++)this.__plugged[a].off(this._send,this)},__plug:function(a){this.__plugged.push(a),this.hasSubscribers()&&a.on(this._send,this);var b=this;a.onEnd(function(){b.__unplug(a)})},__unplug:function(a){this.isEnded()||(a.off(this._send,this),h(this.__plugged,a))},__end:function(){p.prototype.__end.call(this),this.__sourceStream=null,this.__mapFn=null,this.__plugged=null}}),p.prototype.flatMap=function(a){return new m.FlatMappedStream(this,a)},m.MergedStream=g(function(){p.call(this),this.__sources=j(arguments);for(var a=0;a<this.__sources.length;a++)this.__sources[a].onEnd(this.__unplugFor(this.__sources[a]))},p,{__onFirstIn:function(){for(var a=0;a<this.__sources.length;a++)this.__sources[a].on(this._send,this)},__onLastOut:function(){for(var a=0;a<this.__sources.length;a++)this.__sources[a].off(this._send,this)},__unplug:function(a){a.off(this._send,this),h(this.__sources,a),0===this.__sources.length&&this._send(m.END)},__unplugFor:function(a){var b=this;return function(){b.__unplug(a)}},__end:function(){p.prototype.__end.call(this),this.__sources=null}}),m.merge=function(){return new m.MergedStream(j(arguments))},p.prototype.merge=function(){return m.merge([this].concat(j(arguments)))},m.CombinedStream=g(function(a,b){p.call(this),this.__sources=a,this.__cachedValues=new Array(a.length),this.__hasCached=new Array(a.length),this.__receiveFns=new Array(a.length),this.__mapFn=b;for(var c=0;c<this.__sources.length;c++)this.__receiveFns[c]=this.__receiveFor(c),this.__sources[c].onEnd(this.__unplugFor(c))},p,{__onFirstIn:function(){for(var a=0;a<this.__sources.length;a++)this.__sources[a]&&this.__sources[a].on(this.__receiveFns[a])},__onLastOut:function(){for(var a=0;a<this.__sources.length;a++)this.__sources[a]&&this.__sources[a].off(this.__receiveFns[a])},__unplug:function(a){this.__sources[a].off(this.__receiveFns[a]),this.__sources[a]=null,this.__receiveFns[a]=null,i(this.__sources)&&this._send(m.END)},__unplugFor:function(a){var b=this;return function(){b.__unplug(a)}},__receive:function(a,b){this.__hasCached[a]=!0,this.__cachedValues[a]=b,this.__allCached()&&this._send(l(this.__mapFn)?this.__mapFn.apply(null,this.__cachedValues):this.__cachedValues.slice(0))},__receiveFor:function(a){var b=this;return function(c){b.__receive(a,c)}},__allCached:function(){for(var a=0;a<this.__hasCached.length;a++)if(!this.__hasCached[a])return!1;return!0},__end:function(){p.prototype.__end.call(this),this.__sources=null,this.__cachedValues=null,this.__hasCached=null,this.__receiveFns=null,this.__mapFn=null}}),m.combine=function(a,b){return new m.CombinedStream(a,b)},p.prototype.combine=function(a,b){return m.combine([this].concat(a),b)},p.prototype.log=function(a){function b(b){a?console.log(a,b):console.log(b)}this.on(b),this.onEnd(function(){b(m.END)})},"function"==typeof define&&define.amd?(define([],function(){return m}),a.Kefir=m):"object"==typeof module&&"object"==typeof exports?(module.exports=m,m.Kefir=m):a.Kefir=m}(this);
!function(a){"use strict";function b(){}function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function d(a){return Array.prototype.slice.call(a)}function e(a){var b=function(){};return b.prototype=a,new b}function f(){var a=d(arguments);if(1===a.length)return a[0];for(var b=a.shift(),e=0;e<a.length;e++)for(var f in a[e])c(a[e],f)&&(b[f]=a[e][f]);return b}function g(a,b,c){return a.prototype=e(b.prototype),a.prototype.constructor=a,c&&f(a.prototype,c),a}function h(a,b){for(var c=0;c<a.length;)a[c]===b?a.splice(c,1):c++}function i(a){for(var b=0;b<a.length;b++)if(a[b])return!1;return!0}function j(a){return"[object Array]"===Object.prototype.toString.call(a[0])?a[0]:d(a)}function k(a,b){if(!a)throw new Error(b)}function l(a){return"function"==typeof a}var m={};m.END=["<end>"],m.NO_MORE=["<no more>"];var n=m.Callbacks=g(function(){this.__subscribers=null,this.__contexts=null},Object,{add:function(a,b){null===this.__subscribers&&(this.__subscribers=[],this.__contexts=[]),this.__subscribers.push(a),this.__contexts.push(b)},remove:function(a,b){if(!this.isEmpty()){for(var c=0;c<this.__subscribers.length;c++)this.__subscribers[c]===a&&this.__contexts[c]===b&&(this.__subscribers[c]=null,this.__contexts[c]=null);i(this.__subscribers)&&(this.__subscribers=null,this.__contexts=null)}},isEmpty:function(){return null===this.__subscribers},hasOne:function(){return!this.isEmpty()&&1===this.__subscribers.length},send:function(a){if(!this.isEmpty())for(var b=0,c=this.__subscribers.length;c>b;b++){var d=this.__subscribers[b],e=this.__contexts[b];l(d)&&m.NO_MORE===d.call(e,a)&&this.remove(d,e)}}}),o={__Constructor:function(a){this.__source=a,a.onEnd(this.__sendEnd,this),a instanceof r&&this instanceof r&&a.hasCached()&&this.__handle(a.getCached())},__handle:function(a){this._send(a)},__onFirstIn:function(){this.__source.onChanges(this.__handle,this)},__onLastOut:function(){this.__source.off(this.__handle,this)},__end:function(){this.__source=null}},p=m.Stream=g(function(a,b){l(a)&&(this.__onFirstIn=a),l(b)&&(this.__onLastOut=b),this.__subscribers=new n,this.__endSubscribers=new n},Object,{_send:function(a){this.isEnded()||(a===m.END?this.__end():this.__deliver(a))},__deliver:function(a){this.__subscribers.isEmpty()||(this.__subscribers.send(a),this.__subscribers.isEmpty()&&this.__onLastOut())},on:function(a,b){this.isEnded()||(this.__subscribers.add(a,b),this.__subscribers.hasOne()&&this.__onFirstIn())},onChanges:function(a,b){this.on(a,b)},off:function(a,b){this.isEnded()||(this.__subscribers.remove(a,b),this.__subscribers.isEmpty()&&this.__onLastOut())},onEnd:function(a,b){this.isEnded()?a.call(b):this.__endSubscribers.add(a,b)},offEnd:function(a,b){this.isEnded()||this.__endSubscribers.remove(a,b)},isEnded:function(){return null===this.__subscribers},hasSubscribers:function(){return!this.isEnded()&&!this.__subscribers.isEmpty()},__onFirstIn:b,__onLastOut:b,__sendEnd:function(){this._send(m.END)},__end:function(){this.isEnded()||(this.__onLastOut(),this.__endSubscribers.send(),c(this,"__onFirstIn")&&(this.__onFirstIn=null),c(this,"__onLastOut")&&(this.__onLastOut=null),this.__subscribers=null,this.__endSubscribers=null)}}),q=e(p.prototype);q.__subscribers=null,m.never=function(){return q},m.OnceStream=g(function(a){p.call(this),this.__value=a},p,{__onFirstIn:function(){this._send(this.__value),this.__value=null,this._send(m.END)}}),m.once=function(a){return new m.OnceStream(a)};var r=m.Property=g(function(a,b,c){p.call(this,a,b),this.__hasCached="undefined"!=typeof c,this.__cached=c},p,{onChanges:function(a,b){p.prototype.on.call(this,a,b)},on:function(a,b){this.__hasCached&&a.call(b,this.__cached),this.onChanges(a,b)},_send:function(a){this.isEnded()||(this.__hasCached=!0,this.__cached=a),p.prototype._send.call(this,a)},toProperty:function(a){return k("undefined"==typeof a,"can't convert Property to Property with new initial value"),this},hasCached:function(){return this.__hasCached},getCached:function(){return this.__cached}});m.PropertyFromStream=g(function(a,b){r.call(this,null,null,b),this.__Constructor.call(this,a)},r,f({},o,{__end:function(){r.prototype.__end.call(this),o.__end.call(this)}})),p.prototype.toProperty=function(a){return new m.PropertyFromStream(this,a)},m.ChangesStream=g(function(a){p.call(this),this.__Constructor.call(this,a)},p,f({},o,{__end:function(){p.prototype.__end.call(this),o.__end.call(this)}})),r.prototype.changes=function(){return new m.ChangesStream(this)},m.FromBinderStream=g(function(a){p.call(this),this.__subscribe=a},p,{__onFirstIn:function(){var a=this;this.__usubscriber=this.__subscribe(function(b){a._send(b)})},__onLastOut:function(){l(this.__usubscriber)&&this.__usubscriber(),this.__usubscriber=null},__end:function(){p.prototype.__end.call(this),this.__subscribe=null}}),m.fromBinder=function(a){return new m.FromBinderStream(a)},m.Bus=g(function(){p.call(this),this.__plugged=[]},p,{push:function(a){this._send(a)},plug:function(a){if(!this.isEnded()){this.__plugged.push(a),this.hasSubscribers()&&a.on(this._send,this);var b=this;a.onEnd(function(){b.unplug(a)})}},unplug:function(a){this.isEnded()||(a.off(this._send,this),h(this.__plugged,a))},end:function(){this._send(m.END)},__onFirstIn:function(){for(var a=0;a<this.__plugged.length;a++)this.__plugged[a].on(this._send,this)},__onLastOut:function(){for(var a=0;a<this.__plugged.length;a++)this.__plugged[a].off(this._send,this)},__end:function(){p.prototype.__end.call(this),this.__plugged=null,this.push=b}}),m.bus=function(){return new m.Bus};var s=m.FromPollStream=g(function(a,b){p.call(this),this.__interval=a,this.__intervalId=null;var c=this;this.__send=function(){c._send(b())}},p,{__onFirstIn:function(){this.__intervalId=setInterval(this.__send,this.__interval)},__onLastOut:function(){null!==this.__intervalId&&(clearInterval(this.__intervalId),this.__intervalId=null)},__end:function(){p.prototype.__end.call(this),this.__send=null}});m.fromPoll=function(a,b){return new s(a,b)},m.interval=function(a,b){return new s(a,function(){return b})},m.sequentially=function(a,b){return b=b.slice(0),new s(a,function(){return 0===b.length?m.END:b.shift()})},m.repeatedly=function(a,b){var c=-1;return new s(a,function(){return b[++c%b.length]})};var t=f({},o,{__Constructor:function(a,b){a instanceof r?r.call(this):p.call(this),this.__mapFn=b,o.__Constructor.call(this,a)},__handle:function(a){this._send(this.__mapFn(a))},__end:function(){p.prototype.__end.call(this),o.__end.call(this),this.__mapFn=null}});m.MappedStream=g(function(){this.__Constructor.apply(this,arguments)},p,t),m.MappedProperty=g(function(){this.__Constructor.apply(this,arguments)},r,t),p.prototype.map=function(a){return this instanceof r?new m.MappedProperty(this,a):new m.MappedStream(this,a)};var u=f({},t,{__handle:function(a){this.__mapFn(a)&&this._send(a)}});m.FilteredStream=g(function(){this.__Constructor.apply(this,arguments)},p,u),m.FilteredProperty=g(function(){this.__Constructor.apply(this,arguments)},r,u),p.prototype.filter=function(a){return this instanceof r?new m.FilteredProperty(this,a):new m.FilteredStream(this,a)};var v=f({},t,{__handle:function(a){this._send(this.__mapFn(a)?a:m.END)}});m.TakeWhileStream=g(function(){this.__Constructor.apply(this,arguments)},p,v),m.TakeWhileProperty=g(function(){this.__Constructor.apply(this,arguments)},r,v),p.prototype.takeWhile=function(a){return this instanceof r?new m.TakeWhileProperty(this,a):new m.TakeWhileStream(this,a)},p.prototype.take=function(a){return this.takeWhile(function(){return a-->0})},m.FlatMappedStream=g(function(a,b){p.call(this),this.__sourceStream=a,this.__plugged=[],this.__mapFn=b,a.onEnd(this.__sendEnd,this)},p,{__plugResult:function(a){this.__plug(this.__mapFn(a))},__onFirstIn:function(){this.__sourceStream.on(this.__plugResult,this);for(var a=0;a<this.__plugged.length;a++)this.__plugged[a].on(this._send,this)},__onLastOut:function(){this.__sourceStream.off(this.__plugResult,this);for(var a=0;a<this.__plugged.length;a++)this.__plugged[a].off(this._send,this)},__plug:function(a){this.__plugged.push(a),this.hasSubscribers()&&a.on(this._send,this);var b=this;a.onEnd(function(){b.__unplug(a)})},__unplug:function(a){this.isEnded()||(a.off(this._send,this),h(this.__plugged,a))},__end:function(){p.prototype.__end.call(this),this.__sourceStream=null,this.__mapFn=null,this.__plugged=null}}),p.prototype.flatMap=function(a){return new m.FlatMappedStream(this,a)},m.MergedStream=g(function(){p.call(this),this.__sources=j(arguments);for(var a=0;a<this.__sources.length;a++)this.__sources[a].onEnd(this.__unplugFor(this.__sources[a]))},p,{__onFirstIn:function(){for(var a=0;a<this.__sources.length;a++)this.__sources[a].on(this._send,this)},__onLastOut:function(){for(var a=0;a<this.__sources.length;a++)this.__sources[a].off(this._send,this)},__unplug:function(a){a.off(this._send,this),h(this.__sources,a),0===this.__sources.length&&this._send(m.END)},__unplugFor:function(a){var b=this;return function(){b.__unplug(a)}},__end:function(){p.prototype.__end.call(this),this.__sources=null}}),m.merge=function(){return new m.MergedStream(j(arguments))},p.prototype.merge=function(){return m.merge([this].concat(j(arguments)))},m.CombinedStream=g(function(a,b){p.call(this),this.__sources=a,this.__cachedValues=new Array(a.length),this.__hasCached=new Array(a.length),this.__receiveFns=new Array(a.length),this.__mapFn=b;for(var c=0;c<this.__sources.length;c++)this.__receiveFns[c]=this.__receiveFor(c),this.__sources[c].onEnd(this.__unplugFor(c))},p,{__onFirstIn:function(){for(var a=0;a<this.__sources.length;a++)this.__sources[a]&&this.__sources[a].on(this.__receiveFns[a])},__onLastOut:function(){for(var a=0;a<this.__sources.length;a++)this.__sources[a]&&this.__sources[a].off(this.__receiveFns[a])},__unplug:function(a){this.__sources[a].off(this.__receiveFns[a]),this.__sources[a]=null,this.__receiveFns[a]=null,i(this.__sources)&&this._send(m.END)},__unplugFor:function(a){var b=this;return function(){b.__unplug(a)}},__receive:function(a,b){this.__hasCached[a]=!0,this.__cachedValues[a]=b,this.__allCached()&&this._send(l(this.__mapFn)?this.__mapFn.apply(null,this.__cachedValues):this.__cachedValues.slice(0))},__receiveFor:function(a){var b=this;return function(c){b.__receive(a,c)}},__allCached:function(){for(var a=0;a<this.__hasCached.length;a++)if(!this.__hasCached[a])return!1;return!0},__end:function(){p.prototype.__end.call(this),this.__sources=null,this.__cachedValues=null,this.__hasCached=null,this.__receiveFns=null,this.__mapFn=null}}),m.combine=function(a,b){return new m.CombinedStream(a,b)},p.prototype.combine=function(a,b){return m.combine([this].concat(a),b)},p.prototype.log=function(a){function b(b){a?console.log(a,b):console.log(b)}this.on(b),this.onEnd(function(){b(m.END)})},"function"==typeof define&&define.amd?(define([],function(){return m}),a.Kefir=m):"object"==typeof module&&"object"==typeof exports?(module.exports=m,m.Kefir=m):a.Kefir=m}(this);

@@ -336,3 +336,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

if (this.__hasCached) {
callback(this.__cached);
callback.call(context, this.__cached);
}

@@ -339,0 +339,0 @@ this.onChanges(callback, context);

{
"name": "kefir",
"version": "0.1.5",
"version": "0.1.6",
"description": "Bacon.js inspired FRP library with less memory consumption",

@@ -5,0 +5,0 @@ "main": "dist/kefir.js",

@@ -335,3 +335,3 @@ (function(global){

if (this.__hasCached) {
callback(this.__cached);
callback.call(context, this.__cached);
}

@@ -338,0 +338,0 @@ this.onChanges(callback, context);

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