Underscore 1.1.2

This commit is contained in:
Jeremy Ashkenas
2010-10-15 17:21:41 -04:00
parent 8aeb2832eb
commit 8fe19f2023
6 changed files with 37 additions and 26 deletions

View File

@@ -54,7 +54,7 @@
root._ = _;
// Current version.
_.VERSION = '1.1.1';
_.VERSION = '1.1.2';
// Collection Functions
// --------------------
@@ -303,6 +303,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.
// Aliased as `unique`.
_.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;