diff options
| author | Bobby <[email protected]> | 2022-11-07 10:58:05 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-07 15:58:05 +0000 |
| commit | 7e00d1741495f763f986b3a5daf40943db4abc7d (patch) | |
| tree | 84bf218e5cce1977fcd14d883689516f9f5befba /src/modules | |
| parent | d3632585e01ce4590be57d2045f73f0b25a0f16d (diff) | |
| download | faker-7e00d1741495f763f986b3a5daf40943db4abc7d.tar.xz faker-7e00d1741495f763f986b3a5daf40943db4abc7d.zip | |
feat(person): add `zodiacSign()` (#182)
Co-authored-by: ST-DDT <[email protected]>
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/person/index.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/person/index.ts b/src/modules/person/index.ts index 023cded1..af954d54 100644 --- a/src/modules/person/index.ts +++ b/src/modules/person/index.ts @@ -330,4 +330,18 @@ export class PersonModule { this.faker.definitions.person.title.job ); } + + /** + * Returns a random zodiac sign. + * + * @example + * faker.person.zodiacSign() // 'Pisces' + * + * @since 8.0.0 + */ + zodiacSign(): string { + return this.faker.helpers.arrayElement( + this.faker.definitions.person.western_zodiac_sign + ); + } } |
