1
0
Fork 0
mirror of https://github.com/CorentinTh/it-tools.git synced 2025-07-22 06:39:37 +02:00
it-tools/utils/string.ts
2021-06-01 00:07:04 +02:00

5 lines
188 B
TypeScript

const capitalise = (s: string) => s.charAt(0).toUpperCase() + s.slice(1)
const shuffle = (s: string) => s.split('').sort(() => 0.5 - Math.random()).join('')
export {capitalise, shuffle}