Skip to content

Avoiding use of eval #117

@bakkot

Description

@bakkot

cf nodejs/node#61078, there is a use of eval for converting string literals to their values, which doesn't work under --disallow-code-generation-from-strings.

Would you take a PR fixing this? I can port an existing string literal parser from Shift or Babel. And I can add a fast path using JSON.parse which will work almost all of the time, with the more complex parser needed only for fallback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions