Skip to content

vm.runInContext Failed to evaluated object literal. #11741

Description

@NStal
let ctx = vm.createContext()
let value = vm.runInContext("{a:true,b:false}",ctx)
> let ctx = vm.createContext()
undefined
> let value = vm.runInContext("{a:true,b:false}",ctx)
evalmachine.<anonymous>:1
{a:true,b:false}
         ^
SyntaxError: Unexpected token :
> 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues asking questions about Node.js.vmIssues and PRs related to the vm subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions