You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/modules/image/index.ts
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ export class ImageModule extends ModuleBase {
60
60
* The image URLs are served via the JSDelivr CDN and subject to their [terms of use](https://www.jsdelivr.com/terms).
61
61
*
62
62
* @param options Options for generating an AI avatar.
63
-
* @param options.sex The sex of the person for the avatar. Can be `'female'` or `'male'`. If not provided, defaults to a random selection.
63
+
* @param options.sex The sex of the person for the avatar. Can be `'female'` or `'male'`. If not provided or `'generic'`, defaults to a random selection.
64
64
* @param options.size The size of the image. Can be `512`, `256`, `128`, `64` or `32`. If not provided, defaults to `512`.
65
65
*
66
66
* @example
@@ -73,7 +73,7 @@ export class ImageModule extends ModuleBase {
73
73
options: {
74
74
/**
75
75
* The sex of the person for the avatar.
76
-
* Can be `'female'` or `'male'`.
76
+
* Can be `'female'` or `'male'`. `'generic'` uses a random selection.
77
77
*
78
78
* @default faker.person.sexType()
79
79
*/
@@ -87,7 +87,13 @@ export class ImageModule extends ModuleBase {
87
87
size?: 512|256|128|64|32;
88
88
}={}
89
89
): string{
90
-
const{ sex =this.faker.person.sexType(), size =512}=options;
0 commit comments