@nlpjs/evaluator
Advanced tools
Comparing version 4.0.0-rc.16 to 4.0.0-rc.17
{ | ||
"name": "@nlpjs/evaluator", | ||
"version": "4.0.0-rc.16", | ||
"version": "4.0.0-rc.17", | ||
"description": "Evaluator", | ||
@@ -31,3 +31,3 @@ "author": { | ||
}, | ||
"gitHead": "b1db0d0a691fef7821c5fe718e4fad614dd388ad" | ||
"gitHead": "f04e3a8ac0c02ddf8bcc1d8922b6cc3177429a4d" | ||
} |
@@ -35,4 +35,6 @@ /* | ||
compile(pipeline) { | ||
const header = '(async () => {\n'; | ||
const footer = '\n})();'; | ||
const code = pipeline.join('\n'); | ||
return code; | ||
return header + code + footer; | ||
} | ||
@@ -470,5 +472,11 @@ | ||
for (let i = 0; i < compiled.body.length; i += 1) { | ||
const expression = compiled.body[i].expression | ||
let expression = compiled.body[i].expression | ||
? compiled.body[i].expression | ||
: compiled.body[i]; | ||
if ( | ||
expression.callee && | ||
expression.callee.type === 'ArrowFunctionExpression' | ||
) { | ||
expression = expression.callee.body; | ||
} | ||
const value = await this.walk(expression, newContext); | ||
@@ -475,0 +483,0 @@ result.push(value === this.failResult ? undefined : value); |
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
35883
1021