aboutsummaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/_baseFindIndex.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-07-07 15:44:32 -0700
committerRich Trott <rtrott@gmail.com>2016-07-11 13:47:20 -0700
commite8a7003e940928e2d1684c12881dd2a39af2d7cc (patch)
tree92264eb4c317b287366e7774f6d4e15000856e06 /tools/eslint/node_modules/lodash/_baseFindIndex.js
parentfcae5e2d9187b4a9c16cbce843c10e2087990946 (diff)
downloadandroid-node-v8-e8a7003e940928e2d1684c12881dd2a39af2d7cc.tar.gz
android-node-v8-e8a7003e940928e2d1684c12881dd2a39af2d7cc.tar.bz2
android-node-v8-e8a7003e940928e2d1684c12881dd2a39af2d7cc.zip
tools: update ESLint, fix unused vars bug
Update ESLint to 3.0.0. This includes an enhancement to `no-unused-vars` such that it finds a few instances in our code base that it did not find previously (fixed in previous commits readying this for landing). PR-URL: https://github.com/nodejs/node/pull/7601 Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'tools/eslint/node_modules/lodash/_baseFindIndex.js')
-rw-r--r--tools/eslint/node_modules/lodash/_baseFindIndex.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/eslint/node_modules/lodash/_baseFindIndex.js b/tools/eslint/node_modules/lodash/_baseFindIndex.js
index 61428f6c49..bfd8259afd 100644
--- a/tools/eslint/node_modules/lodash/_baseFindIndex.js
+++ b/tools/eslint/node_modules/lodash/_baseFindIndex.js
@@ -5,12 +5,13 @@
* @private
* @param {Array} array The array to search.
* @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
-function baseFindIndex(array, predicate, fromRight) {
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
- index = fromRight ? length : -1;
+ index = fromIndex + (fromRight ? 1 : -1);
while ((fromRight ? index-- : ++index < length)) {
if (predicate(array[index], index, array)) {