lukeed/clsxPublic

A tiny (239B) utility for constructing `className` strings conditionally.

perf: improved object handling #113

ClosedTyIsIclosed 1 commit intomasterfromrefs/pull/113/head
  1. TY

    I tested it against all other types and this if match makes sure that it only matches on actual objects.

    My solution is about twice as fast for object mapping and has an even smaller code footprint.

    <img width="424" height="188" alt="image" src="https://github.com/user-attachments/assets/91c6e3a4-8966-491d-973c-66f1cd21a085" />

    That said, this was mostly for shits n giggles. Feel free to decline it!

  2. VU

    I'm not sure about the tests here, but I tried it locally and this change make completely useless the purpose of the object parsing itself (which is take only the keys associated to a positive value), indeed bypassing value checking all the keys are included...

  3. LU

    Yup this is invalid. It’s checking key existence only, not using its value as conditional

  4. lukeedclosed11 months ago on GitHub