3 ms·
You mean like putting the methods into the native classes' prototypes? That's a bad idea. The reason why it is a bad idea is that you cannot extend a prototype
by rtp 16y ago
You mean like putting the methods into the native classes' prototypes? That's a bad idea. The reason why it is a bad idea is that you cannot extend a prototype only within a scope, i.e if you change the prototype, it'll be changed regardless of whether it'll break another library, or that another library replaces your methods and thus render your library broken. This opens up the risk that you'll end up with bugs that are hard to trace to their source.