diff --git a/src/JobBroker.ts b/src/JobBroker.ts index 1f3134c..6193bd5 100644 --- a/src/JobBroker.ts +++ b/src/JobBroker.ts @@ -93,7 +93,17 @@ class JobBroker<T extends Parameter> { ); try { - const result = globalThis[parameter.handler]( + console.info( + Object.entries(globalThis).map(([key, value]) => [ + key, + typeof value, + ]) + ); + // const result = globalThis[parameter.handler]( + // JSON.parse(parameter.parameter) + // ); + + const result = eval(parameter.handler)( JSON.parse(parameter.parameter) ); if (!result) { diff --git a/tslint.json b/tslint.json index d5d83ad..454ea7a 100644 --- a/tslint.json +++ b/tslint.json @@ -16,6 +16,9 @@ "no-console": [ false ], + "no-eval": [ + false + ], "variable-name": { "options": [ "allow-snake-case"