docs-util: add docblock generator for models built with DML (#8296)
* docs-util: add docblock generator for models built with DML * add missing turbo task
This commit is contained in:
1 parent
cb33ec5cf1
commit
d127abbcda
30 files changed
+749
-63
No files matched your search
@@ -32,6 +32,13 @@ export function snakeToWords(str: string): string {
|
||||
return str.replaceAll("_", " ").toLowerCase()
|
||||
}
|
||||
|
||||
export function snakeToPascal(str: string): string {
|
||||
return str
|
||||
.split("_")
|
||||
.map((word) => capitalize(word))
|
||||
.join("")
|
||||
}
|
||||
|
||||
export function kebabToTitle(str: string): string {
|
||||
return str
|
||||
.split("-")
|
||||
@@ -76,6 +83,10 @@ export function pascalToCamel(str: string): string {
|
||||
return `${str.charAt(0).toLowerCase()}${str.substring(1)}`
|
||||
}
|
||||
|
||||
export function pascalToWords(str: string): string {
|
||||
return str.replaceAll(/([A-Z])/g, " $1")
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove parts of the name such as DTO, Filterable, etc...
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user