Skip to content

Instantly share code, notes, and snippets.

@rjhilgefort
Last active August 1, 2018 19:50
Show Gist options
  • Save rjhilgefort/3f7b197556b9d22aa1e28e23e6e0f79a to your computer and use it in GitHub Desktop.
Save rjhilgefort/3f7b197556b9d22aa1e28e23e6e0f79a to your computer and use it in GitHub Desktop.
point free logger (node only because of utils)
/* 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