mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Cleanup _.difference and _.union.
Former-commit-id: 1fcaab3989caaaacd9fe73de071d8f360f52b715
This commit is contained in:
@@ -2493,7 +2493,7 @@
|
|||||||
}
|
}
|
||||||
var index = -1,
|
var index = -1,
|
||||||
length = array.length,
|
length = array.length,
|
||||||
flattened = concat.apply(result, arguments),
|
flattened = concat.apply(ArrayProto, arguments),
|
||||||
contains = cachedContains(flattened, length);
|
contains = cachedContains(flattened, length);
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
@@ -3065,9 +3065,9 @@
|
|||||||
*/
|
*/
|
||||||
function union() {
|
function union() {
|
||||||
var index = -1,
|
var index = -1,
|
||||||
result = [],
|
flattened = concat.apply(ArrayProto, arguments),
|
||||||
flattened = concat.apply(result, arguments),
|
length = flattened.length,
|
||||||
length = flattened.length;
|
result = [];
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
if (indexOf(result, flattened[index]) < 0) {
|
if (indexOf(result, flattened[index]) < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user