RunKit + npm: regenerator-runtime

node v10.24.1
endpointsharetweet
var regeneratorRuntime = require("regenerator-runtime") // var s = 1; // function bar() { // s = 3; // } // async function foo() { // s = 2; // bar(); // } // (async () => { // await foo(); // console.log(s); // })() var s = 1; function bar() { s = 3; } function foo() { return regeneratorRuntime.async(function foo$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: s = 2; bar(); case 2: case "end": return _context.stop(); } } }); } (function _callee() { return regeneratorRuntime.async(function _callee$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _context2.next = 2; return regeneratorRuntime.awrap(foo()); case 2: console.log(s); case 3: case "end": return _context2.stop(); } } }); })();
Created from: https://npm.runkit.com/regenerator-runtime
Loading…