loading...

re: Making Sense of Syntax VIEW POST

FULL DISCUSSION
 

I have really started to prefer functions to provide clarity:

isTruthy(
  pluck(
    'item',
    merge(obj, obj2)
  )
);

What's powerful here is if this is common place, make a helper!

const eitherHasItem = (a, b) =>
  isTruthy(pluck('item', merge(a, b)));

eitherHasItem(obj, obj2); //true|false
code of conduct - report abuse