lib/object/index.js
function (property) {

    var isString;

    // optimal
    if ((isString = (typeof property === "string")) && !~property.indexOf(".")) {
      return this[property];
    }

    // avoid split if possible
    var chain    = isString ? property.split(".") : property,
    currentValue = this,
    currentProperty;

    // go through all the properties
    for (var i = 0, n = chain.length - 1; i < n; i++) {

      currentValue    = currentValue[chain[i]];

      if (!currentValue) return;
    }

    // might be a bindable object
    if(currentValue) return currentValue[chain[i]];
  }
function (property) {

    var isString;

    // optimal
    if ((isString = (typeof property === "string")) && !~property.indexOf(".")) {
      return this[property];
    }

    // avoid split if possible
    var chain    = isString ? property.split(".") : property,
    currentValue = this,
    currentProperty;

    // go through all the properties
    for (var i = 0, n = chain.length - 1; i < n; i++) {

      currentValue    = currentValue[chain[i]];

      if (!currentValue) return;
    }

    // might be a bindable object
    if(currentValue) return currentValue[chain[i]];
  }
function ( property ) { var isString ; // optimal if ( ( isString = ( typeof property === "string" ) ) && ! ~ property . indexOf ( "." ) ) { return this [ property ] ; } // avoid split if possible var chain = isString ? property . split ( "." ) : property , currentValue = this , currentProperty ; // go through all the properties for ( var i = 0 , n = chain . length - 1 ; i < n ; i ++ ) { currentValue = currentValue [ chain [ i ] ] ; if ( ! currentValue ) return ; } // might be a bindable object if ( currentValue ) return currentValue [ chain [ i ] ] ; }
Returns a property stored in the bindable object context
@method get
@param {String} path path to the value. Can be something like `person.city.name`.
Returns a property stored in the bindable object context