From fcef4f7b485613d6ed322812fa4743e578cd5f12 Mon Sep 17 00:00:00 2001 From: Luis Cardoso Date: Tue, 19 Nov 2013 19:09:09 +0000 Subject: [PATCH] Removes the _.const alias --- index.html | 1 - underscore.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/index.html b/index.html index c321de12b..bf23ea3b4 100644 --- a/index.html +++ b/index.html @@ -1554,7 +1554,6 @@

Utility Functions

constant_.constant(value) - Alias: const
Creates a function that returns the same value that is used as the argument of _.constant.

diff --git a/underscore.js b/underscore.js index 93b9e0875..2ee0960d6 100644 --- a/underscore.js +++ b/underscore.js @@ -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; };