aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2023-01-01 00:49:19 +0700
committerGitHub <[email protected]>2022-12-31 17:49:19 +0000
commit2a2e054a16a45bc5cd56bdd923b7f5140eb12699 (patch)
tree0b839ea78065c808c4816c404d07e2b2cc8a53c8 /src/modules
parent351f8f0ee1e5bcefc4188b3124e7a9eeec774192 (diff)
downloadfaker-2a2e054a16a45bc5cd56bdd923b7f5140eb12699.tar.xz
faker-2a2e054a16a45bc5cd56bdd923b7f5140eb12699.zip
feat(person): add short bio (#1696)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/person/index.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/person/index.ts b/src/modules/person/index.ts
index 2e443c3e..59202fb0 100644
--- a/src/modules/person/index.ts
+++ b/src/modules/person/index.ts
@@ -241,6 +241,20 @@ export class PersonModule {
}
/**
+ * Returns a random short biography
+ *
+ * @example
+ * faker.person.bio() // 'oatmeal advocate, veteran 🐠'
+ *
+ * @since 8.0.0
+ */
+ bio(): string {
+ const { bio_patterns } = this.faker.definitions.person;
+
+ return this.faker.helpers.fake(bio_patterns);
+ }
+
+ /**
* Returns a random person prefix.
*
* @param sex The optional sex to use. Can be either `'female'` or `'male'`.