Created
October 31, 2018 10:52
-
-
Save ufocoder/83ed01863d9d2f30822900d8ed80f602 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
| function handleError (err) { /* ... */ } | |
| function handleSuccess (x) { /* ... */ } | |
| function nodeCallback (err, thingIWant) { | |
| if (err) { | |
| handleError(err); | |
| } else { | |
| handleSuccess(thingIWant); | |
| } | |
| } | |
| someNodeFunction(arg, nodeCallback); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment