mimic-data 1.0.2 โ 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +555 -348
- package/dist/index.d.mts +127 -42
- package/dist/index.d.ts +127 -42
- package/dist/index.js +8240 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8213 -129
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,349 +1,556 @@
|
|
|
1
|
-
# mimic-data
|
|
2
|
-
|
|
3
|
-
Library TypeScript ringan tanpa dependency eksternal untuk menghasilkan data dummy yang realistis dengan dukungan lokalisasi yang kuat.
|
|
4
|
-
|
|
5
|
-
## โจ Fitur
|
|
6
|
-
|
|
7
|
-
- ๐ **44 Locale** - Coverage global yang sangat luas
|
|
8
|
-
- ๐ชถ **Ringan** - Zero runtime dependencies
|
|
9
|
-
- ๐ฆ **Tree-shakeable** - Hanya bundle yang Anda gunakan
|
|
10
|
-
- ๐ง **TypeScript Native** - Full type safety
|
|
11
|
-
- ๐ฏ **Mudah Digunakan** - API yang sederhana dan intuitif
|
|
12
|
-
|
|
13
|
-
## ๐ฆ Instalasi
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install mimic-data
|
|
17
|
-
# atau
|
|
18
|
-
yarn add mimic-data
|
|
19
|
-
# atau
|
|
20
|
-
pnpm add mimic-data
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## ๐ Penggunaan Dasar
|
|
24
|
-
|
|
25
|
-
### Metode 1: Factory Function (Rekomendasi)
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
import { createMimic } from 'mimic-data';
|
|
29
|
-
|
|
30
|
-
// Buat instance dengan locale tertentu
|
|
31
|
-
const mimic = createMimic('id_ID');
|
|
32
|
-
|
|
33
|
-
// Generate data
|
|
34
|
-
console.log(mimic.identity.fullName());
|
|
35
|
-
// Output: "Budi Santoso"
|
|
36
|
-
|
|
37
|
-
console.log(mimic.location.fullAddress());
|
|
38
|
-
// Output: "Jl. Merdeka No. 123, RT 5/RW 3, Jakarta, DKI Jakarta 12345"
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Metode 2: Class Langsung
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
import { Mimic, locales } from 'mimic-data';
|
|
45
|
-
|
|
46
|
-
const mimic = new Mimic(locales.ja_JP);
|
|
47
|
-
|
|
48
|
-
console.log(mimic.identity.fullName());
|
|
49
|
-
// Output: "Tanaka Kenji"
|
|
50
|
-
|
|
51
|
-
console.log(mimic.location.fullAddress());
|
|
52
|
-
// Output: "ใ123-4567 Tokyo, Yokohama, Chuo-dori 2-5-10"
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## ๐ Locale yang Tersedia (44 Negara!)
|
|
56
|
-
|
|
57
|
-
### Americas ๐ (6)
|
|
58
|
-
- `en_US` / `en` / `us` / `usa` - ๐บ๐ธ USA (imperial)
|
|
59
|
-
- `en_CA` / `ca` / `canada` - ๐จ๐ฆ Canada (metric)
|
|
60
|
-
- `es_MX` / `mx` / `mexico` - ๐ฒ๐ฝ Mexico (metric)
|
|
61
|
-
- `pt_BR` / `pt` / `br` / `brazil` - ๐ง๐ท Brazil (metric)
|
|
62
|
-
- `es_AR` / `ar` / `argentina` - ๐ฆ๐ท Argentina (metric)
|
|
63
|
-
- `es_CL` / `cl` / `chile` - ๐จ๐ฑ Chile (metric)
|
|
64
|
-
|
|
65
|
-
### Europe ๐ (19)
|
|
66
|
-
- `en_GB` / `gb` / `uk` / `britain` - ๐ฌ๐ง UK (metric)
|
|
67
|
-
- `de_DE` / `de` / `germany` / `deutsch` - ๐ฉ๐ช Germany (metric)
|
|
68
|
-
- `de_AT` / `at` / `austria` - ๐ฆ๐น Austria (metric)
|
|
69
|
-
- `de_CH` / `ch` / `switzerland` - ๐จ๐ญ Switzerland (metric)
|
|
70
|
-
- `fr_FR` / `fr` / `france` - ๐ซ๐ท France (metric)
|
|
71
|
-
- `it_IT` / `it` / `italy` / `italia` - ๐ฎ๐น Italy (metric)
|
|
72
|
-
- `es_ES` / `es` / `spain` / `espaรฑa` - ๐ช๐ธ Spain (metric)
|
|
73
|
-
- `pt_PT` / `portugal` - ๐ต๐น Portugal (metric)
|
|
74
|
-
- `nl_NL` / `nl` / `netherlands` / `holland` - ๐ณ๐ฑ Netherlands (metric)
|
|
75
|
-
- `nl_BE` / `be` / `belgium` - ๐ง๐ช Belgium (metric)
|
|
76
|
-
- `ru_RU` / `ru` / `russia` - ๐ท๐บ Russia (metric)
|
|
77
|
-
- `pl_PL` / `pl` / `poland` / `polska` - ๐ต๐ฑ Poland (metric)
|
|
78
|
-
- `tr_TR` / `tr` / `turkey` / `turkiye` - ๐น๐ท Turkey (metric)
|
|
79
|
-
- `sv_SE` / `sv` / `se` / `sweden` / `sverige` - ๐ธ๐ช Sweden (metric)
|
|
80
|
-
- `nb_NO` / `no` / `norway` / `norge` - ๐ณ๐ด Norway (metric)
|
|
81
|
-
- `da_DK` / `da` / `dk` / `denmark` / `danmark` - ๐ฉ๐ฐ Denmark (metric)
|
|
82
|
-
- `fi_FI` / `fi` / `finland` / `suomi` - ๐ซ๐ฎ Finland (metric)
|
|
83
|
-
- `el_GR` / `el` / `gr` / `greece` - ๐ฌ๐ท Greece (metric)
|
|
84
|
-
- `cs_CZ` / `cs` / `cz` / `czech` - ๐จ๐ฟ Czech Republic (metric)
|
|
85
|
-
- `hu_HU` / `hu` / `hungary` - ๐ญ๐บ Hungary (metric)
|
|
86
|
-
- `ro_RO` / `ro` / `romania` - ๐ท๐ด Romania (metric)
|
|
87
|
-
|
|
88
|
-
### Asia-Pacific ๐ (13)
|
|
89
|
-
- `zh_CN` / `zh` / `cn` / `china` - ๐จ๐ณ China (metric)
|
|
90
|
-
- `ja_JP` / `ja` / `jp` / `japan` - ๐ฏ๐ต Japan (metric)
|
|
91
|
-
- `ko_KR` / `ko` / `kr` / `korea` - ๐ฐ๐ท South Korea (metric)
|
|
92
|
-
- `en_IN` / `in` / `india` - ๐ฎ๐ณ India (metric)
|
|
93
|
-
- `id_ID` / `id` / `indonesia` - ๐ฎ๐ฉ Indonesia (metric)
|
|
94
|
-
- `th_TH` / `th` / `thailand` - ๐น๐ญ Thailand (metric)
|
|
95
|
-
- `vi_VN` / `vi` / `vn` / `vietnam` - ๐ป๐ณ Vietnam (metric)
|
|
96
|
-
- `ms_MY` / `ms` / `my` / `malaysia` - ๐ฒ๐พ Malaysia (metric)
|
|
97
|
-
- `en_SG` / `sg` / `singapore` - ๐ธ๐ฌ Singapore (metric)
|
|
98
|
-
- `en_PH` / `ph` / `philippines` - ๐ต๐ญ Philippines (metric)
|
|
99
|
-
- `en_AU` / `au` / `aus` / `australia` - ๐ฆ๐บ Australia (metric)
|
|
100
|
-
- `en_NZ` / `nz` / `new-zealand` - ๐ณ๐ฟ New Zealand (metric)
|
|
101
|
-
- `he_IL` / `he` / `il` / `israel` - ๐ฎ๐ฑ Israel (metric)
|
|
102
|
-
|
|
103
|
-
### Middle East & Africa ๐ (
|
|
104
|
-
- `ar_AE` / `ae` / `uae` / `emirates` - ๐ฆ๐ช UAE (metric)
|
|
105
|
-
- `ar_SA` / `sa` / `saudi` / `saudi-arabia` - ๐ธ๐ฆ Saudi Arabia (metric)
|
|
106
|
-
- `ar_EG` / `eg` / `egypt` - ๐ช๐ฌ Egypt (metric)
|
|
107
|
-
- `en_ZA` / `za` / `south-africa` - ๐ฟ๐ฆ South Africa (metric)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
//
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
//
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
//
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
//
|
|
174
|
-
|
|
175
|
-
//
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
//
|
|
187
|
-
mimic.
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
|
|
191
|
-
//
|
|
192
|
-
|
|
193
|
-
//
|
|
194
|
-
//
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
mimic.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
//
|
|
208
|
-
//
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
//
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
//
|
|
240
|
-
|
|
241
|
-
//
|
|
242
|
-
//
|
|
243
|
-
|
|
244
|
-
//
|
|
245
|
-
|
|
246
|
-
//
|
|
247
|
-
//
|
|
248
|
-
|
|
249
|
-
//
|
|
250
|
-
|
|
251
|
-
//
|
|
252
|
-
//
|
|
253
|
-
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
//
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
//
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
1
|
+
# mimic-data
|
|
2
|
+
|
|
3
|
+
Library TypeScript ringan tanpa dependency eksternal untuk menghasilkan data dummy yang realistis dengan dukungan lokalisasi yang kuat.
|
|
4
|
+
|
|
5
|
+
## โจ Fitur
|
|
6
|
+
|
|
7
|
+
- ๐ **44 Locale** - Coverage global yang sangat luas
|
|
8
|
+
- ๐ชถ **Ringan** - Zero runtime dependencies
|
|
9
|
+
- ๐ฆ **Tree-shakeable** - Hanya bundle yang Anda gunakan
|
|
10
|
+
- ๐ง **TypeScript Native** - Full type safety
|
|
11
|
+
- ๐ฏ **Mudah Digunakan** - API yang sederhana dan intuitif
|
|
12
|
+
|
|
13
|
+
## ๐ฆ Instalasi
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install mimic-data
|
|
17
|
+
# atau
|
|
18
|
+
yarn add mimic-data
|
|
19
|
+
# atau
|
|
20
|
+
pnpm add mimic-data
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ๐ Penggunaan Dasar
|
|
24
|
+
|
|
25
|
+
### Metode 1: Factory Function (Rekomendasi)
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { createMimic } from 'mimic-data';
|
|
29
|
+
|
|
30
|
+
// Buat instance dengan locale tertentu
|
|
31
|
+
const mimic = createMimic('id_ID');
|
|
32
|
+
|
|
33
|
+
// Generate data
|
|
34
|
+
console.log(mimic.identity.fullName());
|
|
35
|
+
// Output: "Budi Santoso"
|
|
36
|
+
|
|
37
|
+
console.log(mimic.location.fullAddress());
|
|
38
|
+
// Output: "Jl. Merdeka No. 123, RT 5/RW 3, Jakarta, DKI Jakarta 12345"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Metode 2: Class Langsung
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { Mimic, locales } from 'mimic-data';
|
|
45
|
+
|
|
46
|
+
const mimic = new Mimic(locales.ja_JP);
|
|
47
|
+
|
|
48
|
+
console.log(mimic.identity.fullName());
|
|
49
|
+
// Output: "Tanaka Kenji"
|
|
50
|
+
|
|
51
|
+
console.log(mimic.location.fullAddress());
|
|
52
|
+
// Output: "ใ123-4567 Tokyo, Yokohama, Chuo-dori 2-5-10"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## ๐ Locale yang Tersedia (44 Negara!)
|
|
56
|
+
|
|
57
|
+
### Americas ๐ (6)
|
|
58
|
+
- `en_US` / `en` / `us` / `usa` - ๐บ๐ธ USA (imperial)
|
|
59
|
+
- `en_CA` / `ca` / `canada` - ๐จ๐ฆ Canada (metric)
|
|
60
|
+
- `es_MX` / `mx` / `mexico` - ๐ฒ๐ฝ Mexico (metric)
|
|
61
|
+
- `pt_BR` / `pt` / `br` / `brazil` - ๐ง๐ท Brazil (metric)
|
|
62
|
+
- `es_AR` / `ar` / `argentina` - ๐ฆ๐ท Argentina (metric)
|
|
63
|
+
- `es_CL` / `cl` / `chile` - ๐จ๐ฑ Chile (metric)
|
|
64
|
+
|
|
65
|
+
### Europe ๐ (19)
|
|
66
|
+
- `en_GB` / `gb` / `uk` / `britain` - ๐ฌ๐ง UK (metric)
|
|
67
|
+
- `de_DE` / `de` / `germany` / `deutsch` - ๐ฉ๐ช Germany (metric)
|
|
68
|
+
- `de_AT` / `at` / `austria` - ๐ฆ๐น Austria (metric)
|
|
69
|
+
- `de_CH` / `ch` / `switzerland` - ๐จ๐ญ Switzerland (metric)
|
|
70
|
+
- `fr_FR` / `fr` / `france` - ๐ซ๐ท France (metric)
|
|
71
|
+
- `it_IT` / `it` / `italy` / `italia` - ๐ฎ๐น Italy (metric)
|
|
72
|
+
- `es_ES` / `es` / `spain` / `espaรฑa` - ๐ช๐ธ Spain (metric)
|
|
73
|
+
- `pt_PT` / `portugal` - ๐ต๐น Portugal (metric)
|
|
74
|
+
- `nl_NL` / `nl` / `netherlands` / `holland` - ๐ณ๐ฑ Netherlands (metric)
|
|
75
|
+
- `nl_BE` / `be` / `belgium` - ๐ง๐ช Belgium (metric)
|
|
76
|
+
- `ru_RU` / `ru` / `russia` - ๐ท๐บ Russia (metric)
|
|
77
|
+
- `pl_PL` / `pl` / `poland` / `polska` - ๐ต๐ฑ Poland (metric)
|
|
78
|
+
- `tr_TR` / `tr` / `turkey` / `turkiye` - ๐น๐ท Turkey (metric)
|
|
79
|
+
- `sv_SE` / `sv` / `se` / `sweden` / `sverige` - ๐ธ๐ช Sweden (metric)
|
|
80
|
+
- `nb_NO` / `no` / `norway` / `norge` - ๐ณ๐ด Norway (metric)
|
|
81
|
+
- `da_DK` / `da` / `dk` / `denmark` / `danmark` - ๐ฉ๐ฐ Denmark (metric)
|
|
82
|
+
- `fi_FI` / `fi` / `finland` / `suomi` - ๐ซ๐ฎ Finland (metric)
|
|
83
|
+
- `el_GR` / `el` / `gr` / `greece` - ๐ฌ๐ท Greece (metric)
|
|
84
|
+
- `cs_CZ` / `cs` / `cz` / `czech` - ๐จ๐ฟ Czech Republic (metric)
|
|
85
|
+
- `hu_HU` / `hu` / `hungary` - ๐ญ๐บ Hungary (metric)
|
|
86
|
+
- `ro_RO` / `ro` / `romania` - ๐ท๐ด Romania (metric)
|
|
87
|
+
|
|
88
|
+
### Asia-Pacific ๐ (13)
|
|
89
|
+
- `zh_CN` / `zh` / `cn` / `china` - ๐จ๐ณ China (metric)
|
|
90
|
+
- `ja_JP` / `ja` / `jp` / `japan` - ๐ฏ๐ต Japan (metric)
|
|
91
|
+
- `ko_KR` / `ko` / `kr` / `korea` - ๐ฐ๐ท South Korea (metric)
|
|
92
|
+
- `en_IN` / `in` / `india` - ๐ฎ๐ณ India (metric)
|
|
93
|
+
- `id_ID` / `id` / `indonesia` - ๐ฎ๐ฉ Indonesia (metric)
|
|
94
|
+
- `th_TH` / `th` / `thailand` - ๐น๐ญ Thailand (metric)
|
|
95
|
+
- `vi_VN` / `vi` / `vn` / `vietnam` - ๐ป๐ณ Vietnam (metric)
|
|
96
|
+
- `ms_MY` / `ms` / `my` / `malaysia` - ๐ฒ๐พ Malaysia (metric)
|
|
97
|
+
- `en_SG` / `sg` / `singapore` - ๐ธ๐ฌ Singapore (metric)
|
|
98
|
+
- `en_PH` / `ph` / `philippines` - ๐ต๐ญ Philippines (metric)
|
|
99
|
+
- `en_AU` / `au` / `aus` / `australia` - ๐ฆ๐บ Australia (metric)
|
|
100
|
+
- `en_NZ` / `nz` / `new-zealand` - ๐ณ๐ฟ New Zealand (metric)
|
|
101
|
+
- `he_IL` / `he` / `il` / `israel` - ๐ฎ๐ฑ Israel (metric)
|
|
102
|
+
|
|
103
|
+
### Middle East & Africa ๐ (10)
|
|
104
|
+
- `ar_AE` / `ae` / `uae` / `emirates` - ๐ฆ๐ช UAE (metric)
|
|
105
|
+
- `ar_SA` / `sa` / `saudi` / `saudi-arabia` - ๐ธ๐ฆ Saudi Arabia (metric)
|
|
106
|
+
- `ar_EG` / `eg` / `egypt` - ๐ช๐ฌ Egypt (metric)
|
|
107
|
+
- `en_ZA` / `za` / `south-africa` - ๐ฟ๐ฆ South Africa (metric)
|
|
108
|
+
- `ng_NG` / `ng` / `nigeria` - ๐ณ๐ฌ Nigeria (metric)
|
|
109
|
+
- `ke_KE` / `ke` / `kenya` - ๐ฐ๐ช Kenya (metric)
|
|
110
|
+
- `pk_PK` / `pk` / `pakistan` - ๐ต๐ฐ Pakistan (metric)
|
|
111
|
+
- `bd_BD` / `bd` / `bangladesh` - ๐ง๐ฉ Bangladesh (metric)
|
|
112
|
+
- `ir_IR` / `ir` / `iran` - ๐ฎ๐ท Iran (metric)
|
|
113
|
+
- `ma_MA` / `ma` / `morocco` - ๐ฒ๐ฆ Morocco (metric)
|
|
114
|
+
|
|
115
|
+
### Eastern Europe ๐ (9)
|
|
116
|
+
- `uk_UA` / `ua` / `ukraine` - ๐บ๐ฆ Ukraine (metric)
|
|
117
|
+
- `sk_SK` / `sk` / `slovakia` - ๐ธ๐ฐ Slovakia (metric)
|
|
118
|
+
- `hr_HR` / `hr` / `croatia` - ๐ญ๐ท Croatia (metric)
|
|
119
|
+
- `rs_RS` / `rs` / `serbia` - ๐ท๐ธ Serbia (metric)
|
|
120
|
+
- `lt_LT` / `lt` / `lithuania` - ๐ฑ๐น Lithuania (metric)
|
|
121
|
+
- `lv_LV` / `lv` / `latvia` - ๐ฑ๐ป Latvia (metric)
|
|
122
|
+
- `et_EE` / `ee` / `estonia` - ๐ช๐ช Estonia (metric)
|
|
123
|
+
- `bg_BG` / `bg` / `bulgaria` - ๐ง๐ฌ Bulgaria (metric)
|
|
124
|
+
- `is_IS` / `is` / `iceland` - ๐ฎ๐ธ Iceland (metric)
|
|
125
|
+
|
|
126
|
+
### Americas ๐ (11)
|
|
127
|
+
- `en_US` / `en` / `us` / `usa` - ๐บ๐ธ USA (imperial)
|
|
128
|
+
- `en_CA` / `ca` / `canada` - ๐จ๐ฆ Canada (metric)
|
|
129
|
+
- `es_MX` / `mx` / `mexico` - ๐ฒ๐ฝ Mexico (metric)
|
|
130
|
+
- `pt_BR` / `pt` / `br` / `brazil` - ๐ง๐ท Brazil (metric)
|
|
131
|
+
- `es_AR` / `ar` / `argentina` - ๐ฆ๐ท Argentina (metric)
|
|
132
|
+
- `es_CL` / `cl` / `chile` - ๐จ๐ฑ Chile (metric)
|
|
133
|
+
- `co_CO` / `co` / `colombia` - ๐จ๐ด Colombia (metric)
|
|
134
|
+
- `pe_PE` / `pe` / `peru` - ๐ต๐ช Peru (metric)
|
|
135
|
+
- `ve_VE` / `ve` / `venezuela` - ๐ป๐ช Venezuela (metric)
|
|
136
|
+
- `gt_GT` / `gt` / `guatemala` - ๐ฌ๐น Guatemala (metric)
|
|
137
|
+
- `cr_CR` / `cr` / `costa-rica` - ๐จ๐ท Costa Rica (metric)
|
|
138
|
+
|
|
139
|
+
### Asia-Pacific ๐ (14)
|
|
140
|
+
- `zh_CN` / `zh` / `cn` / `china` - ๐จ๐ณ China (metric)
|
|
141
|
+
- `ja_JP` / `ja` / `jp` / `japan` - ๐ฏ๐ต Japan (metric)
|
|
142
|
+
- `ko_KR` / `ko` / `kr` / `korea` - ๐ฐ๐ท South Korea (metric)
|
|
143
|
+
- `en_IN` / `in` / `india` - ๐ฎ๐ณ India (metric)
|
|
144
|
+
- `id_ID` / `id` / `indonesia` - ๐ฎ๐ฉ Indonesia (metric)
|
|
145
|
+
- `th_TH` / `th` / `thailand` - ๐น๐ญ Thailand (metric)
|
|
146
|
+
- `vi_VN` / `vi` / `vn` / `vietnam` - ๐ป๐ณ Vietnam (metric)
|
|
147
|
+
- `ms_MY` / `ms` / `my` / `malaysia` - ๐ฒ๐พ Malaysia (metric)
|
|
148
|
+
- `en_SG` / `sg` / `singapore` - ๐ธ๐ฌ Singapore (metric)
|
|
149
|
+
- `en_PH` / `ph` / `philippines` - ๐ต๐ญ Philippines (metric)
|
|
150
|
+
- `en_AU` / `au` / `aus` / `australia` - ๐ฆ๐บ Australia (metric)
|
|
151
|
+
- `en_NZ` / `nz` / `new-zealand` - ๐ณ๐ฟ New Zealand (metric)
|
|
152
|
+
- `he_IL` / `he` / `il` / `israel` - ๐ฎ๐ฑ Israel (metric)
|
|
153
|
+
- `tw_TW` / `tw` / `taiwan` - ๐น๐ผ Taiwan (metric)
|
|
154
|
+
|
|
155
|
+
**Total: 65 Locales dengan 180+ Aliases!**
|
|
156
|
+
|
|
157
|
+
## ๐ API Reference
|
|
158
|
+
|
|
159
|
+
### Identity (Identitas)
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
// Nama depan berdasarkan gender
|
|
163
|
+
mimic.identity.firstName('male'); // "Takashi"
|
|
164
|
+
mimic.identity.firstName('female'); // "Yuki"
|
|
165
|
+
mimic.identity.firstName(); // Random gender
|
|
166
|
+
|
|
167
|
+
// Nama belakang
|
|
168
|
+
mimic.identity.lastName(); // "Tanaka"
|
|
169
|
+
|
|
170
|
+
// Nama lengkap (format sesuai budaya)
|
|
171
|
+
mimic.identity.fullName('male'); // Japan: "Tanaka Takashi"
|
|
172
|
+
// US: "John Smith"
|
|
173
|
+
// ID: "Budi Santoso"
|
|
174
|
+
|
|
175
|
+
// Gender
|
|
176
|
+
mimic.identity.gender(); // "male" | "female"
|
|
177
|
+
|
|
178
|
+
// Umur dengan range
|
|
179
|
+
mimic.identity.age(); // 18-65 (default)
|
|
180
|
+
mimic.identity.age({ min: 25, max: 40 }); // Custom range
|
|
181
|
+
|
|
182
|
+
// Tanggal lahir
|
|
183
|
+
mimic.identity.dateOfBirth();
|
|
184
|
+
mimic.identity.dateOfBirth({ min: 30, max: 50 });
|
|
185
|
+
|
|
186
|
+
// Generate semua data person sekaligus
|
|
187
|
+
const person = mimic.identity.person('female', { min: 25, max: 35 });
|
|
188
|
+
// {
|
|
189
|
+
// firstName: "Yuki",
|
|
190
|
+
// lastName: "Tanaka",
|
|
191
|
+
// fullName: "Tanaka Yuki",
|
|
192
|
+
// gender: "female",
|
|
193
|
+
// age: 28,
|
|
194
|
+
// dateOfBirth: Date
|
|
195
|
+
// }
|
|
196
|
+
|
|
197
|
+
// ๐ NEW: Generate multiple persons at once
|
|
198
|
+
const persons = mimic.identity.persons(10); // Array of 10 persons
|
|
199
|
+
|
|
200
|
+
// ๐ NEW: Generate unique persons (no duplicate full names)
|
|
201
|
+
const uniquePersons = mimic.identity.uniquePersons(5);
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Location (Lokasi)
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
// Komponen alamat individual
|
|
208
|
+
mimic.location.street(); // "Chuo-dori"
|
|
209
|
+
mimic.location.city(); // "Tokyo"
|
|
210
|
+
mimic.location.state(); // "Kanagawa"
|
|
211
|
+
mimic.location.zipCode(); // "123-4567" (Japan format)
|
|
212
|
+
|
|
213
|
+
// Alamat lengkap (format sesuai negara)
|
|
214
|
+
mimic.location.fullAddress();
|
|
215
|
+
// Japan: "ใ123-4567 Tokyo, Yokohama, Chuo-dori 2-5-10"
|
|
216
|
+
// US: "1234 Main Street, New York, California 12345"
|
|
217
|
+
// ID: "Jl. Merdeka No. 123, RT 5/RW 3, Jakarta, DKI Jakarta 12345"
|
|
218
|
+
|
|
219
|
+
// Generate semua data address sekaligus
|
|
220
|
+
const address = mimic.location.address();
|
|
221
|
+
// {
|
|
222
|
+
// street: "Chuo-dori",
|
|
223
|
+
// city: "Tokyo",
|
|
224
|
+
// state: "Kanagawa",
|
|
225
|
+
// zipCode: "123-4567",
|
|
226
|
+
// fullAddress: "ใ123-4567 Tokyo, Yokohama, Chuo-dori 2-5-10"
|
|
227
|
+
// }
|
|
228
|
+
|
|
229
|
+
// ๐ NEW: Generate multiple addresses at once
|
|
230
|
+
const addresses = mimic.location.addresses(10); // Array of 10 addresses
|
|
231
|
+
|
|
232
|
+
// ๐ NEW: Generate unique addresses (no duplicate full addresses)
|
|
233
|
+
const uniqueAddresses = mimic.location.uniqueAddresses(5);
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Physical (Data Fisik)
|
|
237
|
+
|
|
238
|
+
```typescript
|
|
239
|
+
// Tinggi (unit sesuai locale)
|
|
240
|
+
mimic.physical.height();
|
|
241
|
+
// Metric: { height: 175, weight: 0, heightUnit: 'cm', weightUnit: 'kg' }
|
|
242
|
+
// Imperial: { height: 5.9, weight: 0, heightUnit: 'ft', weightUnit: 'lb' }
|
|
243
|
+
|
|
244
|
+
// Berat (unit sesuai locale)
|
|
245
|
+
mimic.physical.weight();
|
|
246
|
+
// Metric: { height: 0, weight: 70, heightUnit: 'cm', weightUnit: 'kg' }
|
|
247
|
+
// Imperial: { height: 0, weight: 154, heightUnit: 'ft', weightUnit: 'lb' }
|
|
248
|
+
|
|
249
|
+
// Generate semua data physical sekaligus
|
|
250
|
+
const physical = mimic.physical.data();
|
|
251
|
+
// Metric: { height: 175, weight: 70, heightUnit: 'cm', weightUnit: 'kg' }
|
|
252
|
+
// Imperial: { height: 5.9, weight: 154, heightUnit: 'ft', weightUnit: 'lb' }
|
|
253
|
+
|
|
254
|
+
// ๐ NEW: Generate multiple physical data at once
|
|
255
|
+
const physicals = mimic.physical.datas(10); // Array of 10 physical data
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Work (Data Pekerjaan)
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
mimic.work.jobTitle(); // "Software Engineer"
|
|
262
|
+
mimic.work.department(); // "Engineering"
|
|
263
|
+
|
|
264
|
+
// Generate semua data work sekaligus
|
|
265
|
+
const work = mimic.work.data();
|
|
266
|
+
// {
|
|
267
|
+
// jobTitle: "Software Engineer",
|
|
268
|
+
// department: "Engineering"
|
|
269
|
+
// }
|
|
270
|
+
|
|
271
|
+
// ๐ NEW: Generate multiple work data at once
|
|
272
|
+
const works = mimic.work.datas(10); // Array of 10 work data
|
|
273
|
+
|
|
274
|
+
// ๐ NEW: Generate unique job titles
|
|
275
|
+
const uniqueJobTitles = mimic.work.uniqueJobTitles(5);
|
|
276
|
+
|
|
277
|
+
// ๐ NEW: Generate unique departments
|
|
278
|
+
const uniqueDepartments = mimic.work.uniqueDepartments(3);
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Contact (Kontak) - NEW! ๐ง
|
|
282
|
+
|
|
283
|
+
```typescript
|
|
284
|
+
// Generate email
|
|
285
|
+
mimic.contact.email('John', 'Doe'); // "john.doe123@gmail.com"
|
|
286
|
+
mimic.contact.email('Jane'); // "jane456@yahoo.com"
|
|
287
|
+
mimic.contact.email(); // "random789@outlook.com"
|
|
288
|
+
|
|
289
|
+
// Generate phone number (locale-specific format)
|
|
290
|
+
mimic.contact.phone(); // US: "+1 (555) 123-4567"
|
|
291
|
+
// ID: "+62 812-3456-7890"
|
|
292
|
+
|
|
293
|
+
// Generate website
|
|
294
|
+
mimic.contact.website(); // "www.acme-corp.com"
|
|
295
|
+
mimic.contact.website('Google');// "www.google.com"
|
|
296
|
+
|
|
297
|
+
// Generate complete contact data
|
|
298
|
+
const contact = mimic.contact.data('John', 'Doe');
|
|
299
|
+
// {
|
|
300
|
+
// email: "john.doe123@gmail.com",
|
|
301
|
+
// phone: "+1 (555) 123-4567",
|
|
302
|
+
// website: "www.john-doe.com"
|
|
303
|
+
// }
|
|
304
|
+
|
|
305
|
+
// ๐ Generate multiple contact data
|
|
306
|
+
const contacts = mimic.contact.datas(10);
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Company (Perusahaan) - NEW! ๐ข
|
|
310
|
+
|
|
311
|
+
```typescript
|
|
312
|
+
// Generate company name
|
|
313
|
+
mimic.company.name(); // "Techflow Solutions"
|
|
314
|
+
// "PT Telkom Indonesia" (id_ID)
|
|
315
|
+
|
|
316
|
+
// Generate industry
|
|
317
|
+
mimic.company.industry(); // "Technology"
|
|
318
|
+
// "Teknologi" (id_ID)
|
|
319
|
+
|
|
320
|
+
// Generate catch phrase
|
|
321
|
+
mimic.company.catchPhrase(); // "Empower innovative solutions"
|
|
322
|
+
|
|
323
|
+
// Generate complete company data
|
|
324
|
+
const company = mimic.company.data();
|
|
325
|
+
// {
|
|
326
|
+
// name: "Quantumspark Labs",
|
|
327
|
+
// industry: "Technology",
|
|
328
|
+
// catchPhrase: "Transform cutting-edge experiences"
|
|
329
|
+
// }
|
|
330
|
+
|
|
331
|
+
// ๐ Generate multiple company data
|
|
332
|
+
const companies = mimic.company.datas(10);
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Mengganti Locale
|
|
336
|
+
|
|
337
|
+
```typescript
|
|
338
|
+
const mimic = createMimic('en_US');
|
|
339
|
+
console.log(mimic.identity.fullName()); // "John Smith"
|
|
340
|
+
|
|
341
|
+
mimic.setLocale(locales.ja_JP);
|
|
342
|
+
console.log(mimic.identity.fullName()); // "Tanaka Kenji"
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
## ๐ Fitur Baru (v1.1.0)
|
|
346
|
+
|
|
347
|
+
### ๐ Seeded Random (Reproducible Data)
|
|
348
|
+
|
|
349
|
+
Generate data yang sama secara konsisten untuk testing:
|
|
350
|
+
|
|
351
|
+
```typescript
|
|
352
|
+
import { createMimic, Random } from 'mimic-data';
|
|
353
|
+
|
|
354
|
+
// Set seed untuk reproducible randomness
|
|
355
|
+
Random.seed(12345);
|
|
356
|
+
|
|
357
|
+
const mimic = createMimic('en_US');
|
|
358
|
+
const person1 = mimic.identity.person('male', { min: 25, max: 35 });
|
|
359
|
+
|
|
360
|
+
// Reset seed yang sama
|
|
361
|
+
Random.seed(12345);
|
|
362
|
+
const person2 = mimic.identity.person('male', { min: 25, max: 35 });
|
|
363
|
+
|
|
364
|
+
// person1 dan person2 akan IDENTIK!
|
|
365
|
+
console.log(person1.fullName === person2.fullName); // true
|
|
366
|
+
console.log(person1.age === person2.age); // true
|
|
367
|
+
|
|
368
|
+
// Reset ke random non-deterministik
|
|
369
|
+
Random.unseed();
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### ๐ฆ Bulk Generation
|
|
373
|
+
|
|
374
|
+
Generate banyak data sekaligus dengan performa optimal:
|
|
375
|
+
|
|
376
|
+
```typescript
|
|
377
|
+
import { createMimic } from 'mimic-data';
|
|
378
|
+
|
|
379
|
+
const mimic = createMimic('id_ID');
|
|
380
|
+
|
|
381
|
+
// Generate 100 persons sekaligus
|
|
382
|
+
const persons = mimic.identity.persons(100);
|
|
383
|
+
|
|
384
|
+
// Generate 50 unique addresses (no duplicates)
|
|
385
|
+
const addresses = mimic.location.uniqueAddresses(50);
|
|
386
|
+
|
|
387
|
+
// Generate 200 complete mock entities
|
|
388
|
+
const entities = mimic.generateMockEntities(200, {
|
|
389
|
+
gender: 'female',
|
|
390
|
+
ageRange: { min: 20, max: 40 }
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
// Generate unique mock entities
|
|
394
|
+
const uniqueEntities = mimic.generateUniqueMockEntities(100);
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### ๐ฏ Random Utilities
|
|
398
|
+
|
|
399
|
+
```typescript
|
|
400
|
+
import { Random } from 'mimic-data';
|
|
401
|
+
|
|
402
|
+
// Generate multiple values
|
|
403
|
+
const numbers = Random.multiple(() => Random.int(1, 100), 10);
|
|
404
|
+
|
|
405
|
+
// Generate unique values (no duplicates)
|
|
406
|
+
const uniqueNumbers = Random.unique(() => Random.int(1, 1000), 20);
|
|
407
|
+
|
|
408
|
+
// Shuffle array
|
|
409
|
+
const shuffled = Random.shuffle([1, 2, 3, 4, 5]);
|
|
410
|
+
|
|
411
|
+
// Pick random element
|
|
412
|
+
const randomItem = Random.pick(['apple', 'banana', 'cherry']);
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### โก Performance Improvements
|
|
416
|
+
|
|
417
|
+
- **Caching**: Generator methods di-cache untuk performa lebih cepat
|
|
418
|
+
- **Bulk Operations**: Generate banyak data dalam satu panggilan
|
|
419
|
+
- **Optimized Getters**: Tidak ada recreation pada setiap akses
|
|
420
|
+
|
|
421
|
+
```typescript
|
|
422
|
+
// Getter methods sekarang di-cache (lebih cepat)
|
|
423
|
+
const identity1 = mimic.identity;
|
|
424
|
+
const identity2 = mimic.identity;
|
|
425
|
+
console.log(identity1 === identity2); // true (same cached instance)
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
## ๐ฏ Contoh Lengkap
|
|
429
|
+
|
|
430
|
+
```typescript
|
|
431
|
+
import { createMimic } from 'mimic-data';
|
|
432
|
+
|
|
433
|
+
// Generate data karyawan Indonesia
|
|
434
|
+
const mimic = createMimic('id_ID');
|
|
435
|
+
|
|
436
|
+
const employee = {
|
|
437
|
+
...mimic.identity.person('male', { min: 25, max: 40 }),
|
|
438
|
+
...mimic.location.address(),
|
|
439
|
+
...mimic.physical.data(),
|
|
440
|
+
...mimic.work.data()
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
console.log(employee);
|
|
444
|
+
// {
|
|
445
|
+
// firstName: "Budi",
|
|
446
|
+
// lastName: "Santoso",
|
|
447
|
+
// fullName: "Budi Santoso",
|
|
448
|
+
// gender: "male",
|
|
449
|
+
// age: 32,
|
|
450
|
+
// dateOfBirth: 1992-05-15T00:00:00.000Z,
|
|
451
|
+
// street: "Jl. Merdeka",
|
|
452
|
+
// city: "Jakarta",
|
|
453
|
+
// state: "DKI Jakarta",
|
|
454
|
+
// zipCode: "12345",
|
|
455
|
+
// fullAddress: "Jl. Merdeka No. 123, RT 5/RW 3, Jakarta, DKI Jakarta 12345",
|
|
456
|
+
// height: 175,
|
|
457
|
+
// weight: 70,
|
|
458
|
+
// heightUnit: "cm",
|
|
459
|
+
// weightUnit: "kg",
|
|
460
|
+
// jobTitle: "Software Engineer",
|
|
461
|
+
// department: "Engineering"
|
|
462
|
+
// }
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
## ๐ ๏ธ Development
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
# Install dependencies
|
|
469
|
+
npm install
|
|
470
|
+
|
|
471
|
+
# Build
|
|
472
|
+
npm run build
|
|
473
|
+
|
|
474
|
+
# Development mode (watch)
|
|
475
|
+
npm run dev
|
|
476
|
+
|
|
477
|
+
# Run tests
|
|
478
|
+
npm test
|
|
479
|
+
|
|
480
|
+
# Type check
|
|
481
|
+
npm run type-check
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
## ๐ Lisensi
|
|
485
|
+
|
|
486
|
+
MIT
|
|
487
|
+
|
|
488
|
+
## ๐ค Kontribusi
|
|
489
|
+
|
|
490
|
+
Kontribusi sangat diterima! Silakan buka issue atau pull request.
|
|
491
|
+
|
|
492
|
+
### Menambahkan Locale Baru (Sangat Mudah!)
|
|
493
|
+
|
|
494
|
+
Dengan **Registry System**, menambah locale baru sangat mudah:
|
|
495
|
+
|
|
496
|
+
1. **Buat file locale** di `src/locales/xx_XX.ts`
|
|
497
|
+
2. **Implement interface** `LocaleDefinition`
|
|
498
|
+
3. **Import dan register** di `src/index.ts`
|
|
499
|
+
|
|
500
|
+
**Contoh: Menambahkan locale Spanyol**
|
|
501
|
+
|
|
502
|
+
```typescript
|
|
503
|
+
// 1. Buat file: src/locales/es_ES.ts
|
|
504
|
+
import { LocaleDefinition } from '../types';
|
|
505
|
+
import { Random } from '../core/random';
|
|
506
|
+
|
|
507
|
+
export const es_ES: LocaleDefinition = {
|
|
508
|
+
firstNamesMale: ['Carlos', 'Josรฉ', 'Antonio', ...],
|
|
509
|
+
firstNamesFemale: ['Marรญa', 'Carmen', 'Ana', ...],
|
|
510
|
+
lastNames: ['Garcรญa', 'Fernรกndez', 'Lรณpez', ...],
|
|
511
|
+
streets: ['Calle Mayor', 'Avenida Castellana', ...],
|
|
512
|
+
cities: ['Madrid', 'Barcelona', 'Valencia', ...],
|
|
513
|
+
states: ['Madrid', 'Cataluรฑa', 'Andalucรญa', ...],
|
|
514
|
+
zipCodePattern: '#####',
|
|
515
|
+
jobTitles: ['Ingeniero de Software', ...],
|
|
516
|
+
departments: ['Ingenierรญa', 'Marketing', ...],
|
|
517
|
+
metricSystem: 'metric',
|
|
518
|
+
|
|
519
|
+
formatFullName(firstName, lastName) {
|
|
520
|
+
return `${firstName} ${lastName}`;
|
|
521
|
+
},
|
|
522
|
+
|
|
523
|
+
formatAddress(street, city, state, zipCode) {
|
|
524
|
+
return `${street} ${Random.int(1, 200)}, ${zipCode} ${city}`;
|
|
525
|
+
},
|
|
526
|
+
|
|
527
|
+
generateZipCode() {
|
|
528
|
+
return String(Random.int(10000, 99999));
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
// 2. Register di src/index.ts
|
|
533
|
+
import { es_ES } from './locales/es_ES';
|
|
534
|
+
localeRegistry.register('es_ES', es_ES, ['es', 'spain', 'espaรฑa']);
|
|
535
|
+
|
|
536
|
+
// 3. Export (opsional, untuk advanced usage)
|
|
537
|
+
export const locales = {
|
|
538
|
+
// ... existing locales
|
|
539
|
+
es_ES
|
|
540
|
+
};
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
**Selesai!** Locale baru Anda langsung tersedia:
|
|
544
|
+
|
|
545
|
+
```typescript
|
|
546
|
+
const mimic = createMimic('es'); // atau 'es_ES' atau 'spain'
|
|
547
|
+
console.log(mimic.identity.fullName()); // "Carlos Garcรญa"
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
## ๐ Acknowledgments
|
|
551
|
+
|
|
552
|
+
Terinspirasi oleh library seperti Faker.js, namun dengan fokus pada:
|
|
553
|
+
- Zero runtime dependencies
|
|
554
|
+
- Lokalisasi yang lebih akurat
|
|
555
|
+
- Bundle size yang lebih kecil
|
|
349
556
|
- TypeScript-first approach
|