Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 6x 7x 7x | import { ReactNode } from "react";
 
export function capitalizeFirstLetter(string: string | ReactNode[]): string {
  if (typeof string === "string") {
    return string.charAt(0).toUpperCase() + string.slice(1);
  } else E{
    return (
      string[0]?.toString().charAt(0).toUpperCase() ||
      "" + (string[0]?.toString().slice(1) || "")
    );
  }
}
  |