Created
January 18, 2019 15:49
-
-
Save mlg87/b5ed1acd6b3d4ad8c07f25fd228ad359 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
| async function doSomething(data) { | |
| if(data.ok) { | |
| return await db.insert(data) | |
| } | |
| if(typeof data === 'string') { | |
| return new Alert(data) | |
| } | |
| if(data.type === 'result') { | |
| return doShit(data) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment