flux-actions
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("flux-actions",[],t):"object"==typeof exports?exports["flux-actions"]=t():e["flux-actions"]=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(){function e(t){r(this,e),this._dispatcher=t}return o(e,[{key:"dispatch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._dispatcher.dispatch({type:e,payload:t})}},{key:"dispatchPromise",value:function(e,t){var n=this,r=t.request,o=t.success,u=t.fail,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.dispatch(r,i),e.then(function(e){return n.dispatch(o,{data:e,payload:i})},function(e){return n.dispatch(u,{data:e,payload:i})})}}]),e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})})}])}); | ||
define("flux-actions",[],function(){return function(e){function t(r){if(n[r])return n[r].exports;var u=n[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this._dispatcher=t}return u(e,[{key:"dispatch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._dispatcher.dispatch({type:e,payload:t})}},{key:"dispatchPromise",value:function(e,t){var n=this,r=t.request,u=t.success,o=t.fail,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.dispatch(r,i),e.then(function(e){return n.dispatch(u,{data:e,payload:i})},function(e){return n.dispatch(o,{data:e,payload:i})})}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})})}])}); |
{ | ||
"name": "flux-actions", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Basic class that wrap flux actions.", | ||
@@ -5,0 +5,0 @@ "keywords": "flux, action", |
@@ -13,3 +13,3 @@ export default class { | ||
*/ | ||
dispatch(type, payload={}) { | ||
dispatch(type, payload = {}) { | ||
this._dispatcher.dispatch({ | ||
@@ -26,3 +26,3 @@ type, | ||
*/ | ||
dispatchPromise(promise, {request, success, fail}, payload={}) { | ||
dispatchPromise(promise, {request, success, fail}, payload = {}) { | ||
this.dispatch(request, payload); | ||
@@ -29,0 +29,0 @@ promise.then( |
@@ -8,3 +8,3 @@ const path = require('path'); | ||
entry: { | ||
'plainRouter': path.join(__dirname, 'src/index.js'), | ||
'main': path.join(__dirname, 'src/index.js'), | ||
}, | ||
@@ -14,3 +14,3 @@ output: { | ||
library: libraryName, | ||
libraryTarget: 'umd', | ||
libraryTarget: 'amd', | ||
umdNamedDefine: true, | ||
@@ -17,0 +17,0 @@ }, |
96770