BinderMixin

BinderMixin

Methods

$(method) → {function}

Source:

Because lens access can easily traverse multiple layers — especially in the context of a datum plan — using Function.prototype.bind can involve significant repetition. This method allows such binding without the repetition, as the method name passed is looked up against the target of the Lens (or other optic) and then Function.prototype.binded to that Object.

This method is also invokable via ES6 tagged template literal syntax.

Parameters:
Name Type Description
method string

Name of method to bind

Returns:

Method named by method bound to the Object on which this method is called

Type
function