redux-fluent
Advanced tools
Comparing version 0.5.2 to 0.6.0
/**! | ||
* @name redux-fluent | ||
* @version 0.5.2 | ||
* @version 0.6.0 | ||
* @author Code-Y (https://github.com/Code-Y) | ||
@@ -11,3 +11,3 @@ * @description Tiny and eloquent way to manage a redux-like state manager | ||
* @build-info development - Tue Dec 26 2017 13:38:29 GMT+0000 (UTC) | ||
* @build-info development - Tue Dec 26 2017 14:49:26 GMT+0000 (UTC) | ||
* @homepage https://github.com/Code-Y/redux-fluent#readme | ||
@@ -196,3 +196,3 @@ * @keywords [ redux, ngrx-store, typescript, state-management ] | ||
doQueue: Queue_1.default(), | ||
config: void 0, | ||
config: Object.create(null), | ||
}; | ||
@@ -199,0 +199,0 @@ return Object.assign($caseAndDefault(data), { |
/**! | ||
* @name redux-fluent | ||
* @version 0.5.2 | ||
* @version 0.6.0 | ||
* @author Code-Y (https://github.com/Code-Y) | ||
@@ -11,3 +11,3 @@ * @description Tiny and eloquent way to manage a redux-like state manager | ||
* @build-info production - Tue Dec 26 2017 13:38:29 GMT+0000 (UTC) | ||
* @build-info production - Tue Dec 26 2017 14:49:26 GMT+0000 (UTC) | ||
* @homepage https://github.com/Code-Y/redux-fluent#readme | ||
@@ -17,3 +17,3 @@ * @keywords [ redux, ngrx-store, typescript, state-management ] | ||
**/ | ||
!function(e){function n(u){if(t[u])return t[u].exports;var r=t[u]={i:u,l:!1,exports:{}};return e[u].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};n.m=e,n.c=t,n.d=function(e,t,u){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:u})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=0)}([function(e,n,t){e.exports=t(1)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u=t(2);n.createAction=u.default;var r=t(3);n.createReducer=r.default},function(e,n,t){"use strict";function u(e){function n(n,t){var u=Object.create(null);return u.type=e,u.error=n instanceof Error,u.meta=t||null,u.payload=n||null,Object.freeze(u)}return Object.defineProperties(n,{type:{enumerable:!0,value:e},toString:{enumerable:!0,value:function(){return e}}}),n}Object.defineProperty(n,"__esModule",{value:!0}),n.default=u},function(e,n,t){"use strict";function u(e,n){function t(t,u){return t||(a.default.isFunction(e)?e(t,u,n.config):e)}function u(e,u){return(n.actions[u?u.type:u]||[t]).reduce(function(e,t){return t(e,u,n.config)},e)}return f.squashQueues(n.caseQueue,n.doQueue,n.actions),Object.defineProperties(u,{domain:{enumerable:!0,value:n.domain},toString:{enumerable:!0,value:function(){return n.domain}}}),u}function r(e,n){return n.caseQueue.push(e.type||e.toString()),{case:function(e){return r(e,n)},do:function(e){return o(e,n)}}}function o(e,n){return n.doQueue.push(e),{do:function(e){return o(e,n)},default:function(e){return u(e,n)},case:function(e){return f.squashQueues(n.caseQueue,n.doQueue,n.actions),r(e,n)}}}function c(e){return{case:function(n){return r(n,e)},default:function(n){return u(n,e)}}}function i(e){var n={domain:e,actions:Object.create(null),caseQueue:f.default(),doQueue:f.default(),config:void 0};return Object.assign(c(n),{config:function(e){return n.config=e,c(n)}})}Object.defineProperty(n,"__esModule",{value:!0});var f=t(4),a=t(5);n.default=i},function(e,n,t){"use strict";function u(){var e=[];return{push:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];e=e.concat(n)},forEach:function(n){e.forEach(n)},flush:function(){e=[]}}}function r(e,n,t){e.forEach(function(e){return n.forEach(function(n){t[e]=(t[e]||[]).concat(n)})}),n.flush(),e.flush()}Object.defineProperty(n,"__esModule",{value:!0}),n.default=u,n.squashQueues=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function e(){}return e.of=function(e){return{}.toString.call(e)},e.is=function(n,t){return e.of(n)===t},e.isFunction=function(n){return e.is(n,"[object Function]")},e}();n.default=u}]); | ||
!function(e){function n(u){if(t[u])return t[u].exports;var r=t[u]={i:u,l:!1,exports:{}};return e[u].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};n.m=e,n.c=t,n.d=function(e,t,u){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:u})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=0)}([function(e,n,t){e.exports=t(1)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u=t(2);n.createAction=u.default;var r=t(3);n.createReducer=r.default},function(e,n,t){"use strict";function u(e){function n(n,t){var u=Object.create(null);return u.type=e,u.error=n instanceof Error,u.meta=t||null,u.payload=n||null,Object.freeze(u)}return Object.defineProperties(n,{type:{enumerable:!0,value:e},toString:{enumerable:!0,value:function(){return e}}}),n}Object.defineProperty(n,"__esModule",{value:!0}),n.default=u},function(e,n,t){"use strict";function u(e,n){function t(t,u){return t||(a.default.isFunction(e)?e(t,u,n.config):e)}function u(e,u){return(n.actions[u?u.type:u]||[t]).reduce(function(e,t){return t(e,u,n.config)},e)}return f.squashQueues(n.caseQueue,n.doQueue,n.actions),Object.defineProperties(u,{domain:{enumerable:!0,value:n.domain},toString:{enumerable:!0,value:function(){return n.domain}}}),u}function r(e,n){return n.caseQueue.push(e.type||e.toString()),{case:function(e){return r(e,n)},do:function(e){return o(e,n)}}}function o(e,n){return n.doQueue.push(e),{do:function(e){return o(e,n)},default:function(e){return u(e,n)},case:function(e){return f.squashQueues(n.caseQueue,n.doQueue,n.actions),r(e,n)}}}function c(e){return{case:function(n){return r(n,e)},default:function(n){return u(n,e)}}}function i(e){var n={domain:e,actions:Object.create(null),caseQueue:f.default(),doQueue:f.default(),config:Object.create(null)};return Object.assign(c(n),{config:function(e){return n.config=e,c(n)}})}Object.defineProperty(n,"__esModule",{value:!0});var f=t(4),a=t(5);n.default=i},function(e,n,t){"use strict";function u(){var e=[];return{push:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];e=e.concat(n)},forEach:function(n){e.forEach(n)},flush:function(){e=[]}}}function r(e,n,t){e.forEach(function(e){return n.forEach(function(n){t[e]=(t[e]||[]).concat(n)})}),n.flush(),e.flush()}Object.defineProperty(n,"__esModule",{value:!0}),n.default=u,n.squashQueues=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function e(){}return e.of=function(e){return{}.toString.call(e)},e.is=function(n,t){return e.of(n)===t},e.isFunction=function(n){return e.is(n,"[object Function]")},e}();n.default=u}]); | ||
//# sourceMappingURL=redux-fluent.production.js.map |
@@ -23,47 +23,53 @@ declare namespace /* Interfaces */ I { | ||
export interface Default<S, C> { | ||
(state: S): (state: S, action: Action) => S; | ||
<A extends Action>(reducer: (state: S, action: A, config: C) => S): (state: S, action: Action) => S; | ||
interface IReducer<D, S, C> { | ||
domain: D; | ||
toString(): D; | ||
(state: S, action: Action): S; | ||
} | ||
export interface Case<S, C> { | ||
interface Default<D, S, C> { | ||
(state: S): IReducer<D, S, C>; | ||
<A extends Action>(reducer: (state: S, action: A, config: C) => S): IReducer<D, S, C>; | ||
} | ||
interface Case<D, S, C> { | ||
(actionType: string): { | ||
case: Case<S, C>; | ||
do: Do<S, C>; | ||
case: Case<D, S, C>; | ||
do: Do<D, S, C>; | ||
}; | ||
(action: Action): { | ||
case: Case<S, C>; | ||
do: Do<S, C>; | ||
case: Case<D, S, C>; | ||
do: Do<D, S, C>; | ||
}; | ||
(actionCreator: { toString(): string }): { | ||
case: Case<S, C>; | ||
do: Do<S, C>; | ||
case: Case<D, S, C>; | ||
do: Do<D, S, C>; | ||
}; | ||
} | ||
export interface Do<S, C> { | ||
interface Do<D, S, C> { | ||
<E extends Error, M>(reducer: (state: S, action: ActionError<string, E, M>, config: C) => S): { | ||
default: Default<S, C>; | ||
case: Case<S, C>; | ||
do: Do<S, C>; | ||
default: Default<D, S, C>; | ||
case: Case<D, S, C>; | ||
do: Do<D, S, C>; | ||
}; | ||
<E extends Error>(reducer: (state: S, action: ActionError<string, E, null>, config: C) => S): { | ||
default: Default<S, C>; | ||
case: Case<S, C>; | ||
do: Do<S, C>; | ||
default: Default<D, S, C>; | ||
case: Case<D, S, C>; | ||
do: Do<D, S, C>; | ||
}; | ||
<P, M>(reducer: (state: S, action: ActionSuccess<string, P, M>, config: C) => S): { | ||
default: Default<S, C>; | ||
case: Case<S, C>; | ||
do: Do<S, C>; | ||
default: Default<D, S, C>; | ||
case: Case<D, S, C>; | ||
do: Do<D, S, C>; | ||
}; | ||
<P>(reducer: (state: S, action: ActionSuccess<string, P, null>, config: C) => S): { | ||
default: Default<S, C>; | ||
case: Case<S, C>; | ||
do: Do<S, C>; | ||
default: Default<D, S, C>; | ||
case: Case<D, S, C>; | ||
do: Do<D, S, C>; | ||
}; | ||
(reducer: (state: S, action: Action, config: C) => S): { | ||
default: Default<S, C>; | ||
case: Case<S, C>; | ||
do: Do<S, C>; | ||
default: Default<D, S, C>; | ||
case: Case<D, S, C>; | ||
do: Do<D, S, C>; | ||
}; | ||
@@ -88,10 +94,11 @@ } | ||
S extends { [key: string]: any }, | ||
C extends { [key: string]: any } = { [key: string]: any } | ||
>(domain: string): { | ||
default: I.Default<S, C>; | ||
case: I.Case<S, C>; | ||
C extends { [key: string]: any } = { [key: string]: any }, | ||
D extends string = string | ||
>(domain: D): { | ||
default: I.Default<D, S, C>; | ||
case: I.Case<D, S, C>; | ||
config(config: C): { | ||
default: I.Default<S, C>; | ||
case: I.Case<S, C> | ||
config<CC extends C>(config: CC): { | ||
default: I.Default<D, S, CC>; | ||
case: I.Case<D, S, CC> | ||
} | ||
@@ -98,0 +105,0 @@ }; |
{ | ||
"name": "redux-fluent", | ||
"license": "ISC", | ||
"version": "0.5.2", | ||
"version": "0.6.0", | ||
"homepage": "https://github.com/Code-Y/redux-fluent#readme", | ||
@@ -6,0 +6,0 @@ "description": "Tiny and eloquent way to manage a redux-like state manager", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
49171
368