diff options
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/animal/index.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/animal/index.ts b/src/modules/animal/index.ts index 5a885bbd..bb200a31 100644 --- a/src/modules/animal/index.ts +++ b/src/modules/animal/index.ts @@ -201,4 +201,18 @@ export class AnimalModule extends ModuleBase { type(): string { return this.faker.helpers.arrayElement(this.faker.definitions.animal.type); } + + /** + * Returns a random pet name. + * + * @example + * faker.animal.petName() // 'Coco' + * + * @since 9.2.0 + */ + petName(): string { + return this.faker.helpers.arrayElement( + this.faker.definitions.animal.pet_name + ); + } } |
