Last active
December 5, 2017 22:36
-
-
Save rmoskal/d42b4d8fe4b603bacc30ad4ee5dc0137 to your computer and use it in GitHub Desktop.
This file contains 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 functionalWay(color) { | |
fetch(color) | |
.then(JSON.parse) | |
.then(transformFirst) | |
.then(sendToClient) | |
.then(remote_log_wrapped('log')) | |
.catch(remote_log_wrapped('error')) | |
} | |
function remote_log_wrapped(level) { | |
return msg => remotelog(level, msg) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment