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

Diff of /trunk/docs/utils/utils.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 625 by rakinar2, Mon Jul 29 17:59:26 2024 UTC revision 626 by rakinar2, Sat Sep 7 09:38:45 2024 UTC
# Line 1  Line 1 
1    import { BASE_URL } from "./links";
2    
3  export const toTitleCase = (s: string) =>  export const toTitleCase = (s: string) =>
4      s      s
5          .replace(/^[-_]*(.)/, (_, c) => c.toUpperCase())          .replace(/^[-_]*(.)/, (_, c) => c.toUpperCase())
6          .replace(/[-_]+(.)/g, (_, c) => " " + c.toUpperCase());          .replace(/[-_]+(.)/g, (_, c) => " " + c.toUpperCase());
7    
8    export const absoluteURL = (url: string) => `${BASE_URL}${url}`;

Legend:
Removed from v.625  
changed lines
  Added in v.626

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26