mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Make a small documentation change.
This commit is contained in:
@@ -1313,8 +1313,7 @@ _.escape('Curly, Larry & Moe');
|
||||
<p id="result">
|
||||
<b class="header">result</b><code>_.result(object, property)</code>
|
||||
<br />
|
||||
If the value of the named property is a function then invoke it.
|
||||
Otherwise, return its value.
|
||||
If the value of the named property is a function then invoke it; otherwise, return it.
|
||||
</p>
|
||||
<pre>
|
||||
var object = {cheese: 'crumpets', stuff: function(){ return 'nonsense'; }};
|
||||
|
||||
@@ -873,8 +873,8 @@
|
||||
return (''+string).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
|
||||
};
|
||||
|
||||
// If the value of the named property is a function then invoke it.
|
||||
// Otherwise, return its value.
|
||||
// If the value of the named property is a function then invoke it;
|
||||
// otherwise, return it.
|
||||
_.result = function(object, property) {
|
||||
if (object == null) return null;
|
||||
var value = object[property];
|
||||
|
||||
Reference in New Issue
Block a user