Gomain Hoyes
1 min readSep 17, 2019

--

This DOES NOT SOLVE THE PROBLEM!

In code, we would want to use

mySpeacialLib.customFunction();
// i.e. call a custom method on an instances of the original class

By the time we realize that SpecialLib needs patch, we would already used it with hundreds of instances in thousands of places by a couple dozen people; we can not break it!

We want to patch a custom function/method/property to an existing class/prototype but also control the scope of where the patch takes effect.

--

--

No responses yet