refactor: fixed more sonarcloud issues

This commit is contained in:
Corentin Thomasset 2021-06-01 00:07:04 +02:00
parent a866ac6070
commit b34eb4c1ac
No known key found for this signature in database
GPG key ID: DBD997E935996158
12 changed files with 32 additions and 109 deletions

View file

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