2026-07-27 11:26:19 +00:00
|
|
|
// Module ID: 10997
|
|
|
|
|
// Function ID: 85495
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: _transformMetadataToCamelCase
|
2026-07-23 10:11:24 +00:00
|
|
|
// Dependencies: [22, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-27 11:26:19 +00:00
|
|
|
// Module 10997 (_transformMetadataToCamelCase)
|
2026-07-23 10:11:24 +00:00
|
|
|
const result = require("set").fileFinishedImporting("modules/guild_automod/DataUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
function _transformMetadataToCamelCase(body) {
|
2026-07-23 10:11:24 +00:00
|
|
|
let closure_0 = body;
|
2026-07-20 16:05:17 +00:00
|
|
|
let reduced = body;
|
|
|
|
|
if (null != body) {
|
|
|
|
|
const _Object = Object;
|
|
|
|
|
const keys = Object.keys(body);
|
|
|
|
|
reduced = keys.reduce((arg0, arg1) => {
|
2026-07-23 10:11:24 +00:00
|
|
|
const camelCaseResult = body(outer1_1[0]).camelCase(arg1);
|
|
|
|
|
if ("object" === typeof body[arg1]) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const _Array = Array;
|
2026-07-23 10:11:24 +00:00
|
|
|
if (!Array.isArray(body[arg1])) {
|
|
|
|
|
arg0[camelCaseResult] = outer1_2(body[arg1]);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return arg0;
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
arg0[camelCaseResult] = body[arg1];
|
2026-07-20 16:05:17 +00:00
|
|
|
}, {});
|
|
|
|
|
}
|
|
|
|
|
return reduced;
|
|
|
|
|
}
|
|
|
|
|
function _transformMetadataToSnakeCase(metadata) {
|
2026-07-23 10:11:24 +00:00
|
|
|
let closure_0 = metadata;
|
2026-07-20 16:05:17 +00:00
|
|
|
let reduced = metadata;
|
|
|
|
|
if (null != metadata) {
|
|
|
|
|
const _Object = Object;
|
|
|
|
|
const keys = Object.keys(metadata);
|
|
|
|
|
reduced = keys.reduce((arg0, arg1) => {
|
2026-07-23 10:11:24 +00:00
|
|
|
const snakeCaseResult = metadata(outer1_1[0]).snakeCase(arg1);
|
|
|
|
|
if ("object" === typeof metadata[arg1]) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const _Array = Array;
|
2026-07-23 10:11:24 +00:00
|
|
|
if (!Array.isArray(metadata[arg1])) {
|
|
|
|
|
arg0[snakeCaseResult] = outer1_3(metadata[arg1]);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
arg0[snakeCaseResult] = metadata[arg1];
|
2026-07-20 16:05:17 +00:00
|
|
|
return arg0;
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
arg0[snakeCaseResult] = metadata[arg1];
|
2026-07-20 16:05:17 +00:00
|
|
|
}, {});
|
|
|
|
|
}
|
|
|
|
|
return reduced;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export { _transformMetadataToCamelCase };
|
|
|
|
|
export { _transformMetadataToSnakeCase };
|