- now stats, attributes, characters stats have a changeable id
- now all additional promts are stacked in 2 lines
This commit is contained in:
Alamion
2026-02-23 21:42:25 +03:00
parent 502646bb92
commit 4d0de8419c
5 changed files with 48 additions and 13 deletions
+11
View File
@@ -0,0 +1,11 @@
const toSnake = str => str
.replace(/[^a-zA-Z]/g, '_')
.replace(/([A-Z])/g, '_$1')
.toLowerCase()
.replace(/_+/g, '_')
.replace(/^_|_$/g, '');
export const safeToSnake = (str) => {
const res = toSnake(str);
return (res.length >= 2) ? res : str; // considering element with one symbol is too short to be safe
};