Proxy Pattern and overwriting functions in Javascript
- November 23rd, 2011
- By Ionut
- Write comment
I would like to present our readers a very interesting functionality that gives javascript developers a lot of power.
First for those who don’t know what the Proxy Pattern is, well a proxy(at function level) is a function that provides a interface to another function.
Let’s say we want to create a proxy for the console.log method. And have it do something else without altering it’s initial purpose.