remove create client button

This commit is contained in:
dderbentsov
2023-07-28 02:37:25 +03:00
parent db47f32b8f
commit c53778ba50
3 changed files with 19 additions and 14 deletions

View File

@@ -0,0 +1,13 @@
// TODO обход дочек
export function keysCamelToSnake(obj) {
let newObj = Object.entries(obj).reduce((acc, [key, val]) => {
const modifiedKey = key.replace(/[A-Z]/g, (c) => {
return "_" + c.toLowerCase();
});
return {
...acc,
...{ [modifiedKey]: val },
};
}, {});
return newObj;
}

View File

@@ -0,0 +1,5 @@
export function camelToSnake(str) {
return str.replace(/[A-Z]/g, (c) => {
return "_" + c.toLowerCase();
});
}