mirror of
https://github.com/CorentinTh/it-tools.git
synced 2026-05-29 23:19:50 +00:00
refactor: improved shuffle function (now using Durstenfeld shuffle)
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
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}
|
||||
export {capitalise}
|
||||
|
||||
Reference in New Issue
Block a user