-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert publish.js to Ramda functions #133
Conversation
) | ||
), | ||
R.flatten | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a simpler version:
// simplifySee :: Array String -> Array String
var simplifySee =
R.pipe(R.chain(R.split(/\s*,\s*/)),
R.map(R.replace(/^R[.]/, '')));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
Updated PR.
var prettifyCode = R.pipe( | ||
R.join('\n'), | ||
R.replace(/^[ ]{5}/gm, ''), | ||
R.flip(R.invoker(2, 'highlight')('javascript'))(hljs), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd find this clearer:
function(s) { return hljs.highlight('javascript', s); }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I did have mixed feelings about that code.
I've used a fat arrow instead, hope that's still fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're to use a fat arrow here, why not throughout the file? While we're at it we could replace occurrences of var
with const
. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick find-replace, no problems!
I had just wanted to make sure ES6 was fine first.
I left one more comment, but this looks great! |
Is this all good now? |
i haven't found time to run it locally yet, but if it passed the gauntlet of @davidchambers review, i would expect it's good |
LGTM |
🐄 |
No description provided.