mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Clarify documentation for _.result.
This commit is contained in:
@@ -873,7 +873,8 @@
|
||||
return (''+string).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
|
||||
};
|
||||
|
||||
// Get a value from an object as a property or as a function.
|
||||
// If the value of the named property is a function then invoke it.
|
||||
// Otherwise, return its value.
|
||||
_.result = function(object, property) {
|
||||
if (object == null) return null;
|
||||
var value = object[property];
|
||||
|
||||
Reference in New Issue
Block a user