vendor/optional/lodash-0.3.2.js
function result(object, property) {
    // based on Backbone's private `getValue` function
    // https://github.com/documentcloud/backbone/blob/0.9.9/backbone.js#L1419-1424
    if (!object) {
      return null;
    }
    var value = object[property];
    return toString.call(value) == funcClass ? object[property]() : value;
  }
function result(object, property) {
    // based on Backbone's private `getValue` function
    // https://github.com/documentcloud/backbone/blob/0.9.9/backbone.js#L1419-1424
    if (!object) {
      return null;
    }
    var value = object[property];
    return toString.call(value) == funcClass ? object[property]() : value;
  }
function result ( object , property ) { // based on Backbone's private `getValue` function // https://github.com/documentcloud/backbone/blob/0.9.9/backbone.js#L1419-1424 if ( ! object ) { return null ; } var value = object [ property ] ; return toString . call ( value ) == funcClass ? object [ property ] ( ) : value ; }
Resolves the value of `property` on `object`. If `property` is a function
it will be invoked and its result returned, else the property value is
returned. If `object` is falsey, then `null` is returned.

@deprecated
@static
@memberOf _
@category Utilities
@param {Object} object The object to inspect.
@param {String} property The property to get the result of.
@returns {Mixed} Returns the resolved value.
@example

var object = {
'cheese': 'crumpets',
'stuff': function() {
return 'nonsense';
}
};

_.result(object, 'cheese');
// => 'crumpets'

_.result(object, 'stuff');
// => 'nonsense'
Resolves the value of property on object . If property is a function it will be invoked and its result returned else the property value is returned . If object is falsey then null is returned .