mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Dispense with abbreviation.
This commit is contained in:
@@ -874,9 +874,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Get a value from an object as a property or as a function.
|
// Get a value from an object as a property or as a function.
|
||||||
_.result = function(object, prop) {
|
_.result = function(object, property) {
|
||||||
if (object == null) return null;
|
if (object == null) return null;
|
||||||
var value = object[prop];
|
var value = object[property];
|
||||||
return _.isFunction(value) ? value() : value;
|
return _.isFunction(value) ? value() : value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user