4 ms·
I guess that’s part of it. I don’t think the technique is necessarily a problem by itself, because it is often very easily traceable. However, it is annoying if
by ratorx 5y ago
I guess that’s part of it. I don’t think the technique is necessarily a problem by itself, because it is often very easily traceable. However, it is annoying if the things being composed are not standard well-known functions, but user-defined ones.
A good example of what I mean is here (fresh on my mind because I was looking at it yesterday): https://github.com/FortAwesome/Font-Awesome/blob/master/js-packages/%40fortawesome/fontawesome-svg-core/index.js https://github.com/FortAwesome/Font-Awesome/blob/master/js-p...
Somewhere this file defines an exported function called `icon`, but it took me way too long to find where and even longer to see what it was actually doing.
This might not be idiomatic JS code, but I’ve definitely seen other popular packages have similar code (especially internally).