These are chat archives for ramda/ramda

18th
Jun 2018
Dennie de Lange
@tkvw
Jun 18 2018 08:48
how can I use eq in a composition? I want to accomplish a didUpdate check:
const props = ['a','b']
const didUpdate = R.negate(R.equals(R.pick(props),R.pick(props)))
Dennie de Lange
@tkvw
Jun 18 2018 09:31
this seems to work:
const didUpdate = R.pipe(R.useWith(R.equals,[R.pick(props),R.pick(props)]),R.not)
Nik
@niksosf
Jun 18 2018 09:57
@tkvw Hi Dennie, maybe this : const shouldUpdate = any(complement(eqProps)(attrs, beforeProps, afterProps));
const shouldUpdate = any(complement(eqProps)(attrs, beforeProps, afterProps));
@tkvw here is a codesandbox https://codesandbox.io/s/oqznp0p7ny
oops i meant this ``js const shouldUpdate = any(complement(eqProps)(__, beforeProps, afterProps))( attrs );
const shouldUpdate = any(complement(eqProps)(__, beforeProps, afterProps))( attrs );
Yosbel Marín
@yosbelms
Jun 18 2018 18:28
Anyone interested in make a Ramda fork compatible with TypeScript?
Brandon Chartier
@brandonchartier
Jun 18 2018 19:36
Yosbel Marín
@yosbelms
Jun 18 2018 21:41
@brandonchartier I'm afraid it doesn't, beacuse ramda/ramda#2561 and all of this
Brandon Chartier
@brandonchartier
Jun 18 2018 21:43
cool, thanks
Yosbel Marín
@yosbelms
Jun 18 2018 21:43
What I'm looking for is something not as fancy as Ramda but more TS compliant, example: https://github.com/gcanti/fp-ts
but sadly poor docs
Brandon Chartier
@brandonchartier
Jun 18 2018 21:44
I saw that a week or two ago, pretty neat anyway
Yosbel Marín
@yosbelms
Jun 18 2018 21:44
I would like it to have more docs
since I'm not a math geek :smile:
Brandon Chartier
@brandonchartier
Jun 18 2018 21:45
I was under the impression that TS wasn't totally adequate for the job, but I'd love to see how it could play out.
more docs, for sure