Skip to content

Commit

Permalink
Merge pull request #3274 from revosw/randomhumanid-fix
Browse files Browse the repository at this point in the history
fix: properly generate "adjective_animal_verb_adverb"
  • Loading branch information
samuelstroschein authored Dec 16, 2024
2 parents 6183e5e + 8ca1460 commit cfe3c8f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { adjectives, animals, adverbs, verbs } from "./words.js"

export function randomHumanId() {
return `${adjectives[Math.floor(Math.random() * 256)]}_${
adjectives[Math.floor(Math.random() * 256)]
}_${animals[Math.floor(Math.random() * 256)]}_${verbs[Math.floor(Math.random() * 256)]}`
animals[Math.floor(Math.random() * 256)]
}_${verbs[Math.floor(Math.random() * 256)]}_${adverbs[Math.floor(Math.random() * 256)]}`
}

export function humanIdHash(value: string, offset: number = 0) {
Expand Down

0 comments on commit cfe3c8f

Please sign in to comment.