From 82f062caf266543a62baa19b56491e027fe34ae2 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 24 May 2012 02:03:25 -0400 Subject: [PATCH] Sync with Underscore. Former-commit-id: 2e3aacd53fef6d22d830dbc2d6c220808aea8739 --- build.js | 2 -- build/pre-compile.js | 1 - lodash.js | 8 +------- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/build.js b/build.js index 9b88cec17..3164f1109 100755 --- a/build.js +++ b/build.js @@ -31,7 +31,6 @@ 'head': 'first', 'include': 'contains', 'inject': 'reduce', - 'intersect': 'intersection', 'methods': 'functions', 'select': 'filter', 'tail': 'rest', @@ -48,7 +47,6 @@ 'first': ['head', 'take'], 'forEach': ['each'], 'functions': ['methods'], - 'intersection': ['intersect'], 'map': ['collect'], 'reduce': ['foldl', 'inject'], 'reduceRight': ['foldr'], diff --git a/build/pre-compile.js b/build/pre-compile.js index 1a440c553..24781f09b 100644 --- a/build/pre-compile.js +++ b/build/pre-compile.js @@ -110,7 +110,6 @@ 'initial', 'inject', 'interpolate', - 'intersect', 'intersection', 'invoke', 'isArguments', diff --git a/lodash.js b/lodash.js index ee3db7ff3..ed3c0878f 100644 --- a/lodash.js +++ b/lodash.js @@ -1154,7 +1154,6 @@ * * @static * @memberOf _ - * @alias intersect * @category Arrays * @param {Array} [array1, array2, ...] Arrays to process. * @returns {Array} Returns a new array of unique values, in order, that are @@ -1555,9 +1554,6 @@ result = [], seen = []; - if (length < 3) { - isSorted = true; - } while (++index < length) { computed = callback ? callback(array[index]) : array[index]; if (isSorted @@ -1719,6 +1715,7 @@ function bound() { var args = arguments, + isInstance = this instanceof bound, thisBinding = thisArg; if (!isFunc) { @@ -1731,8 +1728,6 @@ } args = partialArgs; } - - var isInstance = this instanceof bound; if (isInstance) { // get `func` instance if `bound` is invoked in a `new` expression noop.prototype = func.prototype; @@ -3223,7 +3218,6 @@ lodash.head = first; lodash.include = contains; lodash.inject = reduce; - lodash.intersect = intersection; lodash.methods = functions; lodash.select = filter; lodash.tail = rest;