From c994dec4c0541df91ed8d6263b3a15d4dee02a46 Mon Sep 17 00:00:00 2001 From: Ryan W Tenney Date: Sun, 10 Oct 2010 21:38:46 -0400 Subject: [PATCH] adding alias 'unique' to point to 'uniq' --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index 2227dcf5e..8c727463f 100644 --- a/underscore.js +++ b/underscore.js @@ -302,7 +302,7 @@ // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. - _.uniq = function(array, isSorted) { + _.uniq = _.unique = function(array, isSorted) { return _.reduce(array, function(memo, el, i) { if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) memo[memo.length] = el; return memo;