Skip to content

Commit a65f1a2

Browse files
authored
feat: add rodent breed on animal 'en' locale (#1136)
1 parent fc48155 commit a65f1a2

File tree

6 files changed

+209
-0
lines changed

6 files changed

+209
-0
lines changed

src/definitions/animal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export type AnimalDefinitions = LocaleEntry<{
1616
insect: string[];
1717
lion: string[];
1818
rabbit: string[];
19+
rodent: string[];
1920
snake: string[];
2021
type: string[];
2122
}>;

src/locales/en/animal/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import horse from './horse';
1515
import insect from './insect';
1616
import lion from './lion';
1717
import rabbit from './rabbit';
18+
import rodent from './rodent';
1819
import snake from './snake';
1920
import type_ from './type';
2021

@@ -31,6 +32,7 @@ const animal: AnimalDefinitions = {
3132
insect,
3233
lion,
3334
rabbit,
35+
rodent,
3436
snake,
3537
type: type_,
3638
};

src/locales/en/animal/rodent.ts

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
export default [
2+
'Abrocoma',
3+
'Abrocoma schistacea',
4+
'Aconaemys',
5+
'Aconaemys porteri',
6+
'African brush-tailed porcupine',
7+
'Andean mountain cavy',
8+
'Argentine tuco-tuco',
9+
'Ashy chinchilla rat',
10+
'Asiatic brush-tailed porcupine',
11+
'Atherurus',
12+
"Azara's agouti",
13+
"Azara's tuco-tuco",
14+
'Bahia porcupine',
15+
'Bathyergus',
16+
'Bathyergus janetta',
17+
'Bathyergus suillus',
18+
"Bennett's chinchilla rat",
19+
'Bicolored-spined porcupine',
20+
'Black agouti',
21+
'Black dwarf porcupine',
22+
'Black-rumped agouti',
23+
'Black-tailed hairy dwarf porcupine',
24+
'Bolivian chinchilla rat',
25+
'Bolivian tuco-tuco',
26+
"Bonetto's tuco-tuco",
27+
"Brandt's yellow-toothed cavy",
28+
'Brazilian guinea pig',
29+
'Brazilian porcupine',
30+
'Brazilian tuco-tuco',
31+
"Bridge's degu",
32+
'Brown hairy dwarf porcupine',
33+
"Budin's chinchilla rat, A. budini",
34+
'Cape porcupine',
35+
'Catamarca tuco-tuco',
36+
'Cavia',
37+
'Central American agouti',
38+
'Chacoan tuco-tuco',
39+
'Chilean rock rat',
40+
'Chinchilla',
41+
'Coendou',
42+
'Coiban agouti',
43+
"Colburn's tuco-tuco",
44+
'Collared tuco-tuco',
45+
'Common degu',
46+
'Common yellow-toothed cavy',
47+
"Conover's tuco-tuco",
48+
'Coruro',
49+
'Crested agouti',
50+
'Crested porcupine',
51+
'Cryptomys',
52+
'Cryptomys bocagei',
53+
'Cryptomys damarensis',
54+
'Cryptomys foxi',
55+
'Cryptomys hottentotus',
56+
'Cryptomys mechowi',
57+
'Cryptomys ochraceocinereus',
58+
'Cryptomys zechi',
59+
'Ctenomys',
60+
'Cuniculus',
61+
'Cuscomys',
62+
'Cuscomys ashanika',
63+
'Dactylomys',
64+
'Dactylomys boliviensis',
65+
'Dactylomys dactylinus',
66+
'Dactylomys peruanus',
67+
'Dasyprocta',
68+
'Domestic guinea pig',
69+
"Emily's tuco-tuco",
70+
'Erethizon',
71+
'Famatina chinchilla rat',
72+
'Frosted hairy dwarf porcupine',
73+
'Fukomys',
74+
'Fukomys amatus',
75+
'Fukomys anselli',
76+
'Fukomys bocagei',
77+
'Fukomys damarensis',
78+
'Fukomys darlingi',
79+
'Fukomys foxi',
80+
'Fukomys ilariae',
81+
'Fukomys kafuensis',
82+
'Fukomys mechowii',
83+
'Fukomys micklemi',
84+
'Fukomys occlusus',
85+
'Fukomys ochraceocinereus',
86+
'Fukomys whytei',
87+
'Fukomys zechi',
88+
'Furtive tuco-tuco',
89+
'Galea',
90+
'Georychus',
91+
'Georychus capensis',
92+
'Golden viscacha-rat',
93+
'Goya tuco-tuco',
94+
'Greater guinea pig',
95+
'Green acouchi',
96+
"Haig's tuco-tuco",
97+
'Heliophobius',
98+
'Heliophobius argenteocinereus',
99+
'Heterocephalus',
100+
'Heterocephalus glaber',
101+
'Highland tuco-tuco',
102+
'Hystrix',
103+
'Indian porcupine',
104+
'Isla Mocha degu',
105+
'Kalinowski agouti',
106+
'Kannabateomys',
107+
'Kannabateomys amblyonyx',
108+
'Lagidium',
109+
'Lagostomus',
110+
"Lewis' tuco-tuco",
111+
'Long-tailed chinchilla',
112+
'Long-tailed porcupine',
113+
"Los Chalchaleros' viscacha-rat",
114+
'Lowland paca',
115+
'Magellanic tuco-tuco',
116+
'Malayan porcupine',
117+
'Maule tuco-tuco',
118+
'Mendoza tuco-tuco',
119+
'Mexican agouti',
120+
'Mexican hairy dwarf porcupine',
121+
'Microcavia',
122+
'Montane guinea pig',
123+
'Moon-toothed degu',
124+
'Mottled tuco-tuco',
125+
'Mountain degu',
126+
'Mountain paca',
127+
'Mountain viscacha-rat',
128+
'Myoprocta',
129+
"Natterer's tuco-tuco",
130+
'North American porcupine',
131+
'Northern viscacha',
132+
'Octodon',
133+
'Octodontomys',
134+
'Octomys',
135+
'Olallamys',
136+
'Olallamys albicauda',
137+
'Olallamys edax',
138+
'Orinoco agouti',
139+
'Paraguaian hairy dwarf porcupine',
140+
"Pearson's tuco-tuco",
141+
'Peruvian tuco-tuco',
142+
'Philippine porcupine',
143+
'Pipanacoctomys',
144+
'Plains viscacha',
145+
'Plains viscacha-rat',
146+
"Porteous' tuco-tuco",
147+
'Punta de Vacas chinchilla rat',
148+
'Red acouchi',
149+
'Red-rumped agouti',
150+
'Reddish tuco-tuco',
151+
'Rio Negro tuco-tuco',
152+
'Robust tuco-tuco',
153+
"Roosmalen's dwarf porcupine",
154+
"Rothschild's porcupine",
155+
'Ruatan Island agouti',
156+
"Sage's rock rat",
157+
'Salinoctomys',
158+
'Salta tuco-tuco',
159+
'San Luis tuco-tuco',
160+
"Santa Catarina's guinea pig",
161+
'Shiny guinea pig',
162+
"Shipton's mountain cavy",
163+
'Short-tailed chinchilla',
164+
'Silky tuco-tuco',
165+
'Social tuco-tuco',
166+
'Southern mountain cavy',
167+
'Southern tuco-tuco',
168+
'Southern viscacha',
169+
'Spalacopus',
170+
"Spix's yellow-toothed cavy",
171+
"Steinbach's tuco-tuco",
172+
'Streaked dwarf porcupine',
173+
'Strong tuco-tuco',
174+
'Stump-tailed porcupine',
175+
'Sumatran porcupine',
176+
'Sunda porcupine',
177+
'Talas tuco-tuco',
178+
'Tawny tuco-tuco',
179+
'Thick-spined porcupine',
180+
'Tiny tuco-tuco',
181+
'Trichys',
182+
'Tucuman tuco-tuco',
183+
'Tympanoctomys',
184+
'Uspallata chinchilla rat',
185+
'White-toothed tuco-tuco',
186+
"Wolffsohn's viscacha",
187+
];

src/modules/animal/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ export class Animal {
152152
);
153153
}
154154

