Skip to content

Instantly share code, notes, and snippets.

@hg-pyun
Created October 7, 2018 06:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hg-pyun/46c403315c8e30ba8b8eeed19795a900 to your computer and use it in GitHub Desktop.
Save hg-pyun/46c403315c8e30ba8b8eeed19795a900 to your computer and use it in GitHub Desktop.
// ES6
function* foo(){
yield bar();
}
// ES5 Compiled
"use strict";
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
function foo() {
return regeneratorRuntime.wrap(
function foo$(_context) {
while (1) {
switch ((_context.prev = _context.next)) {
case 0:
_context.next = 2;
return bar();
case 2:
case "end":
return _context.stop();
}
}
},
_marked,
this
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment