Skip to content

Commit

Permalink
Removes the _.const alias
Browse files Browse the repository at this point in the history
  • Loading branch information
lfac-pt committed Nov 19, 2013
1 parent cfc6932 commit fcef4f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,6 @@ <h2 id="utility">Utility Functions</h2>

<p id="constant">
<b class="header">constant</b><code>_.constant(value)</code>
<span class="alias">Alias: <b>const</b></span>
<br />
Creates a function that returns the same value that is used as the argument of <tt>_.constant</tt>.
</p>
Expand Down
3 changes: 1 addition & 2 deletions underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,7 @@
return value;
};

//Using bracket notation for const to avoid problems with legacy engines
_['const'] = _.constant = function(value) {
_.constant = function(value) {
return function () {
return value;
};
Expand Down

0 comments on commit fcef4f7

Please sign in to comment.