/* eslint-disable  @typescript-eslint/no-explicit-any */
const toCamel = (s) => s.replace(/([-_][a-z])/gi, ($1) => $1.toUpperCase().replace("-", "").replace("_", ""));
const isArray = (a) => Array.isArray(a);
const isObject = (o) => o === Object(o) && !isArray(o) && typeof o !== "function";
// Converts all the object keys (incl. nested) into camel case
export const objKeysToCamelCase = (o) => {
    if (isObject(o)) {
        const n = {};
        Object.keys(o).forEach((k) => {
            n[toCamel(k)] = objKeysToCamelCase(o[k]);
        });
        return n;
    }
    if (isArray(o)) {
        return o.map((i) => objKeysToCamelCase(i));
    }
    return o;
};
//# sourceMappingURL=ObjKeysToCamelCase.js.map