mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
16 lines
276 B
TypeScript
16 lines
276 B
TypeScript
declare global {
|
|
interface String {
|
|
toTitle(): string;
|
|
}
|
|
}
|
|
|
|
String.prototype.toTitle = function () {
|
|
return this
|
|
.replaceAll("_", " ")
|
|
.replace(
|
|
/\w\S*/g,
|
|
text => text.charAt(0).toUpperCase() + text.substring(1).toLowerCase()
|
|
);
|
|
}
|
|
|
|
export {}; |