These are chat archives for ramda/ramda

Oct 2017
Oct 07 2017 00:08
Anyone use prettier? I was just trying it out for the first time, but I feel like it makes the code less readable especially when writing in a style that uses ramda.
Scott Sauyet
Oct 07 2017 02:54
I keep meaning to try prettier, but haven't gotten there yet. I just want to pit it against Uglify and see who wins.
James Forbes
Oct 07 2017 04:17
I think it ends up being a tie, and comes out: pretty ugly :D
Robert Mennell
Oct 07 2017 04:36
... I thought my mathematica joke was bad...
James Forbes
Oct 07 2017 11:30
ha what was that?
Scott Sauyet
Oct 07 2017 18:56
@Siilwyn: How about breaking it down into readable chunks?:
const orFirst = pred => list => defaultTo(head(list), find(pred, list))
const rightPlatform = pathEq(['config', 'oslist'])
const rightArch = arch => cfg => arch === path(['config', 'osarch'], cfg)

const getSteamappVdfLaunch = ( {steamPlatform, arch, launchConfig} ) => pipe(
  orFirst(both(rightPlatform(steamPlatform), rightArch(arch)))