stz_random_avator
v1.0.1
Published
获取随机头像
Downloads
4
Readme
面试题
使用过ts发过包吗
知道什么是发包嘛
有没有过自己维护的开源项目
有自己写过cli嘛
了解node嘛
初始化项目
npm init -y
tsc init
配置出口文件 tsconfig.json/outDir : dist
package.json entry:'dist/index.js'
npm login
npm publish
后台项目 用户 自动生成头像
https://avataaars.io/
?accessoriesType=Prescription01
&avatarStyle=Circle
&clotheColor=Pink
&clotheType=Overall
&eyeType=Close
&eyebrowType=AngryNatural
&facialHairColor=Blonde
&facialHairType=MoustacheFancy
&hairColor=Blonde
&hatColor=Blue02
&mouthType=Twinkle
&skinColor=Black
&topType=ShortHairShortFlat
头部
'NoHair',
'Eyepatch',
'Hat',
'Hijab',
'Turban',
'WinterHat1',
'WinterHat2',
'WinterHat3',
'WinterHat4',
'LongHairBigHair',
'LongHairBob',
'LongHairBun',
'LongHairCurly',
'LongHairCurvy',
'LongHairDreads',
'LongHairFrida',
'LongHairFro',
'LongHairFroBand',
'LongHairNotTooLong',
'LongHairShavedSides',
'LongHairMiaWallace',
'LongHairStraight',
'LongHairStraight2',
'LongHairStraightStrand',
'ShortHairDreads01',
'ShortHairDreads02',
'ShortHairFrizzle',
'ShortHairShaggyMullet',
'ShortHairShortCurly',
'ShortHairShortFlat',
'ShortHairShortRound',
'ShortHairShortWaved',
'ShortHairSides',
'ShortHairTheCaesar',
'ShortHairTheCaesarSidePart'
配件
'Blank',
'Kurt',
'Prescription01',
'Prescription02',
'Round',
'Sunglasses',
'Wayfarers'
发型
'Blank',
'BeardMedium',
'BeardLight',
'BeardMagestic',
'MoustacheFancy',
'MoustacheMagnum'
颜色
'Auburn',
'Black',
'Blonde',
'BlondeGolden',
'Brown',
'BrownDark',
'Platinum',
'Red'
衣服类型
'BlazerShirt',
'BlazerSweater',
'CollarSweater',
'GraphicShirt',
'Hoodie',
'Overall',
'ShirtCrewNeck',
'ShirtScoopNeck',
'ShirtVNeck'
眼睛类型
'Close',
'Cry',
'Default',
'Dizzy',
'EyeRoll',
'Happy',
'Hearts',
'Side',
'Squint',
'Surprised',
'Wink',
'WinkWacky'
表情
'Angry',
'AngryNatural',
'Default',
'DefaultNatural',
'FlatNatural',
'RaisedExcited',
'RaisedExcitedNatural',
'SadConcerned',
'SadConcernedNatural',
'UnibrowNatural',
'UpDown',
'UpDownNatural'
嘴巴
'Concerned',
'Default',
'Disbelief',
'Eating',
'Grimace',
'Sad',
'ScreamOpen',
'Serious',
'Smile',
'Tongue',
'Twinkle',
'Vomit'
皮肤颜色
'Tanned', 'Yellow', 'Pale', 'Light', 'Brown', 'DarkBrown', 'Black'
头发颜色
'Auburn',
'Black',
'Blonde',
'BlondeGolden',
'Brown',
'BrownDark',
'PastelPink',
'Platinum',
'Red',
'SilverGray'
帽子颜色
'Black',
'Blue01',
'Blue02',
'Blue03',
'Gray01',
'Gray02',
'Heather',
'PastelBlue',
'PastelGreen',
'PastelOrange',
'PastelRed',
'PastelYellow',
'Pink',
'Red',
'White'
衣服颜色
'Black',
'Blue01',
'Blue02',
'Blue03',
'Gray01',
'Gray02',
'Heather',
'PastelBlue',
'PastelGreen',
'PastelOrange',
'PastelRed',
'PastelYellow',
'Pink',
'Red',
'White'