Skip to content

Commit df6bf5d

Browse files
Merge pull request jashkenas#1098 from braddunbar/to-array
Fix jashkenas#1097 - Clarify documentation for _.toArray.
2 parents af372b6 + 61cec40 commit df6bf5d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ <h2 id="collections">Collection Functions (Arrays or Objects)</h2>
681681
<p id="toArray">
682682
<b class="header">toArray</b><code>_.toArray(list)</code>
683683
<br />
684-
Converts the <b>list</b> (anything that can be iterated over), into a
685-
real Array. Useful for transmuting the <b>arguments</b> object.
684+
Creates a real Array from the <b>list</b> (anything that can be
685+
iterated over). Useful for transmuting the <b>arguments</b> object.
686686
</p>
687687
<pre>
688688
(function(){ return _.toArray(arguments).slice(1); })(1, 2, 3, 4);

underscore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@
365365
return low;
366366
};
367367

368-
// Safely convert anything iterable into a real, live array.
368+
// Safely create a real, live array from anything iterable.
369369
_.toArray = function(obj) {
370370
if (!obj) return [];
371371
if (_.isArray(obj)) return slice.call(obj);

0 commit comments

Comments
 (0)