We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82a4002 commit f38f816Copy full SHA for f38f816
src/functions/usernameToColor/index.ts
@@ -5,7 +5,7 @@
5
6
import type { Color } from '../../utils/colors.ts'
7
8
-import md5 from 'md5'
+import md5 from 'crypto-js/md5.js'
9
import { generatePalette } from '../../utils/colors.ts'
10
11
/**
@@ -18,7 +18,7 @@ function hashCode(str: string): number {
18
19
// Hash a given string, if it is not md5 hash already
20
if (str.match(/^([0-9a-f]{4}-?){8}$/) === null) {
21
- hash = md5(str)
+ hash = md5(str).toString()
22
}
23
24
hash = hash.replace(/[^0-9a-f]/g, '')
0 commit comments