Comparing version 0.2.8 to 0.2.9
{ | ||
"name": "reflux", | ||
"version": "0.2.7", | ||
"homepage": "https://github.com/spoike/reflux", | ||
@@ -5,0 +4,0 @@ "authors": [ |
@@ -5,2 +5,18 @@ # Changelog | ||
## v0.2.9 | ||
* Fixes issue with a join check [#272](https://github.com/spoike/refluxjs/pull/272). | ||
* Added links to README. See [#341](https://github.com/spoike/refluxjs/pull/341), [#361](https://github.com/spoike/refluxjs/pull/361) | ||
## v0.2.8 | ||
See [#345](https://github.com/spoike/refluxjs/pull/345). | ||
* Fixes [#239](https://github.com/spoike/refluxjs/pull/239), checks for component mounted state before trying to mount component | ||
* Adds more example apps to README | ||
* Fixes some typo's in the readme | ||
* Improves documentation on action handlers in stores | ||
* Updates dependencies | ||
* Specifies react compatibility via peerDependencies | ||
## v0.2.7 | ||
@@ -7,0 +23,0 @@ |
@@ -1068,3 +1068,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Reflux = f()}})(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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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){ | ||
return function(/* listenables..., callback*/){ | ||
_.throwIf(arguments.length < 3,'Cannot create a join with less than 2 listenables!'); | ||
_.throwIf(arguments.length < 2,'Cannot create a join with less than 2 listenables!'); | ||
var listenables = slice.call(arguments), | ||
@@ -1071,0 +1071,0 @@ callback = listenables.pop(), |
@@ -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;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Reflux=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,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,c){"use strict";function d(a,b,c){this.fn=a,this.context=b,this.once=c||!1}function e(){}e.prototype._events=void 0,e.prototype.listeners=function(a){if(!this._events||!this._events[a])return[];if(this._events[a].fn)return[this._events[a].fn];for(var b=0,c=this._events[a].length,d=new Array(c);c>b;b++)d[b]=this._events[a][b].fn;return d},e.prototype.emit=function(a,b,c,d,e,f){if(!this._events||!this._events[a])return!1;var g,h,i=this._events[a],j=arguments.length;if("function"==typeof i.fn){switch(i.once&&this.removeListener(a,i.fn,!0),j){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,b),!0;case 3:return i.fn.call(i.context,b,c),!0;case 4:return i.fn.call(i.context,b,c,d),!0;case 5:return i.fn.call(i.context,b,c,d,e),!0;case 6:return i.fn.call(i.context,b,c,d,e,f),!0}for(h=1,g=new Array(j-1);j>h;h++)g[h-1]=arguments[h];i.fn.apply(i.context,g)}else{var k,l=i.length;for(h=0;l>h;h++)switch(i[h].once&&this.removeListener(a,i[h].fn,!0),j){case 1:i[h].fn.call(i[h].context);break;case 2:i[h].fn.call(i[h].context,b);break;case 3:i[h].fn.call(i[h].context,b,c);break;default:if(!g)for(k=1,g=new Array(j-1);j>k;k++)g[k-1]=arguments[k];i[h].fn.apply(i[h].context,g)}}return!0},e.prototype.on=function(a,b,c){var e=new d(b,c||this);return this._events||(this._events={}),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],e]:this._events[a].push(e):this._events[a]=e,this},e.prototype.once=function(a,b,c){var e=new d(b,c||this,!0);return this._events||(this._events={}),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],e]:this._events[a].push(e):this._events[a]=e,this},e.prototype.removeListener=function(a,b,c){if(!this._events||!this._events[a])return this;var d=this._events[a],e=[];if(b&&(d.fn&&(d.fn!==b||c&&!d.once)&&e.push(d),!d.fn))for(var f=0,g=d.length;g>f;f++)(d[f].fn!==b||c&&!d[f].once)&&e.push(d[f]);return e.length?this._events[a]=1===e.length?e[0]:e:delete this._events[a],this},e.prototype.removeAllListeners=function(a){return this._events?(a?delete this._events[a]:this._events={},this):this},e.prototype.off=e.prototype.removeListener,e.prototype.addListener=e.prototype.on,e.prototype.setMaxListeners=function(){return this},e.EventEmitter=e,e.EventEmitter2=e,e.EventEmitter3=e,b.exports=e},{}],2:[function(b,c,d){(function(b){!function(b,d,e){d[b]=d[b]||e(),"undefined"!=typeof c&&c.exports?c.exports=d[b]:"function"==typeof a&&a.amd&&a(function(){return d[b]})}("Promise","undefined"!=typeof b?b:this,function(){"use strict";function a(a,b){m.add(a,b),l||(l=o(m.drain))}function b(a){var b,c=typeof a;return null==a||"object"!=c&&"function"!=c||(b=a.then),"function"==typeof b?b:!1}function c(){for(var a=0;a<this.chain.length;a++)d(this,1===this.state?this.chain[a].success:this.chain[a].failure,this.chain[a]);this.chain.length=0}function d(a,c,d){var e,f;try{c===!1?d.reject(a.msg):(e=c===!0?a.msg:c.call(void 0,a.msg),e===d.promise?d.reject(TypeError("Promise-chain cycle")):(f=b(e))?f.call(e,d.resolve,d.reject):d.resolve(e))}catch(g){d.reject(g)}}function e(d){var g,i,j=this;if(!j.triggered){j.triggered=!0,j.def&&(j=j.def);try{(g=b(d))?(i=new h(j),g.call(d,function(){e.apply(i,arguments)},function(){f.apply(i,arguments)})):(j.msg=d,j.state=1,j.chain.length>0&&a(c,j))}catch(k){f.call(i||new h(j),k)}}}function f(b){var d=this;d.triggered||(d.triggered=!0,d.def&&(d=d.def),d.msg=b,d.state=2,d.chain.length>0&&a(c,d))}function g(a,b,c,d){for(var e=0;e<b.length;e++)!function(e){a.resolve(b[e]).then(function(a){c(e,a)},d)}(e)}function h(a){this.def=a,this.triggered=!1}function i(a){this.promise=a,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function j(b){if("function"!=typeof b)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var d=new i(this);this.then=function(b,e){var f={success:"function"==typeof b?b:!0,failure:"function"==typeof e?e:!1};return f.promise=new this.constructor(function(a,b){if("function"!=typeof a||"function"!=typeof b)throw TypeError("Not a function");f.resolve=a,f.reject=b}),d.chain.push(f),0!==d.state&&a(c,d),f.promise},this["catch"]=function(a){return this.then(void 0,a)};try{b.call(void 0,function(a){e.call(d,a)},function(a){f.call(d,a)})}catch(g){f.call(d,g)}}var k,l,m,n=Object.prototype.toString,o="undefined"!=typeof setImmediate?function(a){return setImmediate(a)}:setTimeout;try{Object.defineProperty({},"x",{}),k=function(a,b,c,d){return Object.defineProperty(a,b,{value:c,writable:!0,configurable:d!==!1})}}catch(p){k=function(a,b,c){return a[b]=c,a}}m=function(){function a(a,b){this.fn=a,this.self=b,this.next=void 0}var b,c,d;return{add:function(e,f){d=new a(e,f),c?c.next=d:b=d,c=d,d=void 0},drain:function(){var a=b;for(b=c=l=void 0;a;)a.fn.call(a.self),a=a.next}}}();var q=k({},"constructor",j,!1);return j.prototype=q,k(q,"__NPO__",0,!1),k(j,"resolve",function(a){var b=this;return a&&"object"==typeof a&&1===a.__NPO__?a:new b(function(b,c){if("function"!=typeof b||"function"!=typeof c)throw TypeError("Not a function");b(a)})}),k(j,"reject",function(a){return new this(function(b,c){if("function"!=typeof b||"function"!=typeof c)throw TypeError("Not a function");c(a)})}),k(j,"all",function(a){var b=this;return"[object Array]"!=n.call(a)?b.reject(TypeError("Not an array")):0===a.length?b.resolve([]):new b(function(c,d){if("function"!=typeof c||"function"!=typeof d)throw TypeError("Not a function");var e=a.length,f=Array(e),h=0;g(b,a,function(a,b){f[a]=b,++h===e&&c(f)},d)})}),k(j,"race",function(a){var b=this;return"[object Array]"!=n.call(a)?b.reject(TypeError("Not an array")):new b(function(c,d){if("function"!=typeof c||"function"!=typeof d)throw TypeError("Not a function");g(b,a,function(a,b){c(b)},d)})}),j})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(a,b,c){b.exports={}},{}],4:[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()}},{}],5:[function(a,b,c){var d=a("./utils"),e=a("./joins").instanceJoinCreator,f=function(a){for(var b,c=0,d={};c<(a.children||[]).length;++c)b=a.children[c],a[b]&&(d[b]=a[b]);return d},g=function(a){var b={};for(var c in a){var e=a[c],h=f(e),i=g(h);b[c]=e;for(var j in i){var k=i[j];b[c+d.capitalize(j)]=k}}return b};b.exports={hasListener:function(a){for(var b,c,d,e=0;e<(this.subscriptions||[]).length;++e)for(d=[].concat(this.subscriptions[e].listenable),b=0;b<d.length;b++)if(c=d[b],c===a||c.hasListener&&c.hasListener(a))return!0;return!1},listenToMany:function(a){var b=g(a);for(var c in b){var e=d.callbackName(c),f=this[e]?e:this[c]?c:void 0;f&&this.listenTo(b[c],f,this[e+"Default"]||this[f+"Default"]||f)}},validateListening:function(a){return a===this?"Listener is not able to listen to itself":d.isFunction(a.listen)?a.hasListener&&a.hasListener(this)?"Listener cannot listen to this listenable because of circular loop":void 0:a+" is missing a listen method"},listenTo:function(a,b,c){var e,f,g,h=this.subscriptions=this.subscriptions||[];return d.throwIf(this.validateListening(a)),this.fetchInitialState(a,c),e=a.listen(this[b]||b,this),f=function(){var a=h.indexOf(g);d.throwIf(-1===a,"Tried to remove listen already gone from subscriptions list!"),h.splice(a,1),e()},g={stop:f,listenable:a},h.push(g),g},stopListeningTo:function(a){for(var b,c=0,e=this.subscriptions||[];c<e.length;c++)if(b=e[c],b.listenable===a)return b.stop(),d.throwIf(-1!==e.indexOf(b),"Failed to remove listen from subscriptions list!"),!0;return!1},stopListeningToAll:function(){for(var a,b=this.subscriptions||[];a=b.length;)b[0].stop(),d.throwIf(b.length!==a-1,"Failed to remove listen from subscriptions list!")},fetchInitialState:function(a,b){b=b&&this[b]||b;var c=this;if(d.isFunction(b)&&d.isFunction(a.getInitialState)){var e=a.getInitialState();e&&d.isFunction(e.then)?e.then(function(){b.apply(c,arguments)}):b.call(this,e)}},joinTrailing:e("last"),joinLeading:e("first"),joinConcat:e("all"),joinStrict:e("strict")}},{"./joins":15,"./utils":19}],6:[function(a,b,c){var d=a("./utils"),e=a("./ListenerMethods");b.exports=d.extend({componentWillUnmount:e.stopListeningToAll},e)},{"./ListenerMethods":5,"./utils":19}],7:[function(a,b,c){var d=a("./utils");b.exports={preEmit:function(){},shouldEmit:function(){return!0},listen:function(a,b){b=b||this;var c=function(c){e||a.apply(b,c)},d=this,e=!1;return this.emitter.addListener(this.eventLabel,c),function(){e=!0,d.emitter.removeListener(d.eventLabel,c)}},promise:function(a){var b=this,c=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0;if(!c)throw new Error('Publisher must have "completed" and "failed" child publishers');a.then(function(a){return b.completed(a)},function(a){return b.failed(a)})},listenAndPromise:function(a,b){var c=this;b=b||this,this.willCallPromise=(this.willCallPromise||0)+1;var d=this.listen(function(){if(!a)throw new Error("Expected a function returning a promise but got "+a);var d=arguments,e=a.apply(b,d);return c.promise.call(c,e)},b);return function(){c.willCallPromise--,d.call(c)}},trigger:function(){var a=arguments,b=this.preEmit.apply(this,a);a=void 0===b?a:d.isArguments(b)?b:[].concat(b),this.shouldEmit.apply(this,a)&&this.emitter.emit(this.eventLabel,a)},triggerAsync:function(){var a=arguments,b=this;d.nextTick(function(){b.trigger.apply(b,a)})},triggerPromise:function(){var a=this,b=arguments,c=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0,e=d.createPromise(function(e,f){if(a.willCallPromise)return void d.nextTick(function(){var c=a.promise;a.promise=function(b){return b.then(e,f),a.promise=c,a.promise.apply(a,arguments)},a.trigger.apply(a,b)});if(c)var g=a.completed.listen(function(a){g(),h(),e(a)}),h=a.failed.listen(function(a){g(),h(),f(a)});a.triggerAsync.apply(a,b),c||e()});return e}}},{"./utils":19}],8:[function(a,b,c){b.exports={}},{}],9:[function(a,b,c){b.exports=function(a,b){for(var c in b)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var d=Object.getOwnPropertyDescriptor(b,c);if(!d.value||"function"!=typeof d.value||!b.hasOwnProperty(c))continue;a[c]=b[c].bind(a)}else{var e=b[c];if("function"!=typeof e||!b.hasOwnProperty(c))continue;a[c]=e.bind(a)}return a}},{}],10:[function(a,b,c){var d=a("./index"),e=a("./utils");b.exports=function(a,b){return{getInitialState:function(){return e.isFunction(a.getInitialState)?void 0===b?a.getInitialState():e.object([b],[a.getInitialState()]):{}},componentDidMount:function(){e.extend(this,d.ListenerMethods);var c=this,f=void 0===b?this.setState:function(a){("undefined"==typeof c.isMounted||c.isMounted()===!0)&&c.setState(e.object([b],[a]))};this.listenTo(a,f)},componentWillUnmount:d.ListenerMixin.componentWillUnmount}}},{"./index":14,"./utils":19}],11:[function(a,b,c){var d=a("./index"),e=a("./utils");b.exports=function(a,b,c){return c=e.isFunction(b)?b:c,{getInitialState:function(){if(e.isFunction(a.getInitialState)){if(e.isFunction(b))return c.call(this,a.getInitialState());var d=c.call(this,a.getInitialState());return d?e.object([b],[d]):{}}return{}},componentDidMount:function(){e.extend(this,d.ListenerMethods);var f=this,g=function(a){if(e.isFunction(b))f.setState(c.call(f,a));else{var d=c.call(f,a);f.setState(e.object([b],[d]))}};this.listenTo(a,g)},componentWillUnmount:d.ListenerMixin.componentWillUnmount}}},{"./index":14,"./utils":19}],12:[function(a,b,c){var d=a("./utils"),e=a("./index"),f=a("./Keep"),g={preEmit:1,shouldEmit:1},h=function(a){a=a||{},d.isObject(a)||(a={actionName:a});for(var b in e.ActionMethods)if(!g[b]&&e.PublisherMethods[b])throw new Error("Cannot override API method "+b+" in Reflux.ActionMethods. Use another method name or override it on Reflux.PublisherMethods instead.");for(var c in a)if(!g[c]&&e.PublisherMethods[c])throw new Error("Cannot override API method "+c+" in action creation. Use another method name or override it on Reflux.PublisherMethods instead.");a.children=a.children||[],a.asyncResult&&(a.children=a.children.concat(["completed","failed"]));for(var i=0,j={};i<a.children.length;i++){var k=a.children[i];j[k]=h(k)}var l=d.extend({eventLabel:"action",emitter:new d.EventEmitter,_isAction:!0},e.PublisherMethods,e.ActionMethods,a),m=function(){return m[m.sync?"trigger":"triggerPromise"].apply(m,arguments)};return d.extend(m,j,l),f.createdActions.push(m),m};b.exports=h},{"./Keep":4,"./index":14,"./utils":19}],13:[function(a,b,c){var d=a("./utils"),e=a("./index"),f=a("./Keep"),g=a("./mixer"),h={preEmit:1,shouldEmit:1},i=a("./bindMethods");b.exports=function(a){function b(){var b,c=0;if(this.subscriptions=[],this.emitter=new d.EventEmitter,this.eventLabel="change",i(this,a),this.init&&d.isFunction(this.init)&&this.init(),this.listenables)for(b=[].concat(this.listenables);c<b.length;c++)this.listenToMany(b[c])}a=a||{};for(var c in e.StoreMethods)if(!h[c]&&(e.PublisherMethods[c]||e.ListenerMethods[c]))throw new Error("Cannot override API method "+c+" in Reflux.StoreMethods. Use another method name or override it on Reflux.PublisherMethods / Reflux.ListenerMethods instead.");for(var j in a)if(!h[j]&&(e.PublisherMethods[j]||e.ListenerMethods[j]))throw new Error("Cannot override API method "+j+" in store creation. Use another method name or override it on Reflux.PublisherMethods / Reflux.ListenerMethods instead.");a=g(a),d.extend(b.prototype,e.ListenerMethods,e.PublisherMethods,e.StoreMethods,a);var k=new b;return f.createdStores.push(k),k}},{"./Keep":4,"./bindMethods":9,"./index":14,"./mixer":18,"./utils":19}],14:[function(a,b,c){c.ActionMethods=a("./ActionMethods"),c.ListenerMethods=a("./ListenerMethods"),c.PublisherMethods=a("./PublisherMethods"),c.StoreMethods=a("./StoreMethods"),c.createAction=a("./createAction"),c.createStore=a("./createStore"),c.connect=a("./connect"),c.connectFilter=a("./connectFilter"),c.ListenerMixin=a("./ListenerMixin"),c.listenTo=a("./listenTo"),c.listenToMany=a("./listenToMany");var d=a("./joins").staticJoinCreator;c.joinTrailing=c.all=d("last"),c.joinLeading=d("first"),c.joinStrict=d("strict"),c.joinConcat=d("all");var e=a("./utils");c.EventEmitter=e.EventEmitter,c.Promise=e.Promise,c.createActions=function(a){var b={};for(var d in a)if(a.hasOwnProperty(d)){var f=a[d],g=e.isObject(f)?d:f;b[g]=c.createAction(f)}return b},c.setEventEmitter=function(b){var d=a("./utils");c.EventEmitter=d.EventEmitter=b},c.setPromise=function(b){var d=a("./utils");c.Promise=d.Promise=b},c.setPromiseFactory=function(b){var c=a("./utils");c.createPromise=b},c.nextTick=function(b){var c=a("./utils");c.nextTick=b},c.__keep=a("./Keep"),Function.prototype.bind||console.error("Function.prototype.bind not available. ES5 shim required. https://github.com/spoike/refluxjs#es5")},{"./ActionMethods":3,"./Keep":4,"./ListenerMethods":5,"./ListenerMixin":6,"./PublisherMethods":7,"./StoreMethods":8,"./connect":10,"./connectFilter":11,"./createAction":12,"./createStore":13,"./joins":15,"./listenTo":16,"./listenToMany":17,"./utils":19}],15:[function(a,b,c){function d(a,b,c){return function(){var d,e=c.subscriptions,f=e?e.indexOf(a):-1;for(i.throwIf(-1===f,"Tried to remove join already gone from subscriptions list!"),d=0;d<b.length;d++)b[d]();e.splice(f,1)}}function e(a){a.listenablesEmitted=new Array(a.numberOfListenables),a.args=new Array(a.numberOfListenables)}function f(a,b){return function(){var c=h.call(arguments);if(b.listenablesEmitted[a])switch(b.strategy){case"strict":throw new Error("Strict join failed because listener triggered twice.");case"last":b.args[a]=c;break;case"all":b.args[a].push(c)}else b.listenablesEmitted[a]=!0,b.args[a]="all"===b.strategy?[c]:c;g(b)}}function g(a){for(var b=0;b<a.numberOfListenables;b++)if(!a.listenablesEmitted[b])return;a.callback.apply(a.listener,a.args),e(a)}var h=Array.prototype.slice,i=a("./utils"),j=a("./createStore"),k={strict:"joinStrict",first:"joinLeading",last:"joinTrailing",all:"joinConcat"};c.staticJoinCreator=function(a){return function(){var b=h.call(arguments);return j({init:function(){this[k[a]].apply(this,b.concat("triggerAsync"))}})}},c.instanceJoinCreator=function(a){return function(){i.throwIf(arguments.length<3,"Cannot create a join with less than 2 listenables!");var b,c,g=h.call(arguments),j=g.pop(),k=g.length,l={numberOfListenables:k,callback:this[j]||j,listener:this,strategy:a},m=[];for(b=0;k>b;b++)i.throwIf(this.validateListening(g[b]));for(b=0;k>b;b++)m.push(g[b].listen(f(b,l),this));return e(l),c={listenable:g},c.stop=d(c,m,this),this.subscriptions=(this.subscriptions||[]).concat(c),c}}},{"./createStore":13,"./utils":19}],16:[function(a,b,c){var d=a("./index");b.exports=function(a,b,c){return{componentDidMount:function(){for(var e in d.ListenerMethods)if(this[e]!==d.ListenerMethods[e]){if(this[e])throw"Can't have other property '"+e+"' when using Reflux.listenTo!";this[e]=d.ListenerMethods[e]}this.listenTo(a,b,c)},componentWillUnmount:d.ListenerMethods.stopListeningToAll}}},{"./index":14}],17:[function(a,b,c){var d=a("./index");b.exports=function(a){return{componentDidMount:function(){for(var b in d.ListenerMethods)if(this[b]!==d.ListenerMethods[b]){if(this[b])throw"Can't have other property '"+b+"' when using Reflux.listenToMany!";this[b]=d.ListenerMethods[b]}this.listenToMany(a)},componentWillUnmount:d.ListenerMethods.stopListeningToAll}}},{"./index":14}],18:[function(a,b,c){var d=a("./utils");b.exports=function(a){var b={init:[],preEmit:[],shouldEmit:[]},c=function e(a){var c={};return a.mixins&&a.mixins.forEach(function(a){d.extend(c,e(a))}),d.extend(c,a),Object.keys(b).forEach(function(c){a.hasOwnProperty(c)&&b[c].push(a[c])}),c}(a);return b.init.length>1&&(c.init=function(){var a=arguments;b.init.forEach(function(b){b.apply(this,a)},this)}),b.preEmit.length>1&&(c.preEmit=function(){return b.preEmit.reduce(function(a,b){var c=b.apply(this,a);return void 0===c?a:[c]}.bind(this),arguments)}),b.shouldEmit.length>1&&(c.shouldEmit=function(){var a=arguments;return!b.shouldEmit.some(function(b){return!b.apply(this,a)},this)}),Object.keys(b).forEach(function(a){1===b[a].length&&(c[a]=b[a][0])}),c}},{"./utils":19}],19:[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)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var g=Object.getOwnPropertyDescriptor(b,c);Object.defineProperty(a,c,g)}else 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.capitalize=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},c.callbackName=function(a){return"on"+c.capitalize(a)},c.object=function(a,b){for(var c={},d=0;d<a.length;d++)c[a[d]]=b[d];return c},c.Promise=a("native-promise-only"),c.createPromise=function(a){return new c.Promise(a)},c.isArguments=function(a){return"object"==typeof a&&"callee"in a&&"number"==typeof a.length},c.throwIf=function(a,b){if(a)throw Error(b||a)}},{eventemitter3:1,"native-promise-only":2}]},{},[14])(14)}); | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Reflux=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,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,c){"use strict";function d(a,b,c){this.fn=a,this.context=b,this.once=c||!1}function e(){}e.prototype._events=void 0,e.prototype.listeners=function(a){if(!this._events||!this._events[a])return[];if(this._events[a].fn)return[this._events[a].fn];for(var b=0,c=this._events[a].length,d=new Array(c);c>b;b++)d[b]=this._events[a][b].fn;return d},e.prototype.emit=function(a,b,c,d,e,f){if(!this._events||!this._events[a])return!1;var g,h,i=this._events[a],j=arguments.length;if("function"==typeof i.fn){switch(i.once&&this.removeListener(a,i.fn,!0),j){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,b),!0;case 3:return i.fn.call(i.context,b,c),!0;case 4:return i.fn.call(i.context,b,c,d),!0;case 5:return i.fn.call(i.context,b,c,d,e),!0;case 6:return i.fn.call(i.context,b,c,d,e,f),!0}for(h=1,g=new Array(j-1);j>h;h++)g[h-1]=arguments[h];i.fn.apply(i.context,g)}else{var k,l=i.length;for(h=0;l>h;h++)switch(i[h].once&&this.removeListener(a,i[h].fn,!0),j){case 1:i[h].fn.call(i[h].context);break;case 2:i[h].fn.call(i[h].context,b);break;case 3:i[h].fn.call(i[h].context,b,c);break;default:if(!g)for(k=1,g=new Array(j-1);j>k;k++)g[k-1]=arguments[k];i[h].fn.apply(i[h].context,g)}}return!0},e.prototype.on=function(a,b,c){var e=new d(b,c||this);return this._events||(this._events={}),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],e]:this._events[a].push(e):this._events[a]=e,this},e.prototype.once=function(a,b,c){var e=new d(b,c||this,!0);return this._events||(this._events={}),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],e]:this._events[a].push(e):this._events[a]=e,this},e.prototype.removeListener=function(a,b,c){if(!this._events||!this._events[a])return this;var d=this._events[a],e=[];if(b&&(d.fn&&(d.fn!==b||c&&!d.once)&&e.push(d),!d.fn))for(var f=0,g=d.length;g>f;f++)(d[f].fn!==b||c&&!d[f].once)&&e.push(d[f]);return e.length?this._events[a]=1===e.length?e[0]:e:delete this._events[a],this},e.prototype.removeAllListeners=function(a){return this._events?(a?delete this._events[a]:this._events={},this):this},e.prototype.off=e.prototype.removeListener,e.prototype.addListener=e.prototype.on,e.prototype.setMaxListeners=function(){return this},e.EventEmitter=e,e.EventEmitter2=e,e.EventEmitter3=e,b.exports=e},{}],2:[function(b,c,d){(function(b){!function(b,d,e){d[b]=d[b]||e(),"undefined"!=typeof c&&c.exports?c.exports=d[b]:"function"==typeof a&&a.amd&&a(function(){return d[b]})}("Promise","undefined"!=typeof b?b:this,function(){"use strict";function a(a,b){m.add(a,b),l||(l=o(m.drain))}function b(a){var b,c=typeof a;return null==a||"object"!=c&&"function"!=c||(b=a.then),"function"==typeof b?b:!1}function c(){for(var a=0;a<this.chain.length;a++)d(this,1===this.state?this.chain[a].success:this.chain[a].failure,this.chain[a]);this.chain.length=0}function d(a,c,d){var e,f;try{c===!1?d.reject(a.msg):(e=c===!0?a.msg:c.call(void 0,a.msg),e===d.promise?d.reject(TypeError("Promise-chain cycle")):(f=b(e))?f.call(e,d.resolve,d.reject):d.resolve(e))}catch(g){d.reject(g)}}function e(d){var g,i,j=this;if(!j.triggered){j.triggered=!0,j.def&&(j=j.def);try{(g=b(d))?(i=new h(j),g.call(d,function(){e.apply(i,arguments)},function(){f.apply(i,arguments)})):(j.msg=d,j.state=1,j.chain.length>0&&a(c,j))}catch(k){f.call(i||new h(j),k)}}}function f(b){var d=this;d.triggered||(d.triggered=!0,d.def&&(d=d.def),d.msg=b,d.state=2,d.chain.length>0&&a(c,d))}function g(a,b,c,d){for(var e=0;e<b.length;e++)!function(e){a.resolve(b[e]).then(function(a){c(e,a)},d)}(e)}function h(a){this.def=a,this.triggered=!1}function i(a){this.promise=a,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function j(b){if("function"!=typeof b)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var d=new i(this);this.then=function(b,e){var f={success:"function"==typeof b?b:!0,failure:"function"==typeof e?e:!1};return f.promise=new this.constructor(function(a,b){if("function"!=typeof a||"function"!=typeof b)throw TypeError("Not a function");f.resolve=a,f.reject=b}),d.chain.push(f),0!==d.state&&a(c,d),f.promise},this["catch"]=function(a){return this.then(void 0,a)};try{b.call(void 0,function(a){e.call(d,a)},function(a){f.call(d,a)})}catch(g){f.call(d,g)}}var k,l,m,n=Object.prototype.toString,o="undefined"!=typeof setImmediate?function(a){return setImmediate(a)}:setTimeout;try{Object.defineProperty({},"x",{}),k=function(a,b,c,d){return Object.defineProperty(a,b,{value:c,writable:!0,configurable:d!==!1})}}catch(p){k=function(a,b,c){return a[b]=c,a}}m=function(){function a(a,b){this.fn=a,this.self=b,this.next=void 0}var b,c,d;return{add:function(e,f){d=new a(e,f),c?c.next=d:b=d,c=d,d=void 0},drain:function(){var a=b;for(b=c=l=void 0;a;)a.fn.call(a.self),a=a.next}}}();var q=k({},"constructor",j,!1);return j.prototype=q,k(q,"__NPO__",0,!1),k(j,"resolve",function(a){var b=this;return a&&"object"==typeof a&&1===a.__NPO__?a:new b(function(b,c){if("function"!=typeof b||"function"!=typeof c)throw TypeError("Not a function");b(a)})}),k(j,"reject",function(a){return new this(function(b,c){if("function"!=typeof b||"function"!=typeof c)throw TypeError("Not a function");c(a)})}),k(j,"all",function(a){var b=this;return"[object Array]"!=n.call(a)?b.reject(TypeError("Not an array")):0===a.length?b.resolve([]):new b(function(c,d){if("function"!=typeof c||"function"!=typeof d)throw TypeError("Not a function");var e=a.length,f=Array(e),h=0;g(b,a,function(a,b){f[a]=b,++h===e&&c(f)},d)})}),k(j,"race",function(a){var b=this;return"[object Array]"!=n.call(a)?b.reject(TypeError("Not an array")):new b(function(c,d){if("function"!=typeof c||"function"!=typeof d)throw TypeError("Not a function");g(b,a,function(a,b){c(b)},d)})}),j})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(a,b,c){b.exports={}},{}],4:[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()}},{}],5:[function(a,b,c){var d=a("./utils"),e=a("./joins").instanceJoinCreator,f=function(a){for(var b,c=0,d={};c<(a.children||[]).length;++c)b=a.children[c],a[b]&&(d[b]=a[b]);return d},g=function(a){var b={};for(var c in a){var e=a[c],h=f(e),i=g(h);b[c]=e;for(var j in i){var k=i[j];b[c+d.capitalize(j)]=k}}return b};b.exports={hasListener:function(a){for(var b,c,d,e=0;e<(this.subscriptions||[]).length;++e)for(d=[].concat(this.subscriptions[e].listenable),b=0;b<d.length;b++)if(c=d[b],c===a||c.hasListener&&c.hasListener(a))return!0;return!1},listenToMany:function(a){var b=g(a);for(var c in b){var e=d.callbackName(c),f=this[e]?e:this[c]?c:void 0;f&&this.listenTo(b[c],f,this[e+"Default"]||this[f+"Default"]||f)}},validateListening:function(a){return a===this?"Listener is not able to listen to itself":d.isFunction(a.listen)?a.hasListener&&a.hasListener(this)?"Listener cannot listen to this listenable because of circular loop":void 0:a+" is missing a listen method"},listenTo:function(a,b,c){var e,f,g,h=this.subscriptions=this.subscriptions||[];return d.throwIf(this.validateListening(a)),this.fetchInitialState(a,c),e=a.listen(this[b]||b,this),f=function(){var a=h.indexOf(g);d.throwIf(-1===a,"Tried to remove listen already gone from subscriptions list!"),h.splice(a,1),e()},g={stop:f,listenable:a},h.push(g),g},stopListeningTo:function(a){for(var b,c=0,e=this.subscriptions||[];c<e.length;c++)if(b=e[c],b.listenable===a)return b.stop(),d.throwIf(-1!==e.indexOf(b),"Failed to remove listen from subscriptions list!"),!0;return!1},stopListeningToAll:function(){for(var a,b=this.subscriptions||[];a=b.length;)b[0].stop(),d.throwIf(b.length!==a-1,"Failed to remove listen from subscriptions list!")},fetchInitialState:function(a,b){b=b&&this[b]||b;var c=this;if(d.isFunction(b)&&d.isFunction(a.getInitialState)){var e=a.getInitialState();e&&d.isFunction(e.then)?e.then(function(){b.apply(c,arguments)}):b.call(this,e)}},joinTrailing:e("last"),joinLeading:e("first"),joinConcat:e("all"),joinStrict:e("strict")}},{"./joins":15,"./utils":19}],6:[function(a,b,c){var d=a("./utils"),e=a("./ListenerMethods");b.exports=d.extend({componentWillUnmount:e.stopListeningToAll},e)},{"./ListenerMethods":5,"./utils":19}],7:[function(a,b,c){var d=a("./utils");b.exports={preEmit:function(){},shouldEmit:function(){return!0},listen:function(a,b){b=b||this;var c=function(c){e||a.apply(b,c)},d=this,e=!1;return this.emitter.addListener(this.eventLabel,c),function(){e=!0,d.emitter.removeListener(d.eventLabel,c)}},promise:function(a){var b=this,c=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0;if(!c)throw new Error('Publisher must have "completed" and "failed" child publishers');a.then(function(a){return b.completed(a)},function(a){return b.failed(a)})},listenAndPromise:function(a,b){var c=this;b=b||this,this.willCallPromise=(this.willCallPromise||0)+1;var d=this.listen(function(){if(!a)throw new Error("Expected a function returning a promise but got "+a);var d=arguments,e=a.apply(b,d);return c.promise.call(c,e)},b);return function(){c.willCallPromise--,d.call(c)}},trigger:function(){var a=arguments,b=this.preEmit.apply(this,a);a=void 0===b?a:d.isArguments(b)?b:[].concat(b),this.shouldEmit.apply(this,a)&&this.emitter.emit(this.eventLabel,a)},triggerAsync:function(){var a=arguments,b=this;d.nextTick(function(){b.trigger.apply(b,a)})},triggerPromise:function(){var a=this,b=arguments,c=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0,e=d.createPromise(function(e,f){if(a.willCallPromise)return void d.nextTick(function(){var c=a.promise;a.promise=function(b){return b.then(e,f),a.promise=c,a.promise.apply(a,arguments)},a.trigger.apply(a,b)});if(c)var g=a.completed.listen(function(a){g(),h(),e(a)}),h=a.failed.listen(function(a){g(),h(),f(a)});a.triggerAsync.apply(a,b),c||e()});return e}}},{"./utils":19}],8:[function(a,b,c){b.exports={}},{}],9:[function(a,b,c){b.exports=function(a,b){for(var c in b)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var d=Object.getOwnPropertyDescriptor(b,c);if(!d.value||"function"!=typeof d.value||!b.hasOwnProperty(c))continue;a[c]=b[c].bind(a)}else{var e=b[c];if("function"!=typeof e||!b.hasOwnProperty(c))continue;a[c]=e.bind(a)}return a}},{}],10:[function(a,b,c){var d=a("./index"),e=a("./utils");b.exports=function(a,b){return{getInitialState:function(){return e.isFunction(a.getInitialState)?void 0===b?a.getInitialState():e.object([b],[a.getInitialState()]):{}},componentDidMount:function(){e.extend(this,d.ListenerMethods);var c=this,f=void 0===b?this.setState:function(a){("undefined"==typeof c.isMounted||c.isMounted()===!0)&&c.setState(e.object([b],[a]))};this.listenTo(a,f)},componentWillUnmount:d.ListenerMixin.componentWillUnmount}}},{"./index":14,"./utils":19}],11:[function(a,b,c){var d=a("./index"),e=a("./utils");b.exports=function(a,b,c){return c=e.isFunction(b)?b:c,{getInitialState:function(){if(e.isFunction(a.getInitialState)){if(e.isFunction(b))return c.call(this,a.getInitialState());var d=c.call(this,a.getInitialState());return d?e.object([b],[d]):{}}return{}},componentDidMount:function(){e.extend(this,d.ListenerMethods);var f=this,g=function(a){if(e.isFunction(b))f.setState(c.call(f,a));else{var d=c.call(f,a);f.setState(e.object([b],[d]))}};this.listenTo(a,g)},componentWillUnmount:d.ListenerMixin.componentWillUnmount}}},{"./index":14,"./utils":19}],12:[function(a,b,c){var d=a("./utils"),e=a("./index"),f=a("./Keep"),g={preEmit:1,shouldEmit:1},h=function(a){a=a||{},d.isObject(a)||(a={actionName:a});for(var b in e.ActionMethods)if(!g[b]&&e.PublisherMethods[b])throw new Error("Cannot override API method "+b+" in Reflux.ActionMethods. Use another method name or override it on Reflux.PublisherMethods instead.");for(var c in a)if(!g[c]&&e.PublisherMethods[c])throw new Error("Cannot override API method "+c+" in action creation. Use another method name or override it on Reflux.PublisherMethods instead.");a.children=a.children||[],a.asyncResult&&(a.children=a.children.concat(["completed","failed"]));for(var i=0,j={};i<a.children.length;i++){var k=a.children[i];j[k]=h(k)}var l=d.extend({eventLabel:"action",emitter:new d.EventEmitter,_isAction:!0},e.PublisherMethods,e.ActionMethods,a),m=function(){return m[m.sync?"trigger":"triggerPromise"].apply(m,arguments)};return d.extend(m,j,l),f.createdActions.push(m),m};b.exports=h},{"./Keep":4,"./index":14,"./utils":19}],13:[function(a,b,c){var d=a("./utils"),e=a("./index"),f=a("./Keep"),g=a("./mixer"),h={preEmit:1,shouldEmit:1},i=a("./bindMethods");b.exports=function(a){function b(){var b,c=0;if(this.subscriptions=[],this.emitter=new d.EventEmitter,this.eventLabel="change",i(this,a),this.init&&d.isFunction(this.init)&&this.init(),this.listenables)for(b=[].concat(this.listenables);c<b.length;c++)this.listenToMany(b[c])}a=a||{};for(var c in e.StoreMethods)if(!h[c]&&(e.PublisherMethods[c]||e.ListenerMethods[c]))throw new Error("Cannot override API method "+c+" in Reflux.StoreMethods. Use another method name or override it on Reflux.PublisherMethods / Reflux.ListenerMethods instead.");for(var j in a)if(!h[j]&&(e.PublisherMethods[j]||e.ListenerMethods[j]))throw new Error("Cannot override API method "+j+" in store creation. Use another method name or override it on Reflux.PublisherMethods / Reflux.ListenerMethods instead.");a=g(a),d.extend(b.prototype,e.ListenerMethods,e.PublisherMethods,e.StoreMethods,a);var k=new b;return f.createdStores.push(k),k}},{"./Keep":4,"./bindMethods":9,"./index":14,"./mixer":18,"./utils":19}],14:[function(a,b,c){c.ActionMethods=a("./ActionMethods"),c.ListenerMethods=a("./ListenerMethods"),c.PublisherMethods=a("./PublisherMethods"),c.StoreMethods=a("./StoreMethods"),c.createAction=a("./createAction"),c.createStore=a("./createStore"),c.connect=a("./connect"),c.connectFilter=a("./connectFilter"),c.ListenerMixin=a("./ListenerMixin"),c.listenTo=a("./listenTo"),c.listenToMany=a("./listenToMany");var d=a("./joins").staticJoinCreator;c.joinTrailing=c.all=d("last"),c.joinLeading=d("first"),c.joinStrict=d("strict"),c.joinConcat=d("all");var e=a("./utils");c.EventEmitter=e.EventEmitter,c.Promise=e.Promise,c.createActions=function(a){var b={};for(var d in a)if(a.hasOwnProperty(d)){var f=a[d],g=e.isObject(f)?d:f;b[g]=c.createAction(f)}return b},c.setEventEmitter=function(b){var d=a("./utils");c.EventEmitter=d.EventEmitter=b},c.setPromise=function(b){var d=a("./utils");c.Promise=d.Promise=b},c.setPromiseFactory=function(b){var c=a("./utils");c.createPromise=b},c.nextTick=function(b){var c=a("./utils");c.nextTick=b},c.__keep=a("./Keep"),Function.prototype.bind||console.error("Function.prototype.bind not available. ES5 shim required. https://github.com/spoike/refluxjs#es5")},{"./ActionMethods":3,"./Keep":4,"./ListenerMethods":5,"./ListenerMixin":6,"./PublisherMethods":7,"./StoreMethods":8,"./connect":10,"./connectFilter":11,"./createAction":12,"./createStore":13,"./joins":15,"./listenTo":16,"./listenToMany":17,"./utils":19}],15:[function(a,b,c){function d(a,b,c){return function(){var d,e=c.subscriptions,f=e?e.indexOf(a):-1;for(i.throwIf(-1===f,"Tried to remove join already gone from subscriptions list!"),d=0;d<b.length;d++)b[d]();e.splice(f,1)}}function e(a){a.listenablesEmitted=new Array(a.numberOfListenables),a.args=new Array(a.numberOfListenables)}function f(a,b){return function(){var c=h.call(arguments);if(b.listenablesEmitted[a])switch(b.strategy){case"strict":throw new Error("Strict join failed because listener triggered twice.");case"last":b.args[a]=c;break;case"all":b.args[a].push(c)}else b.listenablesEmitted[a]=!0,b.args[a]="all"===b.strategy?[c]:c;g(b)}}function g(a){for(var b=0;b<a.numberOfListenables;b++)if(!a.listenablesEmitted[b])return;a.callback.apply(a.listener,a.args),e(a)}var h=Array.prototype.slice,i=a("./utils"),j=a("./createStore"),k={strict:"joinStrict",first:"joinLeading",last:"joinTrailing",all:"joinConcat"};c.staticJoinCreator=function(a){return function(){var b=h.call(arguments);return j({init:function(){this[k[a]].apply(this,b.concat("triggerAsync"))}})}},c.instanceJoinCreator=function(a){return function(){i.throwIf(arguments.length<2,"Cannot create a join with less than 2 listenables!");var b,c,g=h.call(arguments),j=g.pop(),k=g.length,l={numberOfListenables:k,callback:this[j]||j,listener:this,strategy:a},m=[];for(b=0;k>b;b++)i.throwIf(this.validateListening(g[b]));for(b=0;k>b;b++)m.push(g[b].listen(f(b,l),this));return e(l),c={listenable:g},c.stop=d(c,m,this),this.subscriptions=(this.subscriptions||[]).concat(c),c}}},{"./createStore":13,"./utils":19}],16:[function(a,b,c){var d=a("./index");b.exports=function(a,b,c){return{componentDidMount:function(){for(var e in d.ListenerMethods)if(this[e]!==d.ListenerMethods[e]){if(this[e])throw"Can't have other property '"+e+"' when using Reflux.listenTo!";this[e]=d.ListenerMethods[e]}this.listenTo(a,b,c)},componentWillUnmount:d.ListenerMethods.stopListeningToAll}}},{"./index":14}],17:[function(a,b,c){var d=a("./index");b.exports=function(a){return{componentDidMount:function(){for(var b in d.ListenerMethods)if(this[b]!==d.ListenerMethods[b]){if(this[b])throw"Can't have other property '"+b+"' when using Reflux.listenToMany!";this[b]=d.ListenerMethods[b]}this.listenToMany(a)},componentWillUnmount:d.ListenerMethods.stopListeningToAll}}},{"./index":14}],18:[function(a,b,c){var d=a("./utils");b.exports=function(a){var b={init:[],preEmit:[],shouldEmit:[]},c=function e(a){var c={};return a.mixins&&a.mixins.forEach(function(a){d.extend(c,e(a))}),d.extend(c,a),Object.keys(b).forEach(function(c){a.hasOwnProperty(c)&&b[c].push(a[c])}),c}(a);return b.init.length>1&&(c.init=function(){var a=arguments;b.init.forEach(function(b){b.apply(this,a)},this)}),b.preEmit.length>1&&(c.preEmit=function(){return b.preEmit.reduce(function(a,b){var c=b.apply(this,a);return void 0===c?a:[c]}.bind(this),arguments)}),b.shouldEmit.length>1&&(c.shouldEmit=function(){var a=arguments;return!b.shouldEmit.some(function(b){return!b.apply(this,a)},this)}),Object.keys(b).forEach(function(a){1===b[a].length&&(c[a]=b[a][0])}),c}},{"./utils":19}],19:[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)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var g=Object.getOwnPropertyDescriptor(b,c);Object.defineProperty(a,c,g)}else 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.capitalize=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},c.callbackName=function(a){return"on"+c.capitalize(a)},c.object=function(a,b){for(var c={},d=0;d<a.length;d++)c[a[d]]=b[d];return c},c.Promise=a("native-promise-only"),c.createPromise=function(a){return new c.Promise(a)},c.isArguments=function(a){return"object"==typeof a&&"callee"in a&&"number"==typeof a.length},c.throwIf=function(a,b){if(a)throw Error(b||a)}},{eventemitter3:1,"native-promise-only":2}]},{},[14])(14)}); |
{ | ||
"name": "reflux", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"description": "A simple library for uni-directional dataflow application architecture inspired by ReactJS Flux", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -30,2 +30,3 @@ # RefluxJS | ||
3. [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/spoike/refluxjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
4. [![Thinkful][thinkful-image]][thinkful-url] | ||
@@ -82,2 +83,3 @@ Please only use the [issue tracker](https://github.com/spoike/refluxjs/issues) for bugs and feature requests only. | ||
* [Sample app with authentication, permissions, sidebar and editable collection](https://github.com/VladimirPal/react-flux-backbone) | ||
* [TodoMVC demonstrating Reflux + Angular](https://github.com/javamonn/Angular-TodoMVC-Redux) | ||
@@ -102,2 +104,6 @@ [Back to top](#content) | ||
### CDN | ||
Reflux is available at [jsdelivr](http://www.jsdelivr.com/#!refluxjs). | ||
### ES5 | ||
@@ -780,1 +786,3 @@ | ||
[gratipay-url]: https://gratipay.com/spoike/ | ||
[thinkful-image]: https://tf-assets-staging.s3.amazonaws.com/badges/thinkful_repo_badge.svg | ||
[thinkful-url]: http://start.thinkful.com/react/?utm_source=github&utm_medium=badge&utm_campaign=reflux |
@@ -38,3 +38,3 @@ /** | ||
return function(/* listenables..., callback*/){ | ||
_.throwIf(arguments.length < 3,'Cannot create a join with less than 2 listenables!'); | ||
_.throwIf(arguments.length < 2,'Cannot create a join with less than 2 listenables!'); | ||
var listenables = slice.call(arguments), | ||
@@ -41,0 +41,0 @@ callback = listenables.pop(), |
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
145175
785
2206