Node repl with async await

前端 未结 3 2080
夕颜
夕颜 2021-02-07 00:36

I would like to add support to async/await to node repl

Following this issue: https://github.com/nodejs/node/issues/8382

I\'ve tried to use this one https://gith

3条回答
  •  野的像风
    2021-02-07 01:23

    The idea is to preprocess the command and wrap it in a async function if there is an await syntax outside async function

    this https://gist.github.com/princejwesley/a66d514d86ea174270210561c44b71ba is the final solution

提交回复
热议问题