[web] Lint source code

This commit is contained in:
Alain Nussbaumer
2024-03-31 21:50:33 +02:00
parent cbedb4d38c
commit 7b41980ace
6 changed files with 16 additions and 17 deletions

View File

@@ -31,8 +31,8 @@ const characterIndex = (string = '') => {
return '⌘'
}
export const numberIndex = (number) => {
return Math.floor(number / 10)
const numberIndex = (number) => {
Math.floor(number / 10)
}
const times = [

View File

@@ -1,6 +1,6 @@
const toColor = (string) => {
var hash = 0
for (var i = 0; i < string.length; i++) {
let hash = 0
for (let i = 0; i < string.length; i++) {
hash = string.charCodeAt(i) + ((hash << 5) - hash)
}
return (hash & 0x00ffffff).toString(16)