155+
/**
156+
* Returns a random rodent breed.
157+
*
158+
* @example
159+
* faker.animal.rodent() // 'Cuscomys ashanika'
160+
*/
161+
rodent(): string {
162+
return this.faker.helpers.arrayElement(
163+
this.faker.definitions.animal.rodent
164+
);
165+
}
166+
155167
/**
156168
* Returns a random animal type.
157169
*

test/__snapshots__/animal.spec.ts.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ exports[`animal > 42 > lion 1`] = `"West African Lion"`;
2424

2525
exports[`animal > 42 > rabbit 1`] = `"English Spot"`;
2626

27+
exports[`animal > 42 > rodent 1`] = `"Famatina chinchilla rat"`;
28+
2729
exports[`animal > 42 > snake 1`] = `"Grey-banded kingsnake"`;
2830

2931
exports[`animal > 42 > type 1`] = `"lion"`;
@@ -52,6 +54,8 @@ exports[`animal > 1211 > lion 1`] = `"Cape lion"`;
5254

5355
exports[`animal > 1211 > rabbit 1`] = `"Silver Marten"`;
5456

57+
exports[`animal > 1211 > rodent 1`] = `"Strong tuco-tuco"`;
58+
5559
exports[`animal > 1211 > snake 1`] = `"Tiger pit viper"`;
5660

5761
exports[`animal > 1211 > type 1`] = `"horse"`;
@@ -80,6 +84,8 @@ exports[`animal > 1337 > lion 1`] = `"Barbary Lion"`;
8084

8185
exports[`animal > 1337 > rabbit 1`] = `"Cinnamon"`;
8286

87+
exports[`animal > 1337 > rodent 1`] = `"Crested porcupine"`;
88+
8389
exports[`animal > 1337 > snake 1`] = `"Fierce snake"`;
8490

8591
exports[`animal > 1337 > type 1`] = `"bear"`;

test/animal.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const functionNames = [
1717
'insect',
1818
'lion',
1919
'rabbit',
20+
'rodent',
2021
'snake',
2122
'type',
2223
] as const;

0 commit comments

Comments
 (0)