News for hackers. Stuff that matters.
Re:Ask HN: If you targetting ES6 by default, how did you rat... by iso-8859-1 on Thursday December 22, 2016 @03:24PM (#13240091)
It's not that hard...

    ["email", "phone", "website"].reduce(
      (previous, channel) => previous || !!institution[channel] && !/^\s*$/.test(institution[channel]),
      false
    );
But I'd prefer the more readable:

    const hasNoEmail = /^\s*$/.test(institution.email || '');
    const hasNoPhone = /^\s*$/.test(institution.phone || '');
    const hasNoWebsite = /^\s*$/.test(institution.website || '');
    const hasAny = !(hasNoEmail && hasNoPhone && hasNoWebsite);

There are no comments on this comment yet.