Enums #228
Answered
by
FlorianKoerner
NilsBaumgartner1994
asked this question in
Q&A
Enums
#228
-
|
Would be nice to use enums or to get all Values of a specific style. {
...
clothes: Clothes.blazer
...
}or let clothValues = Object.keys(Clothes); |
Beta Was this translation helpful? Give feedback.
Answered by
FlorianKoerner
Jun 12, 2022
Replies: 1 comment
-
|
Each avatar style comes with a JSON schema. From this JSON schema you can read the options. import * as style from '@dicebear/avataaars';
let clothValues = style.schema.properties.clothes.items.enum;
/**
[
"blazer",
"blazerAndShirt",
"blazerAndSweater",
"sweater",
"collarAndSweater",
"shirt",
"graphicShirt",
"shirtCrewNeck",
"shirtScoopNeck",
"shirtVNeck",
"hoodie",
"overall"
]
*/See also: If you are looking for autocompletion, you could use Typescript or Visual Studio Code. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
FlorianKoerner
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @NilsBaumgartner1994
Each avatar style comes with a JSON schema. From this JSON schema you can read the options.
See also:
If you are looking for autocompletion, you could use Typescript or Visual Studio Code.