s-ol’s avatars-ol’s Twitter Archive—№ 1,332

  1. little trick for #reactjs classNames using #es6 tagged template literals: const c = (...[[const_cs, ...var_cs], ...exprs]) => ( const_cs + var_cs.map((cs, i) => exprs[i] ? cs.trim() : '').join(' ') ); cfixed ${true}cond ${false}these removed; // -> 'fixed cond'
    oh my god twitter doesn’t include alt text from images in their API
    1. …in reply to @S0lll0s
      every ${condition-expr} decides whether the classes following it are included or omitted. Fixed classes can be put before the first condition.