aboutsummaryrefslogtreecommitdiff
path: root/build/cleaners/skyblock/profiles.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/cleaners/skyblock/profiles.js')
-rw-r--r--build/cleaners/skyblock/profiles.js17
1 files changed, 6 insertions, 11 deletions
diff --git a/build/cleaners/skyblock/profiles.js b/build/cleaners/skyblock/profiles.js
index b916209..a85b1f3 100644
--- a/build/cleaners/skyblock/profiles.js
+++ b/build/cleaners/skyblock/profiles.js
@@ -1,10 +1,7 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.cleanSkyblockProfilesResponse = exports.cleanPlayerSkyblockProfiles = void 0;
-const profile_1 = require("./profile");
-function cleanPlayerSkyblockProfiles(rawProfiles) {
+import { cleanSkyblockProfileResponse } from './profile.js';
+export function cleanPlayerSkyblockProfiles(rawProfiles) {
let profiles = [];
- for (const profile of Object.values(rawProfiles !== null && rawProfiles !== void 0 ? rawProfiles : {})) {
+ for (const profile of Object.values(rawProfiles ?? {})) {
profiles.push({
uuid: profile.profile_id,
name: profile.cute_name
@@ -12,15 +9,13 @@ function cleanPlayerSkyblockProfiles(rawProfiles) {
}
return profiles;
}
-exports.cleanPlayerSkyblockProfiles = cleanPlayerSkyblockProfiles;
/** Convert an array of raw profiles into clean profiles */
-async function cleanSkyblockProfilesResponse(data) {
+export async function cleanSkyblockProfilesResponse(data) {
const promises = [];
- for (const profile of data !== null && data !== void 0 ? data : []) {
+ for (const profile of data ?? []) {
// let cleanedProfile = await cleanSkyblockProfileResponseLighter(profile)
- promises.push(profile_1.cleanSkyblockProfileResponse(profile));
+ promises.push(cleanSkyblockProfileResponse(profile));
}
const cleanedProfiles = (await Promise.all(promises)).filter(p => p);
return cleanedProfiles;
}
-exports.cleanSkyblockProfilesResponse = cleanSkyblockProfilesResponse;