3 ms·
I've not run into that kind of issue in years. Read the docs of the function you're attempting to call. Also, in this case, the function should return NaN so i
by hajile 5y ago
I've not run into that kind of issue in years. Read the docs of the function you're attempting to call.
Also, in this case, the function should return NaN so it's not polymorphic.
- qayxc 5y ago> Also, in this case, the function should return NaN so it's not polymorphic. Sure. But what if that's function comes from a 3rd party component that doesn't have great documentation or relies on another package and thus a behaviour like this simply bubbles up through the call chain? And don't think this can't happen - NPM in particular notorious for this kind of deep dependencies. Also mixins and monkey patching are a thing in JS, so just importing a module can lead to an unexpected change in behaviour.