Clarify documentation for _.result.

This commit is contained in:
Brad Dunbar
2012-03-19 15:07:33 -04:00
parent a2a35c10ce
commit 9a27b1b083
2 changed files with 4 additions and 2 deletions

View File

@@ -1313,7 +1313,8 @@ _.escape('Curly, Larry & Moe');
<p id="result">
<b class="header">result</b><code>_.result(object, property)</code>
<br />
Returns 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.
</p>
<pre>
var object = {cheese: 'crumpets', stuff: function(){ return 'nonsense'; }};