Last active
June 9, 2021 02:34
-
-
Save MauricioRobayo/ddaad844d734d9c0e2715ed2fc2a576a to your computer and use it in GitHub Desktop.
#gogofast
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
| const sureThing = (promise) => | |
| promise | |
| .then((data) => ({ ok: true, data })) | |
| .catch((error) => ({ ok: false, error })); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment