Last active
September 2, 2016 20:04
-
-
Save ide/555a110a4a1d13e1eafe7e2db322ccbd to your computer and use it in GitHub Desktop.
Comparing Babel + Uglify with Babel + Babili (with pretty-printing, September 2016)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function getTemperatureForecastAsync() { | |
let response = await fetch('/forecast.json'); | |
let result = await response.json(); | |
return result.temperature; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getTemperatureForecastAsync = function () { | |
var e = _asyncToGenerator(regeneratorRuntime.mark(function n() { | |
var e, a;return regeneratorRuntime.wrap(function (n) { | |
for (;;) switch (n.prev = n.next) {case 0: | |
return n.next = 2, fetch("/forecast.json");case 2: | |
return e = n.sent, n.next = 5, e.json();case 5: | |
return a = n.sent, n.abrupt("return", a.temperature);case 7:case "end": | |
return n.stop();} | |
}, n, this); | |
}));return function () { | |
return e.apply(this, arguments); | |
}; | |
}(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let getTemperatureForecastAsync = (() => { | |
var ref = _asyncToGenerator(function* () { | |
let a = yield fetch('/forecast.json'), | |
b = yield a.json();return b.temperature; | |
});return function getTemperatureForecastAsync() { | |
return ref.apply(this, arguments); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment