Starting with ECMAScript 6, JavaScript gains support for the Proxy and Reflect objects allowing you to intercept and define custom behavior for fundamental language operations (e.g. property lookup, assignment, enumeration, function invocation, etc). With the help of these two objects you are able to program at the meta level of JavaScript.
The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc).
The proxy's handler object is a placeholder object which contains traps for proxies.
The handler.apply() method is a trap for a function call.
The handler.construct() method is a trap for the new operator.
The handler.defineProperty() method is a trap for Object.defineProperty().
The handler.deleteProperty() method is a trap for the delete operator.
The handler.get() method is a trap for getting a property value.
The handler.getOwnPropertyDescriptor() method is a trap for Object.getOwnPropertyDescriptor().
The handler.getPrototypeOf() method is a trap for the [[GetPrototypeOf]] internal method.
The handler.has() method is a trap for the in operator.
The handler.isExtensible() method is a trap for Object.isExtensible().
The handler.preventExtensions() method is a trap for Object.preventExtensions().
The handler.set() method is a trap for setting a property value.
The Proxy.revocable() method is used to create a revocable Proxy object.
The handler.enumerate() method used to be a trap for for...in statements, but has been removed from the ECMAScript standard in edition 7 and is deprecated in browsers.
The handler.setPrototypeOf() method is a trap for Object.setPrototypeOf().