Skip to content

Commit 42823bb

Browse files
committed
Temporarily obfuscate comments
1 parent a6e23ae commit 42823bb

8 files changed

Lines changed: 11 additions & 47 deletions

modules/_flatten.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import isArrayLike from './_isArrayLike.js';
33
import isArray from './isArray.js';
44
import isArguments from './isArguments.js';
55

6-
// Internal implementation of a `flatten` function.
6+
// Internal implementation of a recursive `flatten` function.
77
export default function flatten(input, depth, strict) {
88
if (!depth && depth !== 0) depth = Infinity;
99
var output = [], idx = 0, i = 0, length = getLength(input) || 0, stack = [];

modules/isEqual.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,12 @@ var tagDataView = '[object DataView]';
1414

1515
// Perform a deep comparison to check if two objects are equal.
1616
export default function isEqual(a, b) {
17-
// Keep track of which pairs of values need to be compared. We will be
18-
// trampolining on this stack instead of using function recursion.
1917
var todo = [{a: a, b: b}];
2018
// Initializing stacks of traversed objects for cycle detection.
2119
var aStack = [], bStack = [];
2220

23-
// Keep traversing pairs until there is nothing left to compare.
2421
while (todo.length) {
2522
var frame = todo.pop();
26-
// As a special case, a single `true` on the todo means that we can
27-
// unwind the cycle detection stacks.
2823
if (frame === true) {
2924
// Remove the first object from the stack of traversed objects.
3025
aStack.pop();
@@ -51,6 +46,7 @@ export default function isEqual(a, b) {
5146
var type = typeof a;
5247
if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
5348

49+
// Internal recursive comparison function for `_.isEqual`.
5450
// Unwrap any wrapped objects.
5551
if (a instanceof _) a = a._wrapped;
5652
if (b instanceof _) b = b._wrapped;
@@ -119,19 +115,15 @@ export default function isEqual(a, b) {
119115
// Linear search. Performance is inversely proportional to the number of
120116
// unique nested structures.
121117
if (aStack[length] === a) {
122-
// Cycle detected. Break out of the inner loop and continue the outer
123-
// loop. Step 1:
124118
if (bStack[length] === b) break;
125119
return false;
126120
}
127121
}
128-
// Step 2, use `length` to verify whether we detected a cycle:
129122
if (length >= 0) continue;
130123

131124
// Add the first object to the stack of traversed objects.
132125
aStack.push(a);
133126
bStack.push(b);
134-
// Remember to remove them again after the recursion below.
135127
todo.push(true);
136128

137129
// Recursively compare objects and arrays.
@@ -157,6 +149,5 @@ export default function isEqual(a, b) {
157149
}
158150
}
159151
}
160-
// We made it to the end and found no differences.
161152
return true;
162153
}

underscore-esm.js

Lines changed: 2 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore-esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore-node-f.cjs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -352,17 +352,12 @@ var tagDataView = '[object DataView]';
352352

353353
// Perform a deep comparison to check if two objects are equal.
354354
function isEqual(a, b) {
355-
// Keep track of which pairs of values need to be compared. We will be
356-
// trampolining on this stack instead of using function recursion.
357355
var todo = [{a: a, b: b}];
358356
// Initializing stacks of traversed objects for cycle detection.
359357
var aStack = [], bStack = [];
360358

361-
// Keep traversing pairs until there is nothing left to compare.
362359
while (todo.length) {
363360
var frame = todo.pop();
364-
// As a special case, a single `true` on the todo means that we can
365-
// unwind the cycle detection stacks.
366361
if (frame === true) {
367362
// Remove the first object from the stack of traversed objects.
368363
aStack.pop();
@@ -389,6 +384,7 @@ function isEqual(a, b) {
389384
var type = typeof a;
390385
if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
391386

387+
// Internal recursive comparison function for `_.isEqual`.
392388
// Unwrap any wrapped objects.
393389
if (a instanceof _$1) a = a._wrapped;
394390
if (b instanceof _$1) b = b._wrapped;
@@ -457,19 +453,15 @@ function isEqual(a, b) {
457453
// Linear search. Performance is inversely proportional to the number of
458454
// unique nested structures.
459455
if (aStack[length] === a) {
460-
// Cycle detected. Break out of the inner loop and continue the outer
461-
// loop. Step 1:
462456
if (bStack[length] === b) break;
463457
return false;
464458
}
465459
}
466-
// Step 2, use `length` to verify whether we detected a cycle:
467460
if (length >= 0) continue;
468461

469462
// Add the first object to the stack of traversed objects.
470463
aStack.push(a);
471464
bStack.push(b);
472-
// Remember to remove them again after the recursion below.
473465
todo.push(true);
474466

475467
// Recursively compare objects and arrays.
@@ -495,7 +487,6 @@ function isEqual(a, b) {
495487
}
496488
}
497489
}
498-
// We made it to the end and found no differences.
499490
return true;
500491
}
501492

@@ -1048,7 +1039,7 @@ var bind = restArguments(function(func, context, args) {
10481039
// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
10491040
var isArrayLike = createSizePropertyCheck(getLength);
10501041

1051-
// Internal implementation of a `flatten` function.
1042+
// Internal implementation of a recursive `flatten` function.
10521043
function flatten$1(input, depth, strict) {
10531044
if (!depth && depth !== 0) depth = Infinity;
10541045
var output = [], idx = 0, i = 0, length = getLength(input) || 0, stack = [];

underscore-node-f.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore-umd.js

Lines changed: 2 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore-umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)