aboutsummaryrefslogtreecommitdiff
path: root/build/cleaners/skyblock/objectives.js
blob: 52e92db2863757dab53c55c8a2126e22e45f50bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export function cleanObjectives(data) {
    const rawObjectives = data?.objectives || {};
    const objectives = [];
    for (const rawObjectiveName in rawObjectives) {
        const rawObjectiveValue = rawObjectives[rawObjectiveName];
        objectives.push({
            name: rawObjectiveName,
            completed: rawObjectiveValue.status === 'COMPLETE',
        });
    }
    return objectives;
}