feat(striker-ui-api): add cap function

main
Tsu-ba-me 2 years ago
parent e73afffc55
commit 59ddc232e7
  1. 4
      striker-ui-api/src/lib/cap.ts

@ -0,0 +1,4 @@
export const cap = (
value: string,
{ locales }: { locales?: string | string[] } = {},
) => `${value[0].toLocaleUpperCase(locales)}${value.slice(1)}`;
Loading…
Cancel
Save