allows you to bind a change watcher that looks for get and set operations on an arbitrary
property of an object at at any depth. This allows you to look for changes or intercept values asynchronously or otherwise.
- Source:
Requires
- module:async
- module:documents/probe
- module:lodash
- module:promise
Methods
(static) bind(path, record, options) → {*}
- Source:
Bind to a property somewhere in an object. The property is found using dot notation and can be arbitrarily deep.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
path |
string | The path into the object to locate the property. For instance this could be |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
record |
object | Anything you can hang a property off of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
options | What you wanna do with the doohicky when yoyu bind it. Properties
|
Returns:
- Type
- *
(static) unbind(path, record)
- Source:
You can unbind previously bound objects from here.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The path that was bound using module:documents/binder.bind |
record |
* | The object that was bound |