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:
@@ -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