Does node.js support yield?

后端 未结 10 1018
误落风尘
误落风尘 2021-01-31 01:51

Is there any way to get generators into node.js?

I\'m currently faking them with callbacks, but I have to remember to check the response of the callback inside of my gen

10条回答
  •  臣服心动
    2021-01-31 02:46

    The answer is "not currently" but Marcel seems to be my hero. Lets hope this goes somewhere:

    https://groups.google.com/forum/#!msg/nodejs/BNs3OsDYsYw/oCsWBw9AWC0J https://github.com/laverdet/node-fibers

提交回复
热议问题