Last active
August 18, 2018 16:31
-
-
Save caasi/e6aa816ee87e5095ab19daae776899b5 to your computer and use it in GitHub Desktop.
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
verfyRecap() | |
.then((response) => { | |
console.log(response.data); | |
if (....) { | |
doSomeThingSync(); | |
} | |
}) | |
.catch((error) => { | |
..... | |
console.log(error); | |
}) | |
.then(() => { | |
return scanEmail(.....); | |
}) | |
.then((data) => { | |
......; | |
} | |
async function func() { | |
try { | |
const response = await verfyRecap(); | |
console.log(response.data); | |
if (....) { | |
doSomeThingSync(); | |
} | |
} catch (error) { | |
console.log(error) | |
} | |
const data = await scanEmail(.....); | |
.....; | |
} | |
function func$(next) { | |
verfyRecap(function(err, response) { | |
if (err) console.log(err); | |
console.log(response.data); | |
if (....) { doSomeThingSync(); } | |
scanEmail(function(err, data) { | |
if (err) return next(err); | |
.....; | |
next(); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment