Proxy Pattern: Techniques for Implementing Proxies (II)
Learn how to create a proxy object using object augmentation and the ES2015 Proxy helper.
Object augmentation
Object augmentation (or monkey patching) is probably the simplest and most common way of proxying just a few methods of an object. It involves modifying the subject directly by replacing a method with its proxied implementation.
In the context of our calculator example, this could be done as follows:
Access this course and 1400+ top-rated courses and projects.