ProxyBase

ProxyBase

new ProxyBase()

A base class which is able to function as a Proxy for another object. Similar in concept to ES6 Proxy, however there are several major differences. It works with earlier versions of JavaScript, but is limited in that it can only function as a Proxy for types that have been pre-registered.

How this works: calling `addMethods(someClass)` iterates through all of the methods of the
class and generates a proxy method for each one. The proxy method merely calls
this.get(fieldName).

The primary use case for this class is to allow deferred assertions, for example an assertion
that doesn't get called until a Promise is resolved.
Source:

Methods

(static) addMethod()

Create a proxy method which calls .get() with the method name and arguments.

Source:

(static) addMethods()

Create proxy methods for all of the methods defined in the given class.

Source:

invoke()

Method which is called when a proxied method is called.

Source: