Earlier quoted context omitted.
You can now use async/await directly in node (no transpiler necessary), and both Babel and TypeScript can compile them for browser use. Also there are now many more libraries that use native ES6 promises. Before: function getPhoto(callback) { someCustomHttpGet("/favorite_photo_id", function(err, data) { if (err) { return callback(err) } try { var dataJson = JSON.parse(data) someCustomHttpGet(dataJson.url, function(er…
Your try catch is useless here, AFAIK JSON.stringify doesn't throw. and you can't catch someCustomHttpGet() "exceptions" if the latter is supposed to be asynchronous. relevant: http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y...
TypeError: Converting circular structure to JSON