Correct count module to use correct lodash 3 syntax

This commit is contained in:
Blade Barringer
2015-11-16 12:10:58 -06:00
parent 086e1da0e1
commit c3f8bb0726

View File

@@ -1,12 +1,16 @@
import _ from 'lodash'; import {
each,
keys,
size,
} from 'lodash';
import content from './content/index'; import content from './content/index';
const DROP_ANIMALS = _.keys(content.pets); const DROP_ANIMALS = keys(content.pets);
function beastMasterProgress (pets) { function beastMasterProgress (pets) {
let count = 0; let count = 0;
_(DROP_ANIMALS).each((animal) => { each(DROP_ANIMALS, (animal) => {
if (pets[animal] > 0 || pets[animal] === -1) if (pets[animal] > 0 || pets[animal] === -1)
count++; count++;
}); });
@@ -17,7 +21,7 @@ function beastMasterProgress (pets) {
function dropPetsCurrentlyOwned (pets) { function dropPetsCurrentlyOwned (pets) {
let count = 0; let count = 0;
_(DROP_ANIMALS).each((animal) => { each(DROP_ANIMALS, (animal) => {
if (pets[animal] > 0) if (pets[animal] > 0)
count++; count++;
}); });
@@ -28,7 +32,7 @@ function dropPetsCurrentlyOwned (pets) {
function mountMasterProgress (mounts) { function mountMasterProgress (mounts) {
let count = 0; let count = 0;
_(DROP_ANIMALS).each((animal) => { each(DROP_ANIMALS, (animal) => {
if (mounts[animal]) if (mounts[animal])
count++; count++;
}); });
@@ -44,7 +48,7 @@ function remainingGearInSet (userGear, set) {
return setMatches && !hasItem; return setMatches && !hasItem;
}); });
let count = _.size(gear); let count = size(gear);
return count; return count;
} }
@@ -57,7 +61,7 @@ function questsOfCategory (userQuests, category) {
return categoryMatches && hasQuest; return categoryMatches && hasQuest;
}); });
let count = _.size(quests); let count = size(quests);
return count; return count;
} }