aboutsummaryrefslogtreecommitdiff
path: root/build/cleaners/skyblock/objectives.js
blob: d45307c2623cb4828fc8eb183e156c1e9886d652 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cleanObjectives = void 0;
function cleanObjectives(data) {
    const rawObjectives = (data === null || data === void 0 ? void 0 : data.objectives) || {};
    const objectives = [];
    for (const rawObjectiveName in rawObjectives) {
        const rawObjectiveValue = rawObjectives[rawObjectiveName];
        objectives.push({
            name: rawObjectiveName,
            completed: rawObjectiveValue.status === 'COMPLETE',
        });
    }
    return objectives;
}
exports.cleanObjectives = cleanObjectives;