From c3f8bb07261e4c98bde0a00b8fea4208f7cc5f82 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Mon, 16 Nov 2015 12:10:58 -0600 Subject: [PATCH] Correct count module to use correct lodash 3 syntax --- common/script/count.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/common/script/count.js b/common/script/count.js index 6305646836..cd53a591e0 100644 --- a/common/script/count.js +++ b/common/script/count.js @@ -1,12 +1,16 @@ -import _ from 'lodash'; +import { + each, + keys, + size, +} from 'lodash'; import content from './content/index'; -const DROP_ANIMALS = _.keys(content.pets); +const DROP_ANIMALS = keys(content.pets); function beastMasterProgress (pets) { let count = 0; - _(DROP_ANIMALS).each((animal) => { + each(DROP_ANIMALS, (animal) => { if (pets[animal] > 0 || pets[animal] === -1) count++; }); @@ -17,7 +21,7 @@ function beastMasterProgress (pets) { function dropPetsCurrentlyOwned (pets) { let count = 0; - _(DROP_ANIMALS).each((animal) => { + each(DROP_ANIMALS, (animal) => { if (pets[animal] > 0) count++; }); @@ -28,7 +32,7 @@ function dropPetsCurrentlyOwned (pets) { function mountMasterProgress (mounts) { let count = 0; - _(DROP_ANIMALS).each((animal) => { + each(DROP_ANIMALS, (animal) => { if (mounts[animal]) count++; }); @@ -44,7 +48,7 @@ function remainingGearInSet (userGear, set) { return setMatches && !hasItem; }); - let count = _.size(gear); + let count = size(gear); return count; } @@ -57,7 +61,7 @@ function questsOfCategory (userQuests, category) { return categoryMatches && hasQuest; }); - let count = _.size(quests); + let count = size(quests); return count; }