These are chat archives for ramda/ramda

25th
Dec 2018
Nguyễn Công Uyên
@3dtracman_twitter
Dec 25 2018 01:41
hi @rajaraodv_twitter , you can try with
const getIdObj = ({id}) => ({ id });
// or
const getIdObj = R.pick([‘id’]); // https://ramdajs.com/docs/#pick
Nguyễn Công Uyên
@3dtracman_twitter
Dec 25 2018 02:09
for getData, you can try this way
const getData =  R.compose(
  R.call,
  R.prop('data')
 );
Raja Rao DV
@rajaraodv_twitter
Dec 25 2018 16:25
Thanks, I realized that for this: const getData = (obj) => obj.data();, I can do, const getData = R.invoker(0, 'data'). 0 means, no arguments to wait for. That'll invoke data method on whatever we pass.