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:
Shahed Nasser
2024-07-29 10:11:39 +02:00
committed by GitHub
parent cb33ec5cf1
commit d127abbcda
30 changed files with 749 additions and 63 deletions
@@ -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...
*