Comparing version 0.1.8 to 0.1.9
{ | ||
"name": "reflux", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"homepage": "https://github.com/spoike/reflux", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -5,2 +5,10 @@ # Changelog | ||
## v0.1.9 | ||
* Critical bug fixes | ||
## v0.1.8 | ||
Update coming soon | ||
## v0.1.7 | ||
@@ -7,0 +15,0 @@ |
@@ -374,7 +374,2 @@ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Reflux=e()}}(function(){var define,module,exports;return (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(_dereq_,module,exports){ | ||
/** | ||
* By adding this in the mixin we get error message if other React mixins try to use the same prop | ||
*/ | ||
subscriptions: [], | ||
/** | ||
* Cleans up all listener previously registered. | ||
@@ -381,0 +376,0 @@ */ |
@@ -1,1 +0,1 @@ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.Reflux=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){"use strict";function c(a,b,c){this.fn=a,this.context=b,this.once=c||!1}function d(){}d.prototype._events=void 0,d.prototype.listeners=function(a){if(!this._events||!this._events[a])return[];for(var b=0,c=this._events[a].length,d=[];c>b;b++)d.push(this._events[a][b].fn);return d},d.prototype.emit=function(a,b,c,d,e,f){if(!this._events||!this._events[a])return!1;var g,h,i,j=this._events[a],k=j.length,l=arguments.length,m=j[0];if(1===k){switch(m.once&&this.removeListener(a,m.fn,!0),l){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,b),!0;case 3:return m.fn.call(m.context,b,c),!0;case 4:return m.fn.call(m.context,b,c,d),!0;case 5:return m.fn.call(m.context,b,c,d,e),!0;case 6:return m.fn.call(m.context,b,c,d,e,f),!0}for(h=1,g=new Array(l-1);l>h;h++)g[h-1]=arguments[h];m.fn.apply(m.context,g)}else for(h=0;k>h;h++)switch(j[h].once&&this.removeListener(a,j[h].fn,!0),l){case 1:j[h].fn.call(j[h].context);break;case 2:j[h].fn.call(j[h].context,b);break;case 3:j[h].fn.call(j[h].context,b,c);break;default:if(!g)for(i=1,g=new Array(l-1);l>i;i++)g[i-1]=arguments[i];j[h].fn.apply(j[h].context,g)}return!0},d.prototype.on=function(a,b,d){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),this._events[a].push(new c(b,d||this)),this},d.prototype.once=function(a,b,d){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),this._events[a].push(new c(b,d||this,!0)),this},d.prototype.removeListener=function(a,b,c){if(!this._events||!this._events[a])return this;var d=this._events[a],e=[];if(b)for(var f=0,g=d.length;g>f;f++)d[f].fn!==b&&d[f].once!==c&&e.push(d[f]);return this._events[a]=e.length?e:null,this},d.prototype.removeAllListeners=function(a){return this._events?(a?this._events[a]=null:this._events={},this):this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prototype.setMaxListeners=function(){return this},d.EventEmitter=d,d.EventEmitter2=d,d.EventEmitter3=d,"object"==typeof b&&b.exports&&(b.exports=d)},{}],2:[function(a,b,c){c.createdStores=[],c.createdActions=[],c.reset=function(){for(;c.createdStores.length;)c.createdStores.pop();for(;c.createdActions.length;)c.createdActions.pop()}},{}],3:[function(a,b){var c=a("./utils");b.exports={hasListener:function(a){for(var b,c=0;c<(this.subscriptions||[]).length;++c)if(b=this.subscriptions[c].listenable,b===a||b.hasListener&&b.hasListener(a))return!0;return!1},listenToMany:function(a){for(var b in a){var d=c.callbackName(b),e=this[d]?d:this[b]?b:void 0;e&&this.listenTo(a[b],e,this[d+"Default"]||this[e+"Default"]||e)}},validateListening:function(a){return a===this?"Listener is not able to listen to itself":c.isFunction(a.listen)?this.hasListener(a)?"Listener cannot listen to this listenable because of circular loop":void 0:a+" is missing a listen method"},listenTo:function(a,b,c){var d=this.validateListening(a),e=this;if(d)throw Error(d);this.fetchDefaultData(a,c),this.subscriptions||(this.subscriptions=[]);var f=a.listen(this[b]||b,this),g=function(b){f(),b||e.subscriptions.splice(e.subscriptions.indexOf(a),1)},h={stop:g,listenable:a};return this.subscriptions.push(h),h},stopListeningTo:function(a,b){for(var c=0;c<(this.subscriptions||[]).length;c++)if(this.subscriptions[c].listenable===a)return this.subscriptions[c].stop(b),!0;return!1},stopListeningToAll:function(){(this.subscriptions||[]).forEach(function(a){a.stop(!0)}),this.subscriptions=[]},fetchDefaultData:function(a,b){b=b&&this[b]||b;var d=this;c.isFunction(b)&&c.isFunction(a.getDefaultData)&&(data=a.getDefaultData(),data&&c.isFunction(data.then)?data.then(function(){b.apply(d,arguments)}):b.call(this,data))}}},{"./utils":13}],4:[function(a,b){var c=a("./utils"),d=a("./ListenerMethods");b.exports=c.extend({subscriptions:[],componentWillUnmount:d.stopListeningToAll},d)},{"./ListenerMethods":3,"./utils":13}],5:[function(a,b){var c=a("./utils");b.exports={preEmit:function(){},shouldEmit:function(){return!0},listen:function(a,b){var c=function(c){a.apply(b,c)},d=this;return this.emitter.addListener(this.eventLabel,c),function(){d.emitter.removeListener(d.eventLabel,c)}},trigger:function(){var a=arguments,b=this.preEmit.apply(this,a);a=void 0===b?a:c.isArguments(b)?b:[].concat(b),this.shouldEmit.apply(this,a)&&this.emitter.emit(this.eventLabel,a)},triggerAsync:function(){var a=arguments,b=this;c.nextTick(function(){b.trigger.apply(b,a)})}}},{"./utils":13}],6:[function(a,b){var c=a("./createAction"),d=Array.prototype.slice;b.exports=function(){function a(){g=new Array(i),h=new Array(i)}function b(a){return function(){g[a]=!0,h[a]=d.call(arguments),e()}}function e(){f()&&(j.apply(j,h),a())}function f(){for(var a=0;i>a;a++)if(!g[a])return!1;return!0}var g,h,i=arguments.length,j=c();j.hasListener=function(a){for(var b,c=0;c<h.length;++c)if(b=h[c],b===a||b.hasListener&&b.hasListener(a))return!0;return!1},a();for(var k=0;i>k;k++)arguments[k].listen(b(k),null);return j}},{"./createAction":8}],7:[function(a,b){var c=a("../src"),d=a("./utils");b.exports=function(a,b){return{componentDidMount:function(){for(var e in c.ListenerMethods)if(this[e]!==c.ListenerMethods[e]){if(this[e])throw"Can't have other property '"+e+"' when using Reflux.listenTo!";this[e]=c.ListenerMethods[e]}var f=this,g=b?function(a){f.setState(d.object([b],[a]))}:this.setState;this.listenTo(a,g,g)},componentWillUnmount:c.ListenerMixin.componentWillUnmount}}},{"../src":10,"./utils":13}],8:[function(a,b){var c=a("./utils"),d=a("../src"),e=a("./Keep");b.exports=function(a){a=a||{};var b=c.extend({eventLabel:"action",emitter:new c.EventEmitter},a,d.PublisherMethods,{preEmit:a.preEmit||d.PublisherMethods.preEmit,shouldEmit:a.shouldEmit||d.PublisherMethods.shouldEmit}),f=function(){b.triggerAsync.apply(b,arguments)};return c.extend(f,b),e.createdActions.push(f),f}},{"../src":10,"./Keep":2,"./utils":13}],9:[function(a,b){var c=a("./utils"),d=a("../src"),e=a("./Keep");b.exports=function(a){function b(){var a,b=0;if(this.subscriptions=[],this.emitter=new c.EventEmitter,this.eventLabel="change",this.init&&c.isFunction(this.init)&&this.init(),this.listenables)for(a=[].concat(this.listenables);b<a.length;b++)this.listenToMany(a[b])}a=a||{},c.extend(b.prototype,a,d.ListenerMethods,d.PublisherMethods,{preEmit:a.preEmit||d.PublisherMethods.preEmit,shouldEmit:a.shouldEmit||d.PublisherMethods.shouldEmit});var f=new b;return e.createdStores.push(f),f}},{"../src":10,"./Keep":2,"./utils":13}],10:[function(a,b,c){c.ListenerMethods=a("./ListenerMethods"),c.PublisherMethods=a("./PublisherMethods"),c.createAction=a("./createAction"),c.createStore=a("./createStore"),c.connect=a("./connect"),c.ListenerMixin=a("./ListenerMixin"),c.listenTo=a("./listenTo"),c.listenToMany=a("./listenToMany"),c.all=a("./all"),c.createActions=function(a){for(var b=0,d={};b<a.length;b++)d[a[b]]=c.createAction();return d},c.setEventEmitter=function(b){var c=a("./utils");c.EventEmitter=b},c.nextTick=function(b){var c=a("./utils");c.nextTick=b},c.__keep=a("./Keep")},{"./Keep":2,"./ListenerMethods":3,"./ListenerMixin":4,"./PublisherMethods":5,"./all":6,"./connect":7,"./createAction":8,"./createStore":9,"./listenTo":11,"./listenToMany":12,"./utils":13}],11:[function(a,b){var c=a("../src");b.exports=function(a,b,d){return{componentDidMount:function(){for(var e in c.ListenerMethods)if(this[e]!==c.ListenerMethods[e]){if(this[e])throw"Can't have other property '"+e+"' when using Reflux.listenTo!";this[e]=c.ListenerMethods[e]}this.listenTo(a,b,d)},componentWillUnmount:c.ListenerMethods.stopListeningToAll}}},{"../src":10}],12:[function(a,b){var c=a("../src");b.exports=function(a){return{componentDidMount:function(){for(var b in c.ListenerMethods)if(this[b]!==c.ListenerMethods[b]){if(this[b])throw"Can't have other property '"+b+"' when using Reflux.listenToMany!";this[b]=c.ListenerMethods[b]}this.listenToMany(a)},componentWillUnmount:c.ListenerMethods.stopListeningToAll}}},{"../src":10}],13:[function(a,b,c){var d=c.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a};c.extend=function(a){if(!d(a))return a;for(var b,c,e=1,f=arguments.length;f>e;e++){b=arguments[e];for(c in b)a[c]=b[c]}return a},c.isFunction=function(a){return"function"==typeof a},c.EventEmitter=a("eventemitter3"),c.nextTick=function(a){setTimeout(a,0)},c.callbackName=function(a){return"on"+a.charAt(0).toUpperCase()+a.slice(1)},c.object=function(a,b){for(var c={},d=0;d<a.length;d++)c[a[d]]=b[d];return c},c.isArguments=function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&("[object Arguments]"===toString.call(a)||hasOwnProperty.call(a,"callee"&&!propertyIsEnumerable.call(a,"callee")))||!1}},{eventemitter3:1}]},{},[10])(10)}); | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.Reflux=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){"use strict";function c(a,b,c){this.fn=a,this.context=b,this.once=c||!1}function d(){}d.prototype._events=void 0,d.prototype.listeners=function(a){if(!this._events||!this._events[a])return[];for(var b=0,c=this._events[a].length,d=[];c>b;b++)d.push(this._events[a][b].fn);return d},d.prototype.emit=function(a,b,c,d,e,f){if(!this._events||!this._events[a])return!1;var g,h,i,j=this._events[a],k=j.length,l=arguments.length,m=j[0];if(1===k){switch(m.once&&this.removeListener(a,m.fn,!0),l){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,b),!0;case 3:return m.fn.call(m.context,b,c),!0;case 4:return m.fn.call(m.context,b,c,d),!0;case 5:return m.fn.call(m.context,b,c,d,e),!0;case 6:return m.fn.call(m.context,b,c,d,e,f),!0}for(h=1,g=new Array(l-1);l>h;h++)g[h-1]=arguments[h];m.fn.apply(m.context,g)}else for(h=0;k>h;h++)switch(j[h].once&&this.removeListener(a,j[h].fn,!0),l){case 1:j[h].fn.call(j[h].context);break;case 2:j[h].fn.call(j[h].context,b);break;case 3:j[h].fn.call(j[h].context,b,c);break;default:if(!g)for(i=1,g=new Array(l-1);l>i;i++)g[i-1]=arguments[i];j[h].fn.apply(j[h].context,g)}return!0},d.prototype.on=function(a,b,d){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),this._events[a].push(new c(b,d||this)),this},d.prototype.once=function(a,b,d){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),this._events[a].push(new c(b,d||this,!0)),this},d.prototype.removeListener=function(a,b,c){if(!this._events||!this._events[a])return this;var d=this._events[a],e=[];if(b)for(var f=0,g=d.length;g>f;f++)d[f].fn!==b&&d[f].once!==c&&e.push(d[f]);return this._events[a]=e.length?e:null,this},d.prototype.removeAllListeners=function(a){return this._events?(a?this._events[a]=null:this._events={},this):this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prototype.setMaxListeners=function(){return this},d.EventEmitter=d,d.EventEmitter2=d,d.EventEmitter3=d,"object"==typeof b&&b.exports&&(b.exports=d)},{}],2:[function(a,b,c){c.createdStores=[],c.createdActions=[],c.reset=function(){for(;c.createdStores.length;)c.createdStores.pop();for(;c.createdActions.length;)c.createdActions.pop()}},{}],3:[function(a,b){var c=a("./utils");b.exports={hasListener:function(a){for(var b,c=0;c<(this.subscriptions||[]).length;++c)if(b=this.subscriptions[c].listenable,b===a||b.hasListener&&b.hasListener(a))return!0;return!1},listenToMany:function(a){for(var b in a){var d=c.callbackName(b),e=this[d]?d:this[b]?b:void 0;e&&this.listenTo(a[b],e,this[d+"Default"]||this[e+"Default"]||e)}},validateListening:function(a){return a===this?"Listener is not able to listen to itself":c.isFunction(a.listen)?this.hasListener(a)?"Listener cannot listen to this listenable because of circular loop":void 0:a+" is missing a listen method"},listenTo:function(a,b,c){var d=this.validateListening(a),e=this;if(d)throw Error(d);this.fetchDefaultData(a,c),this.subscriptions||(this.subscriptions=[]);var f=a.listen(this[b]||b,this),g=function(b){f(),b||e.subscriptions.splice(e.subscriptions.indexOf(a),1)},h={stop:g,listenable:a};return this.subscriptions.push(h),h},stopListeningTo:function(a,b){for(var c=0;c<(this.subscriptions||[]).length;c++)if(this.subscriptions[c].listenable===a)return this.subscriptions[c].stop(b),!0;return!1},stopListeningToAll:function(){(this.subscriptions||[]).forEach(function(a){a.stop(!0)}),this.subscriptions=[]},fetchDefaultData:function(a,b){b=b&&this[b]||b;var d=this;c.isFunction(b)&&c.isFunction(a.getDefaultData)&&(data=a.getDefaultData(),data&&c.isFunction(data.then)?data.then(function(){b.apply(d,arguments)}):b.call(this,data))}}},{"./utils":13}],4:[function(a,b){var c=a("./utils"),d=a("./ListenerMethods");b.exports=c.extend({componentWillUnmount:d.stopListeningToAll},d)},{"./ListenerMethods":3,"./utils":13}],5:[function(a,b){var c=a("./utils");b.exports={preEmit:function(){},shouldEmit:function(){return!0},listen:function(a,b){var c=function(c){a.apply(b,c)},d=this;return this.emitter.addListener(this.eventLabel,c),function(){d.emitter.removeListener(d.eventLabel,c)}},trigger:function(){var a=arguments,b=this.preEmit.apply(this,a);a=void 0===b?a:c.isArguments(b)?b:[].concat(b),this.shouldEmit.apply(this,a)&&this.emitter.emit(this.eventLabel,a)},triggerAsync:function(){var a=arguments,b=this;c.nextTick(function(){b.trigger.apply(b,a)})}}},{"./utils":13}],6:[function(a,b){var c=a("./createAction"),d=Array.prototype.slice;b.exports=function(){function a(){g=new Array(i),h=new Array(i)}function b(a){return function(){g[a]=!0,h[a]=d.call(arguments),e()}}function e(){f()&&(j.apply(j,h),a())}function f(){for(var a=0;i>a;a++)if(!g[a])return!1;return!0}var g,h,i=arguments.length,j=c();j.hasListener=function(a){for(var b,c=0;c<h.length;++c)if(b=h[c],b===a||b.hasListener&&b.hasListener(a))return!0;return!1},a();for(var k=0;i>k;k++)arguments[k].listen(b(k),null);return j}},{"./createAction":8}],7:[function(a,b){var c=a("../src"),d=a("./utils");b.exports=function(a,b){return{componentDidMount:function(){for(var e in c.ListenerMethods)if(this[e]!==c.ListenerMethods[e]){if(this[e])throw"Can't have other property '"+e+"' when using Reflux.listenTo!";this[e]=c.ListenerMethods[e]}var f=this,g=b?function(a){f.setState(d.object([b],[a]))}:this.setState;this.listenTo(a,g,g)},componentWillUnmount:c.ListenerMixin.componentWillUnmount}}},{"../src":10,"./utils":13}],8:[function(a,b){var c=a("./utils"),d=a("../src"),e=a("./Keep");b.exports=function(a){a=a||{};var b=c.extend({eventLabel:"action",emitter:new c.EventEmitter},a,d.PublisherMethods,{preEmit:a.preEmit||d.PublisherMethods.preEmit,shouldEmit:a.shouldEmit||d.PublisherMethods.shouldEmit}),f=function(){b.triggerAsync.apply(b,arguments)};return c.extend(f,b),e.createdActions.push(f),f}},{"../src":10,"./Keep":2,"./utils":13}],9:[function(a,b){var c=a("./utils"),d=a("../src"),e=a("./Keep");b.exports=function(a){function b(){var a,b=0;if(this.subscriptions=[],this.emitter=new c.EventEmitter,this.eventLabel="change",this.init&&c.isFunction(this.init)&&this.init(),this.listenables)for(a=[].concat(this.listenables);b<a.length;b++)this.listenToMany(a[b])}a=a||{},c.extend(b.prototype,a,d.ListenerMethods,d.PublisherMethods,{preEmit:a.preEmit||d.PublisherMethods.preEmit,shouldEmit:a.shouldEmit||d.PublisherMethods.shouldEmit});var f=new b;return e.createdStores.push(f),f}},{"../src":10,"./Keep":2,"./utils":13}],10:[function(a,b,c){c.ListenerMethods=a("./ListenerMethods"),c.PublisherMethods=a("./PublisherMethods"),c.createAction=a("./createAction"),c.createStore=a("./createStore"),c.connect=a("./connect"),c.ListenerMixin=a("./ListenerMixin"),c.listenTo=a("./listenTo"),c.listenToMany=a("./listenToMany"),c.all=a("./all"),c.createActions=function(a){for(var b=0,d={};b<a.length;b++)d[a[b]]=c.createAction();return d},c.setEventEmitter=function(b){var c=a("./utils");c.EventEmitter=b},c.nextTick=function(b){var c=a("./utils");c.nextTick=b},c.__keep=a("./Keep")},{"./Keep":2,"./ListenerMethods":3,"./ListenerMixin":4,"./PublisherMethods":5,"./all":6,"./connect":7,"./createAction":8,"./createStore":9,"./listenTo":11,"./listenToMany":12,"./utils":13}],11:[function(a,b){var c=a("../src");b.exports=function(a,b,d){return{componentDidMount:function(){for(var e in c.ListenerMethods)if(this[e]!==c.ListenerMethods[e]){if(this[e])throw"Can't have other property '"+e+"' when using Reflux.listenTo!";this[e]=c.ListenerMethods[e]}this.listenTo(a,b,d)},componentWillUnmount:c.ListenerMethods.stopListeningToAll}}},{"../src":10}],12:[function(a,b){var c=a("../src");b.exports=function(a){return{componentDidMount:function(){for(var b in c.ListenerMethods)if(this[b]!==c.ListenerMethods[b]){if(this[b])throw"Can't have other property '"+b+"' when using Reflux.listenToMany!";this[b]=c.ListenerMethods[b]}this.listenToMany(a)},componentWillUnmount:c.ListenerMethods.stopListeningToAll}}},{"../src":10}],13:[function(a,b,c){var d=c.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a};c.extend=function(a){if(!d(a))return a;for(var b,c,e=1,f=arguments.length;f>e;e++){b=arguments[e];for(c in b)a[c]=b[c]}return a},c.isFunction=function(a){return"function"==typeof a},c.EventEmitter=a("eventemitter3"),c.nextTick=function(a){setTimeout(a,0)},c.callbackName=function(a){return"on"+a.charAt(0).toUpperCase()+a.slice(1)},c.object=function(a,b){for(var c={},d=0;d<a.length;d++)c[a[d]]=b[d];return c},c.isArguments=function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&("[object Arguments]"===toString.call(a)||hasOwnProperty.call(a,"callee"&&!propertyIsEnumerable.call(a,"callee")))||!1}},{eventemitter3:1}]},{},[10])(10)}); |
{ | ||
"name": "reflux", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "A simple library for uni-directional dataflow application architecture inspired by ReactJS Flux", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -11,7 +11,2 @@ var _ = require('./utils'), | ||
/** | ||
* By adding this in the mixin we get error message if other React mixins try to use the same prop | ||
*/ | ||
subscriptions: [], | ||
/** | ||
* Cleans up all listener previously registered. | ||
@@ -18,0 +13,0 @@ */ |
@@ -40,2 +40,19 @@ var chai = require('chai'), | ||
describe('using a store and listening to it', function() { | ||
beforeEach(function () { | ||
store = Reflux.createStore({ | ||
init: function() { | ||
this.listenTo(action, this.trigger); | ||
} | ||
}); | ||
component.listenTo(store, function() {}); | ||
}); | ||
it('should be possible to listen to the store using two different components', function() { | ||
var component2 = Object.create(Reflux.ListenerMixin); | ||
component2.listenTo(store, function() {}); | ||
}); | ||
}); | ||
describe('get default data', function () { | ||
@@ -42,0 +59,0 @@ beforeEach(function() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
135421
2680
0