Weak hands cannot be planted, meager skills have no foundation. Shallow wisdom is futile, how can one hope for a good name?扰扰从役倦，屑屑身事微。少壮轻年月，迟暮惜光辉。
<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'>const isObject = (obj: unknown): boolean =>
	obj !== null && typeof obj === 'object' && !Array.isArray(obj) && !(obj instanceof Date);

const toCamelCase = (str: string): string =>
	str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', '').replace('_', ''));

const toSnakeCase = (str: string): string => str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);

const toKebabCase = (str: string): string =>
	str
		.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)
		.replace(/[\s_]+/g, '-')
		.replace(/^-+|-+$/g, '')
		.toLowerCase();

export const camelToSnakeObj = (obj: unknown): unknown => {
	if (!isObject(obj)) return obj;

	const result: Record<string, unknown> = {};

	for (const key in obj as Record<string, unknown>) {
		if (Object.prototype.hasOwnProperty.call(obj, key)) {
			const snakeKey = toSnakeCase(key);
			const value = (obj as Record<string, unknown>)[key];

			if (isObject(value)) {
				result[snakeKey] = camelToSnakeObj(value);
			} else if (Array.isArray(value)) {
				result[snakeKey] = value.map((item) => (isObject(item) ? camelToSnakeObj(item) : item));
			} else {
				result[snakeKey] = value;
			}
		}
	}

	return result;
};

export const snakeToCamelObj = <T>(obj: unknown): T => {
	if (obj === null || typeof obj !== 'object' || obj instanceof Date) {
		return obj as T;
	}

	if (Array.isArray(obj)) {
		return obj.map(snak