Reduce _.uniq in the lodash underscore build.

Former-commit-id: 12c8ee7a269dbaebbe4d05d902bfcc4bed193cec
This commit is contained in:
John-David Dalton
2012-10-20 20:16:39 -07:00
parent 850d55ab45
commit 1181cd2fd7
4 changed files with 45 additions and 40 deletions

View File

@@ -2119,7 +2119,7 @@
length = collection ? collection.length : 0,
result = computed;
if (callback || length !== +length) {
if (callback || typeof length != 'number') {
callback = createCallback(callback, thisArg);
forEach(collection, function(value, index, collection) {
var current = callback(value, index, collection);
@@ -2162,7 +2162,7 @@
length = collection ? collection.length : 0,
result = computed;
if (callback || length !== +length) {
if (callback || typeof length != 'number') {
callback = createCallback(callback, thisArg);
forEach(collection, function(value, index, collection) {
var current = callback(value, index, collection);
@@ -2702,7 +2702,7 @@
function intersection(array) {
var args = arguments,
argsLength = args.length,
cache = [],
cache = {},
result = [];
forEach(array, function(value) {