3 ms·
IDK about JS runtimes, but this is very similar to the approach by most JS transpilers. They will use language-level generators if compiling to ES 2015, or use
by paulddraper 8y ago
IDK about JS runtimes, but this is very similar to the approach by most JS transpilers.
They will use language-level generators if compiling to ES 2015, or user-land generators if compiling below that.