diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-13 20:11:53 -0600 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-13 20:11:53 -0600 |
commit | cd707234194b41df933a3a287b5fbec3657063d5 (patch) | |
tree | 22115a93afcba5b268fbeb9d69b7e1fa8ed95fa6 /build/cleaners/skyblock/objectives.js | |
parent | 9b2856303374521b315759500cf594ec7f22d293 (diff) | |
download | skyblock-api-cd707234194b41df933a3a287b5fbec3657063d5.tar.gz skyblock-api-cd707234194b41df933a3a287b5fbec3657063d5.tar.bz2 skyblock-api-cd707234194b41df933a3a287b5fbec3657063d5.zip |
add objectives and skills
Diffstat (limited to 'build/cleaners/skyblock/objectives.js')
-rw-r--r-- | build/cleaners/skyblock/objectives.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/build/cleaners/skyblock/objectives.js b/build/cleaners/skyblock/objectives.js new file mode 100644 index 0000000..d45307c --- /dev/null +++ b/build/cleaners/skyblock/objectives.js @@ -0,0 +1,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; |