Skip to content

Instantly share code, notes, and snippets.

@ufocoder
Created October 31, 2018 12:05
Show Gist options
  • Select an option

  • Save ufocoder/cf881d7548f8ea54740ec8ebf18838dc to your computer and use it in GitHub Desktop.

Select an option

Save ufocoder/cf881d7548f8ea54740ec8ebf18838dc to your computer and use it in GitHub Desktop.
function passTest () { /* ... */ }
function failTest () { /* ... */ }
const errorCallback = higherOrderNodeCallback(failTest, passTest);
errorCallback(errorObj, null);
const successCallback = higherOrderNodeCallback(passTest, failTest);
successCallback(null, successObj);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment