Proxy JavaScript Methods
Simple way of adding custom logic to an instantiated object's method(s).
Installation
npm install proxy-method --save
Usage
const proxyMethod = ; const instance = { console; } ; instance; // prints: 'This is your message: This is a test.' // proxy the method before it executesvar restore = proxyMethod; instance; // prints: 'This is your message: This is another test - suffixed.' // removing previous proxied functionalityrestore; proxyMethod; instance; // prints:// This is your message: This is one more test.// Executing after proxied method.