diff --git a/src/definitions/animal.ts b/src/definitions/animal.ts index 58e493e5f0b..73f269ff1f3 100644 --- a/src/definitions/animal.ts +++ b/src/definitions/animal.ts @@ -16,6 +16,7 @@ export type AnimalDefinitions = LocaleEntry<{ insect: string[]; lion: string[]; rabbit: string[]; + rodent: string[]; snake: string[]; type: string[]; }>; diff --git a/src/locales/en/animal/index.ts b/src/locales/en/animal/index.ts index da536e8c9ce..393641e0c2a 100644 --- a/src/locales/en/animal/index.ts +++ b/src/locales/en/animal/index.ts @@ -15,6 +15,7 @@ import horse from './horse'; import insect from './insect'; import lion from './lion'; import rabbit from './rabbit'; +import rodent from './rodent'; import snake from './snake'; import type_ from './type'; @@ -31,6 +32,7 @@ const animal: AnimalDefinitions = { insect, lion, rabbit, + rodent, snake, type: type_, }; diff --git a/src/locales/en/animal/rodent.ts b/src/locales/en/animal/rodent.ts new file mode 100644 index 00000000000..38a5325aba8 --- /dev/null +++ b/src/locales/en/animal/rodent.ts @@ -0,0 +1,187 @@ +export default [ + 'Abrocoma', + 'Abrocoma schistacea', + 'Aconaemys', + 'Aconaemys porteri', + 'African brush-tailed porcupine', + 'Andean mountain cavy', + 'Argentine tuco-tuco', + 'Ashy chinchilla rat', + 'Asiatic brush-tailed porcupine', + 'Atherurus', + "Azara's agouti", + "Azara's tuco-tuco", + 'Bahia porcupine', + 'Bathyergus', + 'Bathyergus janetta', + 'Bathyergus suillus', + "Bennett's chinchilla rat", + 'Bicolored-spined porcupine', + 'Black agouti', + 'Black dwarf porcupine', + 'Black-rumped agouti', + 'Black-tailed hairy dwarf porcupine', + 'Bolivian chinchilla rat', + 'Bolivian tuco-tuco', + "Bonetto's tuco-tuco", + "Brandt's yellow-toothed cavy", + 'Brazilian guinea pig', + 'Brazilian porcupine', + 'Brazilian tuco-tuco', + "Bridge's degu", + 'Brown hairy dwarf porcupine', + "Budin's chinchilla rat, A. budini", + 'Cape porcupine', + 'Catamarca tuco-tuco', + 'Cavia', + 'Central American agouti', + 'Chacoan tuco-tuco', + 'Chilean rock rat', + 'Chinchilla', + 'Coendou', + 'Coiban agouti', + "Colburn's tuco-tuco", + 'Collared tuco-tuco', + 'Common degu', + 'Common yellow-toothed cavy', + "Conover's tuco-tuco", + 'Coruro', + 'Crested agouti', + 'Crested porcupine', + 'Cryptomys', + 'Cryptomys bocagei', + 'Cryptomys damarensis', + 'Cryptomys foxi', + 'Cryptomys hottentotus', + 'Cryptomys mechowi', + 'Cryptomys ochraceocinereus', + 'Cryptomys zechi', + 'Ctenomys', + 'Cuniculus', + 'Cuscomys', + 'Cuscomys ashanika', + 'Dactylomys', + 'Dactylomys boliviensis', + 'Dactylomys dactylinus', + 'Dactylomys peruanus', + 'Dasyprocta', + 'Domestic guinea pig', + "Emily's tuco-tuco", + 'Erethizon', + 'Famatina chinchilla rat', + 'Frosted hairy dwarf porcupine', + 'Fukomys', + 'Fukomys amatus', + 'Fukomys anselli', + 'Fukomys bocagei', + 'Fukomys damarensis', + 'Fukomys darlingi', + 'Fukomys foxi', + 'Fukomys ilariae', + 'Fukomys kafuensis', + 'Fukomys mechowii', + 'Fukomys micklemi', + 'Fukomys occlusus', + 'Fukomys ochraceocinereus', + 'Fukomys whytei', + 'Fukomys zechi', + 'Furtive tuco-tuco', + 'Galea', + 'Georychus', + 'Georychus capensis', + 'Golden viscacha-rat', + 'Goya tuco-tuco', + 'Greater guinea pig', + 'Green acouchi', + "Haig's tuco-tuco", + 'Heliophobius', + 'Heliophobius argenteocinereus', + 'Heterocephalus', + 'Heterocephalus glaber', + 'Highland tuco-tuco', + 'Hystrix', + 'Indian porcupine', + 'Isla Mocha degu', + 'Kalinowski agouti', + 'Kannabateomys', + 'Kannabateomys amblyonyx', + 'Lagidium', + 'Lagostomus', + "Lewis' tuco-tuco", + 'Long-tailed chinchilla', + 'Long-tailed porcupine', + "Los Chalchaleros' viscacha-rat", + 'Lowland paca', + 'Magellanic tuco-tuco', + 'Malayan porcupine', + 'Maule tuco-tuco', + 'Mendoza tuco-tuco', + 'Mexican agouti', + 'Mexican hairy dwarf porcupine', + 'Microcavia', + 'Montane guinea pig', + 'Moon-toothed degu', + 'Mottled tuco-tuco', + 'Mountain degu', + 'Mountain paca', + 'Mountain viscacha-rat', + 'Myoprocta', + "Natterer's tuco-tuco", + 'North American porcupine', + 'Northern viscacha', + 'Octodon', + 'Octodontomys', + 'Octomys', + 'Olallamys', + 'Olallamys albicauda', + 'Olallamys edax', + 'Orinoco agouti', + 'Paraguaian hairy dwarf porcupine', + "Pearson's tuco-tuco", + 'Peruvian tuco-tuco', + 'Philippine porcupine', + 'Pipanacoctomys', + 'Plains viscacha', + 'Plains viscacha-rat', + "Porteous' tuco-tuco", + 'Punta de Vacas chinchilla rat', + 'Red acouchi', + 'Red-rumped agouti', + 'Reddish tuco-tuco', + 'Rio Negro tuco-tuco', + 'Robust tuco-tuco', + "Roosmalen's dwarf porcupine", + "Rothschild's porcupine", + 'Ruatan Island agouti', + "Sage's rock rat", + 'Salinoctomys', + 'Salta tuco-tuco', + 'San Luis tuco-tuco', + "Santa Catarina's guinea pig", + 'Shiny guinea pig', + "Shipton's mountain cavy", + 'Short-tailed chinchilla', + 'Silky tuco-tuco', + 'Social tuco-tuco', + 'Southern mountain cavy', + 'Southern tuco-tuco', + 'Southern viscacha', + 'Spalacopus', + "Spix's yellow-toothed cavy", + "Steinbach's tuco-tuco", + 'Streaked dwarf porcupine', + 'Strong tuco-tuco', + 'Stump-tailed porcupine', + 'Sumatran porcupine', + 'Sunda porcupine', + 'Talas tuco-tuco', + 'Tawny tuco-tuco', + 'Thick-spined porcupine', + 'Tiny tuco-tuco', + 'Trichys', + 'Tucuman tuco-tuco', + 'Tympanoctomys', + 'Uspallata chinchilla rat', + 'White-toothed tuco-tuco', + "Wolffsohn's viscacha", +]; diff --git a/src/modules/animal/index.ts b/src/modules/animal/index.ts index 416fe533a2a..d5d0ef08ae8 100644 --- a/src/modules/animal/index.ts +++ b/src/modules/animal/index.ts @@ -152,6 +152,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. * diff --git a/test/__snapshots__/animal.spec.ts.snap b/test/__snapshots__/animal.spec.ts.snap index 70a079891d5..8035add75fe 100644 --- a/test/__snapshots__/animal.spec.ts.snap +++ b/test/__snapshots__/animal.spec.ts.snap @@ -24,6 +24,8 @@ exports[`animal > 42 > lion 1`] = `"West African Lion"`; exports[`animal > 42 > rabbit 1`] = `"English Spot"`; +exports[`animal > 42 > rodent 1`] = `"Famatina chinchilla rat"`; + exports[`animal > 42 > snake 1`] = `"Grey-banded kingsnake"`; exports[`animal > 42 > type 1`] = `"lion"`; @@ -52,6 +54,8 @@ exports[`animal > 1211 > lion 1`] = `"Cape lion"`; exports[`animal > 1211 > rabbit 1`] = `"Silver Marten"`; +exports[`animal > 1211 > rodent 1`] = `"Strong tuco-tuco"`; + exports[`animal > 1211 > snake 1`] = `"Tiger pit viper"`; exports[`animal > 1211 > type 1`] = `"horse"`; @@ -80,6 +84,8 @@ exports[`animal > 1337 > lion 1`] = `"Barbary Lion"`; exports[`animal > 1337 > rabbit 1`] = `"Cinnamon"`; +exports[`animal > 1337 > rodent 1`] = `"Crested porcupine"`; + exports[`animal > 1337 > snake 1`] = `"Fierce snake"`; exports[`animal > 1337 > type 1`] = `"bear"`; diff --git a/test/animal.spec.ts b/test/animal.spec.ts index c21d67768cf..26c01e3132b 100644 --- a/test/animal.spec.ts +++ b/test/animal.spec.ts @@ -17,6 +17,7 @@ const functionNames = [ 'insect', 'lion', 'rabbit', + 'rodent', 'snake', 'type', ] as const;