UNPKG

babel-plugin-async-to-promises

Version:

Transpile ES7 async/await to vanilla ES6 Promise chains

15 lines (13 loc) 238 B
function test() { var a, b; return Promise.resolve().then(function () { return db.post({}); }).then(function (_resp) { a = _resp; if (a) { return db.destroy(); } }).then(function () { b = 1 + 1; }); }