aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/name/index.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/name/index.ts b/src/modules/name/index.ts
index b42de3db..a61442e0 100644
--- a/src/modules/name/index.ts
+++ b/src/modules/name/index.ts
@@ -285,6 +285,16 @@ export class Name {
}
/**
+ * Returns a random sex type.
+ *
+ * @example
+ * faker.name.sexType() // Sex.Female
+ */
+ sexType(): SexType {
+ return this.faker.helpers.objectValue(Sex);
+ }
+
+ /**
* Returns a random name prefix.
*
* @param sex The optional sex to use. Can be either `'female'` or `'male'`.