Skip to content

Commit

Permalink
Merge pull request #30 from k2tzumi/debug-global-this
Browse files Browse the repository at this point in the history
Dump globalThis
  • Loading branch information
k2tzumi authored Mar 5, 2023
2 parents 7ee2e98 + bf7a1e1 commit c432045
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/JobBroker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"no-console": [
false
],
"no-eval": [
false
],
"variable-name": {
"options": [
"allow-snake-case"
Expand Down

0 comments on commit c432045

Please # to comment.