feat: 使用prettierrc对代码进行格式化

This commit is contained in:
piexlMax(奇淼
2024-11-09 10:32:26 +08:00
parent 87a4ce17e1
commit 7d9af64f6d
139 changed files with 12677 additions and 12656 deletions
+16 -16
View File
@@ -1,29 +1,29 @@
/* eslint-disable */
export const toUpperCase = (str) => {
if (str[0]) {
return str.replace(str[0], str[0].toUpperCase())
} else {
return ''
}
if (str[0]) {
return str.replace(str[0], str[0].toUpperCase())
} else {
return ''
}
}
export const toLowerCase = (str) => {
if (str[0]) {
return str.replace(str[0], str[0].toLowerCase())
} else {
return ''
}
if (str[0]) {
return str.replace(str[0], str[0].toLowerCase())
} else {
return ''
}
}
// 驼峰转换下划线
export const toSQLLine = (str) => {
if (str === 'ID') return 'ID'
return str.replace(/([A-Z])/g, "_$1").toLowerCase();
if (str === 'ID') return 'ID'
return str.replace(/([A-Z])/g, '_$1').toLowerCase()
}
// 下划线转换驼峰
export const toHump = (name) => {
return name.replace(/\_(\w)/g, function(all, letter) {
return letter.toUpperCase();
});
}
return name.replace(/\_(\w)/g, function (all, letter) {
return letter.toUpperCase()
})
}