compose-state
Advanced tools
Comparing version 1.0.0 to 1.0.1
58
dist.js
@@ -1,57 +0,1 @@ | ||
"use strict"; | ||
var _extends = | ||
Object.assign || | ||
function(a) { | ||
for (var b, c = 1; c < arguments.length; c++) | ||
for (var d in ((b = arguments[c]), b)) | ||
Object.prototype.hasOwnProperty.call(b, d) && (a[d] = b[d]); | ||
return a; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: !0 }); | ||
function _toConsumableArray(a) { | ||
if (Array.isArray(a)) { | ||
for (var b = 0, c = Array(a.length); b < a.length; b++) c[b] = a[b]; | ||
return c; | ||
} | ||
return Array.from(a); | ||
} | ||
var composeStateFactory = function(a) { | ||
return function() { | ||
for (var b = arguments.length, c = Array(b), d = 0; d < b; d++) | ||
c[d] = arguments[d]; | ||
return c | ||
.map(function(a) { | ||
return a instanceof Function | ||
? a | ||
: function() { | ||
return a; | ||
}; | ||
}) | ||
.reduceRight( | ||
function(b, c) { | ||
return function() { | ||
for (var d = arguments.length, e = Array(d), f = 0; f < d; f++) | ||
e[f] = arguments[f]; | ||
var g = e[a], | ||
h = b.apply(void 0, e), | ||
i = c.apply( | ||
void 0, | ||
_toConsumableArray(e.slice(0, a)).concat( | ||
[_extends({}, g, h)], | ||
_toConsumableArray(e.slice(a + 1)), | ||
), | ||
); | ||
return g || h || i ? _extends({}, g, h, i) : null; | ||
}; | ||
}, | ||
function() { | ||
return null; | ||
}, | ||
); | ||
}; | ||
}, | ||
composeState = (exports.composeState = composeStateFactory(0)), | ||
composeDerivedStateFromProps = (exports.composeDerivedStateFromProps = composeStateFactory( | ||
1, | ||
)); | ||
exports.default = composeState; | ||
"use strict";var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a};Object.defineProperty(exports,"__esModule",{value:!0});function _toConsumableArray(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}var composeStateFactory=function(a){return function(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];return c.map(function(a){return a instanceof Function?a:function(){return a}}).reduceRight(function(b,c){return function(){for(var d=arguments.length,e=Array(d),f=0;f<d;f++)e[f]=arguments[f];var g=e[a],h=b.apply(void 0,e),i=c.apply(void 0,_toConsumableArray(e.slice(0,a)).concat([_extends({},g,h)],_toConsumableArray(e.slice(a+1))));return g||h||i?_extends({},g,h,i):null}},function(){return null})}},composeState=exports.composeState=composeStateFactory(0),composeDerivedStateFromProps=exports.composeDerivedStateFromProps=composeStateFactory(1);exports.default=composeState; |
{ | ||
"name": "compose-state", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "compose setState updaters", | ||
@@ -25,3 +25,7 @@ "main": "index.js", | ||
"babel": { | ||
"presets": ["minify", "env", "react"], | ||
"presets": [ | ||
"minify", | ||
"env", | ||
"react" | ||
], | ||
"plugins": [ | ||
@@ -28,0 +32,0 @@ "transform-class-properties", |
9552
271