Last active
August 1, 2018 19:50
-
-
Save rjhilgefort/3f7b197556b9d22aa1e28e23e6e0f79a to your computer and use it in GitHub Desktop.
point free logger (node only because of utils)
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
/* eslint-disable no-console */ | |
import * as R from 'ramda'; | |
import util from 'util'; | |
const inspect = R.compose( | |
R.flip, | |
R.curryN(2), | |
)(util.inspect); | |
export default x => { | |
R.compose( | |
console.log, | |
inspect({ | |
colors: true, | |
depth: null, | |
}), | |
)(x); | |
return x; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment