1.1.2 • Published 4 years ago
seedable-random-avatar-generator v1.1.2
Seedable Random Avatar Generator
Forked from https://www.npmjs.com/package/random-avatar-generator
Changes in the fork will likely end up there as well.
Generates random avatars from the website https://getavataaars.com/
Usage
Simple
import { getRandomAvatar } from 'seedable-random-avatar-generator';
// Returns get a url for a random avatar
getRandomAvatar();
With a seed
For instance, if you want to generate a random avatar for a user id/email which stays the same each time.
import { getRandomAvatar } from 'seedable-random-avatar-generator';
getRandomAvatar('avatar');
In the example above, specifying the seed avatar
results in this image: -
https://avataaars.io/?accessoriesType=Kurt&avatarStyle=Circle&clotheColor=Blue01&clotheType=Hoodie&eyeType=EyeRoll&eyebrowType=RaisedExcitedNatural&facialHairColor=Blonde&facialHairType=BeardMagestic&hairColor=Black&hatColor=White&mouthType=Sad&skinColor=Yellow&topType=ShortHairShortWaved