@putout/engine-runner
Advanced tools
Comparing version 12.5.0 to 12.6.0
@@ -122,3 +122,3 @@ 'use strict'; | ||
for (const [from, fn] of all) { | ||
for (const [from, matchProperty] of all) { | ||
const nodeFrom = template.ast(from); | ||
@@ -138,3 +138,5 @@ | ||
return fn(values, path); | ||
validateMatchProperty(matchProperty); | ||
return matchProperty(values, path); | ||
} | ||
@@ -160,2 +162,7 @@ | ||
function validateMatchProperty(match) { | ||
if (!isFn(match)) | ||
throw Error(`☝️ Looks like 'match' property value is not a 'function', but '${typeof match}' with value '${match}'.`); | ||
} | ||
const validateTemplateValues = (a, b) => { | ||
@@ -162,0 +169,0 @@ for (const key of keys(a)) { |
{ | ||
"name": "@putout/engine-runner", | ||
"version": "12.5.0", | ||
"version": "12.6.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", |
29872
711