mimic-data 1.3.1 β 1.3.2
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 +53 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,60 +52,60 @@ const mimicDefault = createMimic(); // uses en_US
|
|
|
52
52
|
|
|
53
53
|
### Module Exports
|
|
54
54
|
|
|
55
|
-
| Export
|
|
56
|
-
|
|
|
57
|
-
| `createMimic`
|
|
58
|
-
| `Mimic`
|
|
59
|
-
| `locales`
|
|
60
|
-
| `Random`
|
|
61
|
-
| `localeRegistry`
|
|
62
|
-
| `getAvailableLocales()` | Returns canonical locale codes
|
|
63
|
-
| `getAllLocaleCodes()`
|
|
55
|
+
| Export | Description |
|
|
56
|
+
| ------------------------- | ---------------------------------- |
|
|
57
|
+
| `createMimic` | Factory function to create Mimic |
|
|
58
|
+
| `Mimic` | Main data generation class |
|
|
59
|
+
| `locales` | Object with all locale definitions |
|
|
60
|
+
| `Random` | Random number utility class |
|
|
61
|
+
| `localeRegistry` | Locale registry for advanced usage |
|
|
62
|
+
| `getAvailableLocales()` | Returns canonical locale codes |
|
|
63
|
+
| `getAllLocaleCodes()` | Returns locale codes + aliases |
|
|
64
64
|
|
|
65
65
|
### Mimic Methods
|
|
66
66
|
|
|
67
|
-
| Module
|
|
68
|
-
|
|
|
69
|
-
| `identity` | `firstName(gender?)`
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| `location` | `street()`
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
| `physical` | `height()`
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
| `work` | `jobTitle()`
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
| `contact` | `email(firstName?, lastName?)`
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
| `company` | `name()`
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
| `Mimic` | `setLocale(locale)`
|
|
107
|
-
|
|
|
108
|
-
|
|
|
67
|
+
| Module | Method | Description |
|
|
68
|
+
| ------------ | ----------------------------------------------- | -------------------------------------- |
|
|
69
|
+
| `identity` | `firstName(gender?)` | Random first name (male/female/random) |
|
|
70
|
+
| | `lastName()` | Random last name |
|
|
71
|
+
| | `fullName(gender?)` | Full name in locale format |
|
|
72
|
+
| | `gender()` | Random gender |
|
|
73
|
+
| | `age(range?)` | Age (default 18-65) |
|
|
74
|
+
| | `dateOfBirth(range?)` | Date of birth as Date object |
|
|
75
|
+
| | `person(gender?, range?)` | Complete person data |
|
|
76
|
+
| | `persons(count, gender?, range?)` | Multiple persons |
|
|
77
|
+
| | `uniquePersons(count, gender?, range?)` | Unique persons (by full name) |
|
|
78
|
+
| `location` | `street()` | Random street name |
|
|
79
|
+
| | `city()` | Random city |
|
|
80
|
+
| | `state()` | Random state/province |
|
|
81
|
+
| | `zipCode()` | Random zip/postal code |
|
|
82
|
+
| | `fullAddress()` | Formatted full address |
|
|
83
|
+
| | `address()` | Complete address data |
|
|
84
|
+
| | `addresses(count)` | Multiple addresses |
|
|
85
|
+
| | `uniqueAddresses(count)` | Unique addresses |
|
|
86
|
+
| `physical` | `height()` | Height + weight (metric or imperial) |
|
|
87
|
+
| | `weight()` | Weight + height (metric or imperial) |
|
|
88
|
+
| | `data()` | Complete physical data |
|
|
89
|
+
| | `datas(count)` | Multiple physical data |
|
|
90
|
+
| `work` | `jobTitle()` | Random job title |
|
|
91
|
+
| | `department()` | Random department |
|
|
92
|
+
| | `data()` | Complete work data |
|
|
93
|
+
| | `datas(count)` | Multiple work data |
|
|
94
|
+
| | `uniqueJobTitles(count)` | Unique job titles |
|
|
95
|
+
| | `uniqueDepartments(count)` | Unique departments |
|
|
96
|
+
| `contact` | `email(firstName?, lastName?)` | Email address |
|
|
97
|
+
| | `phone()` | Phone number (region-appropriate) |
|
|
98
|
+
| | `website(name?)` | Website URL from company name |
|
|
99
|
+
| | `data(firstName?, lastName?)` | Complete contact data |
|
|
100
|
+
| | `datas(count)` | Multiple contact data |
|
|
101
|
+
| `company` | `name()` | Company name |
|
|
102
|
+
| | `industry()` | Industry |
|
|
103
|
+
| | `catchPhrase()` | Company tagline |
|
|
104
|
+
| | `data()` | Complete company data |
|
|
105
|
+
| | `datas(count)` | Multiple company data |
|
|
106
|
+
| `Mimic` | `setLocale(locale)` | Switch locale |
|
|
107
|
+
| | `generateMockEntities(count, options?)` | Generate complete entities |
|
|
108
|
+
| | `generateUniqueMockEntities(count, options?)` | Unique complete entities |
|
|
109
109
|
|
|
110
110
|
## Available Locales (212 Total)
|
|
111
111
|
|
|
@@ -254,6 +254,7 @@ const mimicDefault = createMimic(); // uses en_US
|
|
|
254
254
|
### Middle East & Africa π (75)
|
|
255
255
|
|
|
256
256
|
**Middle East (19):**
|
|
257
|
+
|
|
257
258
|
- `ar_SA` / `sa` / `saudi` β πΈπ¦ Saudi Arabia
|
|
258
259
|
- `ar_AE` / `ae` / `uae` β π¦πͺ UAE
|
|
259
260
|
- `ar_EG` / `eg` / `egypt` β πͺπ¬ Egypt
|
|
@@ -277,6 +278,7 @@ const mimicDefault = createMimic(); // uses en_US
|
|
|
277
278
|
- `ar_MR` / `mr` / `mauritania` β π²π· Mauritania
|
|
278
279
|
|
|
279
280
|
**Sub-Saharan Africa (67):**
|
|
281
|
+
|
|
280
282
|
- `en_ZA` / `za` / `south-africa` β πΏπ¦ South Africa (English)
|
|
281
283
|
- `af_ZA` / `af` / `afrikaans` β πΏπ¦ South Africa (Afrikaans)
|
|
282
284
|
- `en_NA` / `na` / `namibia` β π³π¦ Namibia
|
package/package.json
CHANGED