array-changes-async
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -197,3 +197,3 @@ /*global setTimeout */ | ||
var mutatedArrayLength = mutatedArray.length; | ||
var setEqual = function (i, callback) { | ||
var setEqual = function (i, stackCallsRemaining, callback) { | ||
if (i >= mutatedArrayLength) { | ||
@@ -208,9 +208,19 @@ return callback(); | ||
} | ||
setEqual(i + 1, callback); | ||
if (stackCallsRemaining === 0) { | ||
return setTimeout(function () { | ||
setEqual(i + 1, MAX_STACK_DEPTH, callback); | ||
}) | ||
} | ||
setEqual(i + 1, stackCallsRemaining - 1, callback); | ||
}); | ||
} | ||
return setEqual(i + 1, callback); | ||
if (stackCallsRemaining === 0) { | ||
return setTimeout(function () { | ||
setEqual(i + 1, MAX_STACK_DEPTH, callback); | ||
}) | ||
} | ||
return setEqual(i + 1, stackCallsRemaining - 1, callback); | ||
}; | ||
setEqual(0, function () { | ||
setEqual(0, MAX_STACK_DEPTH, function () { | ||
arrayChangesCallback(mutatedArray); | ||
@@ -217,0 +227,0 @@ }); |
{ | ||
"name": "array-changes-async", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Array diffing", | ||
@@ -5,0 +5,0 @@ "main": "./lib/arrayChanges.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54185
444