fix: keep 's and ’s lowercase in humanizeKey
This commit is contained in:
parent
203fbbc0c9
commit
b49ae9f047
|
|
@ -41,5 +41,6 @@ export function asRecordArray(value: unknown): Record<string, unknown>[] {
|
|||
export function humanizeKey(value: string): string {
|
||||
return value
|
||||
.replace(/[_-]/g, " ")
|
||||
.replace(/\b\w/g, (letter) => letter.toUpperCase());
|
||||
.replace(/\b\w/g, (letter) => letter.toUpperCase())
|
||||
.replace(/(['’‘ʼ])s\b/gi, (match) => match[0] + "s");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue