-------------- 412px wide text --------------
5 |-------------- 412px wide text --------------
5 |-------------- 412px wide text --------------
8 | Go to another page 9 | > 10 | ); 11 | 12 | export default Index; 13 | -------------------------------------------------------------------------------- /examples/next-app-router/app/another/page.tsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | import type { FunctionComponent } from "react"; 3 | 4 | const Another: FunctionComponent = () => ( 5 | <> 6 |-------------- 412px wide text --------------
8 | Go to index page 9 | > 10 | ); 11 | 12 | export default Another; 13 | -------------------------------------------------------------------------------- /src/internal/string.ts: -------------------------------------------------------------------------------- 1 | export const camelizeKebabCaseString = (str: string): string => 2 | str 3 | .replace(/\s+/g, "") 4 | .toLowerCase() 5 | .replace(/-./g, (s) => s[1].toUpperCase()); 6 | 7 | export const kebabizeCamelCaseString = (str: string): string => 8 | str 9 | .replace(/\s+/g, "") 10 | .replace(/[A-Z]+/g, (s) => `-${s[0]}`) 11 | .toLowerCase(); 12 | -------------------------------------------------------------------------------- /examples/next-pages-router/pages/another.tsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | import type { FunctionComponent } from "react"; 3 | 4 | const Another: FunctionComponent = () => ( 5 |-------------- 412px wide text --------------
8 | Go to index page 9 |-------------- 412px wide text --------------
8 | Go to another page 9 |
26 |
48 |