Pieter Vincent
Pieter Vincent
Thanks @DmitrySharabin! Those changes look good to me, I added them to the PR. I guess there are still some reasons to (eventually) use the same approach (or same code)...
> I would do it in another PR Yes definitely, just mentioning it as a suggestion in case future changes happen to the TOC 🙂
I created a second PR with a much simpler solution that should have no risk and still get us a similar performance improvement by reducing the scope of the recalculation.
Closed in https://github.com/color-js/color.js/pull/592#event-14594347281