src/Binding.js
function (path, sharedInternals) {
  /** @private */
  this._path = path || EMPTY_PATH;

  /** @protected
   * @ignore */
  this._sharedInternals = sharedInternals || {};

  if (!this._sharedInternals.listeners) {
    this._sharedInternals.listeners = {};
  }

  if (!this._sharedInternals.cache) {
    this._sharedInternals.cache = {};
  }
}
function (path, sharedInternals) {
  /** @private */
  this._path = path || EMPTY_PATH;

  /** @protected
   * @ignore */
  this._sharedInternals = sharedInternals || {};

  if (!this._sharedInternals.listeners) {
    this._sharedInternals.listeners = {};
  }

  if (!this._sharedInternals.cache) {
    this._sharedInternals.cache = {};
  }
}
function ( path , sharedInternals ) { /** @private */ this . _path = path || EMPTY_PATH ; /** @protected
   * @ignore */ this . _sharedInternals = sharedInternals || { } ; if ( ! this . _sharedInternals . listeners ) { this . _sharedInternals . listeners = { } ; } if ( ! this . _sharedInternals . cache ) { this . _sharedInternals . cache = { } ; } }
Binding constructor.
@param {String[]} [path] binding path, empty array if omitted
@param {Object} [sharedInternals] shared relative bindings internals:
<ul>
<li>backingValue - backing value;</li>
<li>metaBinding - meta binding;</li>
<li>metaBindingListenerId - meta binding listener id;</li>
<li>listeners - change listeners;</li>
<li>cache - bindings cache.</li>
</ul>
@public
@class Binding
@classdesc Wraps immutable collection. Provides convenient read-write access to nested values.
Allows to create sub-bindings (or views) narrowed to a subpath and sharing the same backing value.
Changes to these bindings are mutually visible.
<p>Terminology:
<ul>
<li>
(sub)path - path to a value within nested associative data structure, example: 'path.t.0.some.value';
</li>
<li>
backing value - value shared by all bindings created using [sub]{@link Binding#sub} method.
</li>
</ul>
<p>Features:
<ul>
<li>can create sub-bindings sharing same backing value. Sub-binding can only modify values down its subpath;</li>
<li>allows to conveniently modify nested values: assign, update with a function, remove, and so on;</li>
<li>can attach change listeners to a specific subpath;</li>
<li>can perform multiple changes atomically in respect of listener notification.</li>
</ul>
@see Binding.init
Binding constructor .