diff options
| author | Nahum Gamaliel Santana <[email protected]> | 2022-07-30 07:02:16 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-07-30 11:02:16 +0000 |
| commit | a65f1a2b59b909c4b5cc044af560ff91642c9a56 (patch) | |
| tree | fdcd541f63b02d07f683a9e4487730e4eecb47cd /src/modules | |
| parent | fc4815520b4c6aaf35a89fe41ff4a94b3346379c (diff) | |
| download | faker-a65f1a2b59b909c4b5cc044af560ff91642c9a56.tar.xz faker-a65f1a2b59b909c4b5cc044af560ff91642c9a56.zip | |
feat: add rodent breed on animal 'en' locale (#1136)
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/animal/index.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/modules/animal/index.ts b/src/modules/animal/index.ts index 416fe533..d5d0ef08 100644 --- a/src/modules/animal/index.ts +++ b/src/modules/animal/index.ts @@ -153,6 +153,18 @@ export class Animal { } /** + * Returns a random rodent breed. + * + * @example + * faker.animal.rodent() // 'Cuscomys ashanika' + */ + rodent(): string { + return this.faker.helpers.arrayElement( + this.faker.definitions.animal.rodent + ); + } + + /** * Returns a random animal type. * * @example |
