chimpanzee
Advanced tools
Comparing version 0.0.53 to 0.0.54
@@ -24,2 +24,6 @@ "use strict"; | ||
var _merge = require("../utils/merge"); | ||
var _merge2 = _interopRequireDefault(_merge); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -63,9 +67,5 @@ | ||
function merge(state, result) { | ||
return _extends({}, state, result.value); | ||
} | ||
return schemas.length ? function run([schema, ...rest], state) { | ||
const result = (0, _parse2.default)(schema)(obj, key, parents, parentKeys)(context); | ||
return result instanceof _results.Match || result instanceof _results.Empty ? rest.length ? run(rest, result instanceof _results.Match ? merge(state, result) : state) : new _results.Match(result instanceof _results.Match ? merge(state, result) : state, env, meta) : result; | ||
return result instanceof _results.Match || result instanceof _results.Empty ? rest.length ? run(rest, result instanceof _results.Match ? (0, _merge2.default)(state, result.value) : state) : new _results.Match(result instanceof _results.Match ? (0, _merge2.default)(state, result.value) : state, env, meta) : result; | ||
}(schemas, {}) : new _results.Empty(env, meta); | ||
@@ -72,0 +72,0 @@ }; |
{ | ||
"name": "chimpanzee", | ||
"version": "0.0.53", | ||
"version": "0.0.54", | ||
"author": "Isotropy Team<isotropy@agilehead.com>", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
206977
1216