/[sudobot]/trunk/docs/utils/utils.ts
ViewVC logotype

Contents of /trunk/docs/utils/utils.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 626 - (show annotations)
Sat Sep 7 09:38:45 2024 UTC (6 months, 3 weeks ago) by rakinar2
File MIME type: application/typescript
File size: 272 byte(s)
chore: sync with git

1 import { BASE_URL } from "./links";
2
3 export const toTitleCase = (s: string) =>
4 s
5 .replace(/^[-_]*(.)/, (_, c) => c.toUpperCase())
6 .replace(/[-_]+(.)/g, (_, c) => " " + c.toUpperCase());
7
8 export const absoluteURL = (url: string) => `${BASE_URL}${url}`;

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26