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