@ghostry/fabricator-extension-faker-v10 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Patrick Rebsch
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # @ghostry/fabricator-extension-faker-v10
2
+
3
+ [`@faker-js/faker`](https://fakerjs.dev) integration for [`@ghostry/fabricator`](https://www.npmjs.com/package/@ghostry/fabricator). Faker's generators draw from the same seed as every other builder in a schema, so `T.faker.person.fullName()` replays exactly like `T.string` does — no second seed to track, no drift between runs.
4
+
5
+ Targets `@faker-js/faker` 10.x specifically — hence the `-v10` suffix, matching the adapter packages' convention. A future faker major is a sibling package with its own peer range, not a version bump of this one.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @ghostry/fabricator-extension-faker-v10 @ghostry/fabricator @faker-js/faker
11
+ ```
12
+
13
+ `@ghostry/fabricator` and `@faker-js/faker` are peer dependencies — bring your own.
14
+
15
+ ## Example
16
+
17
+ `fakerExtension` returns a `registry.extend` callback, so faker's builders arrive as `T.faker.*` on an ordinary extended registry, alongside every core kind:
18
+
19
+ ```ts
20
+ import { en } from "@faker-js/faker";
21
+ import { initialize, registry } from "@ghostry/fabricator";
22
+ import { fakerExtension } from "@ghostry/fabricator-extension-faker-v10";
23
+
24
+ const { T, Fabricator } = initialize({
25
+ types: registry.extend(fakerExtension({ locale: en })),
26
+ });
27
+
28
+ const UserSchema = T.object({
29
+ name: T.faker.person.fullName(),
30
+ email: T.faker.internet.email(),
31
+ joined: T.faker.date.past(),
32
+ id: T.string.whereby({ length: { max: 8 } }),
33
+ });
34
+
35
+ new Fabricator(UserSchema).fabricate();
36
+ ```
37
+
38
+ `locale` takes faker's own locale definitions rather than a locale name, exactly as `new Faker({ locale })` does — importing the ones you use keeps the rest out of your bundle.
39
+
40
+ Faker's relative-date methods resolve against the same instance `clock` that `T.date.past`/`T.date.future` do — the two never disagree about what "now" is within one schema.
41
+
42
+ ## Every builder is a real kind, never `opaque`
43
+
44
+ A faker method could have been wrapped as an opaque producer, and that is the one thing this package refuses to do — an `opaque` schema converts to `Type.Unknown()` in any adapter and is invisible to `combinatorial`/`coverage`. Each builder instead returns the core kind matching the method's own return type:
45
+
46
+ | faker returns | builder returns | via the TypeBox adapter |
47
+ | ------------------- | ----------------------- | --------------------------------- |
48
+ | `string` (207) | `T.string` | `Type.String()` |
49
+ | `Date` (7) | `T.date` | `Type.Date()` |
50
+ | a record shape (7) | `T.object({ ... })` | `Type.Object({ ... })` |
51
+ | a literal union (6) | `T.enum.uniform([...])` | `Type.Union([Type.Literal(), …])` |
52
+ | `number` (6) | `T.number` | `Type.Number()` |
53
+ | `boolean` (1) | `T.boolean` | `Type.Boolean()` |
54
+ | `bigint` (1) | `T.bigint` | `Type.BigInt()` |
55
+ | `number[]` (1) | `T.array(T.number)` | `Type.Array(Type.Number())` |
56
+ | `Date[]` (1) | `T.array(T.date)` | `Type.Array(Type.Date())` |
57
+
58
+ Seventeen string methods whose output satisfies a JSON-Schema format regardless of the options passed additionally carry it — `internet.email()` converts to `Type.String({ format: "email" })`, `database.mongodbObjectId()` to a `pattern`.
59
+
60
+ The kind table is generated by probing a real `Faker`, and a compile-time assertion checks every entry's value type against faker's own declared return type — so a faker release that changes one fails `tsc` at that entry rather than silently emitting a wrong schema.
61
+
62
+ ## Three deviations from faker's own API
63
+
64
+ The mirror is not 1:1, and each departure is what makes the guarantee above possible.
65
+
66
+ **`helpers` is absent.** It is a utility belt, not a data module, and core already expresses all of it better: `arrayElement` is `T.enum.uniform(...)`, `arrayElements`/`multiple` are `T.array(...).whereby({ length })`, `maybe` is `T.optional`/`T.omittable`, `rangeToNumber` is `T.number.whereby({ min, max })`. Eleven of its eighteen methods are generic and would erase to `unknown`. Reach the two with no core equivalent — `fromRegExp` and `fake` — through `use`, below.
67
+
68
+ **The seven `color.*` methods whose return type depends on their arguments are split in two.** `color.rgb()` returns a `string` or a `number[]` depending on `options.format`, which no single kind can honestly describe, so each becomes a namespace of two named builders — and there is deliberately no bare `T.faker.color.rgb()`:
69
+
70
+ ```ts
71
+ T.faker.color.rgb.text(); // T.string
72
+ T.faker.color.rgb.channels(); // T.array(T.number)
73
+ T.faker.color.rgb.channels({ includeAlpha: true });
74
+ ```
75
+
76
+ The same applies to `cmyk`, `hsl`, `hwb`, `lab`, `lch`, and `colorByCSSColorSpace`. `color`'s other four methods are ordinary builders.
77
+
78
+ **A method declared as a literal union becomes an `enum`, not a `string`.** `person.sexType()` gives `T.enum.uniform(["female", "generic", "male"])`, so it converts to a union of literals and is enumerable by `combinatorial`/`coverage` rather than an unconstrained string.
79
+
80
+ ## `use` — for what the mirror doesn't cover
81
+
82
+ `use` hands you the shared, stream-backed `Faker` inside a producer, so anything reached through it still draws from the leaf's own seeded stream. It is a plain namespace of kind-tagged forms — you say what shape comes back, and keep a real kind:
83
+
84
+ ```ts
85
+ T.faker.use.string((f) => f.helpers.fromRegExp("[A-Z]{3}-[0-9]{4}"));
86
+ T.faker.use.string((f) =>
87
+ f.helpers.fake("{{person.firstName}} {{person.lastName}}"),
88
+ );
89
+ T.faker.use.number((f) => f.helpers.rangeToNumber({ min: 1, max: 10 }));
90
+ T.faker.use.opaque((f) => f.helpers.arrayElement(["free", "pro"] as const));
91
+ ```
92
+
93
+ `use.string`, `.number`, `.date`, `.boolean`, and `.bigint` stay adapter-compatible. `use.opaque` is the only way to get an `opaque` schema out of this package — honest, since it is the one case where you have told it nothing about the shape.
94
+
95
+ ## Notes
96
+
97
+ `faker.seed(...)` is inert here, by design: fabricator's seed governs, and a second one competing for control of the same output is the bug this package exists to remove. Pass a different `seed` to `initialize()` instead.
98
+
99
+ A builder called outside `fabricate()` throws `FakerExtensionError.NoActiveScopeError` — there is no active fabrication to draw from. `FakerExtensionError` extends core's `FabricatorError`, so one `catch` still covers both packages.
100
+
101
+ See the [faker guide](https://docs.ghostry.dev/fabricator/guides/faker) in the docs for the full module list and worked examples.
@@ -0,0 +1,15 @@
1
+ import { build } from "./FakerModules/Build.js";
2
+ function construct(T, faker, draw) {
3
+ return {
4
+ ...build(T, faker, draw),
5
+ use: {
6
+ string: (produce)=>T.string.as(draw(()=>produce(faker))),
7
+ number: (produce)=>T.number.as(draw(()=>produce(faker))),
8
+ date: (produce)=>T.date.as(draw(()=>produce(faker))),
9
+ boolean: (produce)=>T.boolean.as(draw(()=>produce(faker))),
10
+ bigint: (produce)=>T.bigint.as(draw(()=>produce(faker))),
11
+ opaque: (produce)=>T.opaque(draw(()=>produce(faker)))
12
+ }
13
+ };
14
+ }
15
+ export { construct };
@@ -0,0 +1,18 @@
1
+ import { FabricatorError } from "@ghostry/fabricator";
2
+ class Error_FakerExtensionError extends FabricatorError {
3
+ constructor(){
4
+ super();
5
+ this.name = "FakerExtensionError";
6
+ }
7
+ }
8
+ (function(FakerExtensionError) {
9
+ class NoActiveScopeError extends FakerExtensionError {
10
+ constructor(){
11
+ super();
12
+ this.name = "NoActiveScopeError";
13
+ this.message = "A faker builder was invoked outside of fabricate(). Faker builders only draw randomness while the schema they belong to is being fabricated.";
14
+ }
15
+ }
16
+ FakerExtensionError.NoActiveScopeError = NoActiveScopeError;
17
+ })(Error_FakerExtensionError || (Error_FakerExtensionError = {}));
18
+ export { Error_FakerExtensionError as FakerExtensionError };
@@ -0,0 +1,464 @@
1
+ function build(T, faker, draw) {
2
+ const [f, d] = [
3
+ faker,
4
+ draw
5
+ ];
6
+ const string = T.string.as(()=>"");
7
+ return {
8
+ airline: {
9
+ aircraftType: (...args)=>T.enum.uniform([
10
+ "narrowbody",
11
+ "regional",
12
+ "widebody"
13
+ ]).as(d(()=>f.airline.aircraftType(...args))),
14
+ airline: (...args)=>T.object({
15
+ name: string,
16
+ iataCode: string
17
+ }).as(d(()=>f.airline.airline(...args))),
18
+ airplane: (...args)=>T.object({
19
+ name: string,
20
+ iataTypeCode: string
21
+ }).as(d(()=>f.airline.airplane(...args))),
22
+ airport: (...args)=>T.object({
23
+ name: string,
24
+ iataCode: string
25
+ }).as(d(()=>f.airline.airport(...args))),
26
+ flightNumber: (...args)=>T.string.as(d(()=>f.airline.flightNumber(...args))),
27
+ recordLocator: (...args)=>T.string.as(d(()=>f.airline.recordLocator(...args))),
28
+ seat: (...args)=>T.string.as(d(()=>f.airline.seat(...args)))
29
+ },
30
+ animal: {
31
+ bear: (...args)=>T.string.as(d(()=>f.animal.bear(...args))),
32
+ bird: (...args)=>T.string.as(d(()=>f.animal.bird(...args))),
33
+ cat: (...args)=>T.string.as(d(()=>f.animal.cat(...args))),
34
+ cetacean: (...args)=>T.string.as(d(()=>f.animal.cetacean(...args))),
35
+ cow: (...args)=>T.string.as(d(()=>f.animal.cow(...args))),
36
+ crocodilia: (...args)=>T.string.as(d(()=>f.animal.crocodilia(...args))),
37
+ dog: (...args)=>T.string.as(d(()=>f.animal.dog(...args))),
38
+ fish: (...args)=>T.string.as(d(()=>f.animal.fish(...args))),
39
+ horse: (...args)=>T.string.as(d(()=>f.animal.horse(...args))),
40
+ insect: (...args)=>T.string.as(d(()=>f.animal.insect(...args))),
41
+ lion: (...args)=>T.string.as(d(()=>f.animal.lion(...args))),
42
+ petName: (...args)=>T.string.as(d(()=>f.animal.petName(...args))),
43
+ rabbit: (...args)=>T.string.as(d(()=>f.animal.rabbit(...args))),
44
+ rodent: (...args)=>T.string.as(d(()=>f.animal.rodent(...args))),
45
+ snake: (...args)=>T.string.as(d(()=>f.animal.snake(...args))),
46
+ type: (...args)=>T.string.as(d(()=>f.animal.type(...args)))
47
+ },
48
+ book: {
49
+ author: (...args)=>T.string.as(d(()=>f.book.author(...args))),
50
+ format: (...args)=>T.string.as(d(()=>f.book.format(...args))),
51
+ genre: (...args)=>T.string.as(d(()=>f.book.genre(...args))),
52
+ publisher: (...args)=>T.string.as(d(()=>f.book.publisher(...args))),
53
+ series: (...args)=>T.string.as(d(()=>f.book.series(...args))),
54
+ title: (...args)=>T.string.as(d(()=>f.book.title(...args)))
55
+ },
56
+ color: {
57
+ cssSupportedFunction: (...args)=>T.enum.uniform([
58
+ "rgb",
59
+ "rgba",
60
+ "hsl",
61
+ "hsla",
62
+ "hwb",
63
+ "cmyk",
64
+ "lab",
65
+ "lch",
66
+ "color"
67
+ ]).as(d(()=>f.color.cssSupportedFunction(...args))),
68
+ cssSupportedSpace: (...args)=>T.enum.uniform([
69
+ "sRGB",
70
+ "display-p3",
71
+ "rec2020",
72
+ "a98-rgb",
73
+ "prophoto-rgb"
74
+ ]).as(d(()=>f.color.cssSupportedSpace(...args))),
75
+ human: (...args)=>T.string.as(d(()=>f.color.human(...args))),
76
+ space: (...args)=>T.string.as(d(()=>f.color.space(...args))),
77
+ rgb: {
78
+ text: (options)=>T.string.as(d(()=>f.color.rgb({
79
+ format: "css",
80
+ ...options
81
+ }))),
82
+ channels: (options)=>T.array(T.number).as(d(()=>f.color.rgb({
83
+ ...options,
84
+ format: "decimal"
85
+ })))
86
+ },
87
+ cmyk: {
88
+ text: (options)=>T.string.as(d(()=>f.color.cmyk({
89
+ format: "css",
90
+ ...options
91
+ }))),
92
+ channels: (options)=>T.array(T.number).as(d(()=>f.color.cmyk({
93
+ ...options,
94
+ format: "decimal"
95
+ })))
96
+ },
97
+ hsl: {
98
+ text: (options)=>T.string.as(d(()=>f.color.hsl({
99
+ format: "css",
100
+ ...options
101
+ }))),
102
+ channels: (options)=>T.array(T.number).as(d(()=>f.color.hsl({
103
+ ...options,
104
+ format: "decimal"
105
+ })))
106
+ },
107
+ hwb: {
108
+ text: (options)=>T.string.as(d(()=>f.color.hwb({
109
+ format: "css",
110
+ ...options
111
+ }))),
112
+ channels: (options)=>T.array(T.number).as(d(()=>f.color.hwb({
113
+ ...options,
114
+ format: "decimal"
115
+ })))
116
+ },
117
+ lab: {
118
+ text: (options)=>T.string.as(d(()=>f.color.lab({
119
+ format: "css",
120
+ ...options
121
+ }))),
122
+ channels: (options)=>T.array(T.number).as(d(()=>f.color.lab({
123
+ ...options,
124
+ format: "decimal"
125
+ })))
126
+ },
127
+ lch: {
128
+ text: (options)=>T.string.as(d(()=>f.color.lch({
129
+ format: "css",
130
+ ...options
131
+ }))),
132
+ channels: (options)=>T.array(T.number).as(d(()=>f.color.lch({
133
+ ...options,
134
+ format: "decimal"
135
+ })))
136
+ },
137
+ colorByCSSColorSpace: {
138
+ text: (options)=>T.string.as(d(()=>f.color.colorByCSSColorSpace({
139
+ format: "css",
140
+ ...options
141
+ }))),
142
+ channels: (options)=>T.array(T.number).as(d(()=>f.color.colorByCSSColorSpace({
143
+ ...options,
144
+ format: "decimal"
145
+ })))
146
+ }
147
+ },
148
+ commerce: {
149
+ department: (...args)=>T.string.as(d(()=>f.commerce.department(...args))),
150
+ isbn: (...args)=>T.string.as(d(()=>f.commerce.isbn(...args))),
151
+ price: (...args)=>T.string.as(d(()=>f.commerce.price(...args))),
152
+ product: (...args)=>T.string.as(d(()=>f.commerce.product(...args))),
153
+ productAdjective: (...args)=>T.string.as(d(()=>f.commerce.productAdjective(...args))),
154
+ productDescription: (...args)=>T.string.as(d(()=>f.commerce.productDescription(...args))),
155
+ productMaterial: (...args)=>T.string.as(d(()=>f.commerce.productMaterial(...args))),
156
+ productName: (...args)=>T.string.as(d(()=>f.commerce.productName(...args))),
157
+ upc: (...args)=>T.string.as(d(()=>f.commerce.upc(...args)))
158
+ },
159
+ company: {
160
+ buzzAdjective: (...args)=>T.string.as(d(()=>f.company.buzzAdjective(...args))),
161
+ buzzNoun: (...args)=>T.string.as(d(()=>f.company.buzzNoun(...args))),
162
+ buzzPhrase: (...args)=>T.string.as(d(()=>f.company.buzzPhrase(...args))),
163
+ buzzVerb: (...args)=>T.string.as(d(()=>f.company.buzzVerb(...args))),
164
+ catchPhrase: (...args)=>T.string.as(d(()=>f.company.catchPhrase(...args))),
165
+ catchPhraseAdjective: (...args)=>T.string.as(d(()=>f.company.catchPhraseAdjective(...args))),
166
+ catchPhraseDescriptor: (...args)=>T.string.as(d(()=>f.company.catchPhraseDescriptor(...args))),
167
+ catchPhraseNoun: (...args)=>T.string.as(d(()=>f.company.catchPhraseNoun(...args))),
168
+ name: (...args)=>T.string.as(d(()=>f.company.name(...args)))
169
+ },
170
+ database: {
171
+ collation: (...args)=>T.string.as(d(()=>f.database.collation(...args))),
172
+ column: (...args)=>T.string.as(d(()=>f.database.column(...args))),
173
+ engine: (...args)=>T.string.as(d(()=>f.database.engine(...args))),
174
+ mongodbObjectId: (...args)=>T.string.as(d(()=>f.database.mongodbObjectId(...args)), {
175
+ pattern: "^[0-9a-fA-F]{24}$"
176
+ }),
177
+ type: (...args)=>T.string.as(d(()=>f.database.type(...args)))
178
+ },
179
+ datatype: {
180
+ boolean: (...args)=>T.boolean.as(d(()=>f.datatype.boolean(...args)))
181
+ },
182
+ date: {
183
+ anytime: (...args)=>T.date.as(d(()=>f.date.anytime(...args))),
184
+ between: (...args)=>T.date.as(d(()=>f.date.between(...args))),
185
+ betweens: (...args)=>T.array(T.date).as(d(()=>f.date.betweens(...args))),
186
+ birthdate: (...args)=>T.date.as(d(()=>f.date.birthdate(...args))),
187
+ future: (...args)=>T.date.as(d(()=>f.date.future(...args))),
188
+ month: (...args)=>T.string.as(d(()=>f.date.month(...args))),
189
+ past: (...args)=>T.date.as(d(()=>f.date.past(...args))),
190
+ recent: (...args)=>T.date.as(d(()=>f.date.recent(...args))),
191
+ soon: (...args)=>T.date.as(d(()=>f.date.soon(...args))),
192
+ timeZone: (...args)=>T.string.as(d(()=>f.date.timeZone(...args))),
193
+ weekday: (...args)=>T.string.as(d(()=>f.date.weekday(...args)))
194
+ },
195
+ finance: {
196
+ accountName: (...args)=>T.string.as(d(()=>f.finance.accountName(...args))),
197
+ accountNumber: (...args)=>T.string.as(d(()=>f.finance.accountNumber(...args))),
198
+ amount: (...args)=>T.string.as(d(()=>f.finance.amount(...args))),
199
+ bic: (...args)=>T.string.as(d(()=>f.finance.bic(...args)), {
200
+ pattern: "^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$"
201
+ }),
202
+ bitcoinAddress: (...args)=>T.string.as(d(()=>f.finance.bitcoinAddress(...args))),
203
+ creditCardCVV: (...args)=>T.string.as(d(()=>f.finance.creditCardCVV(...args)), {
204
+ pattern: "^[0-9]{3,4}$"
205
+ }),
206
+ creditCardIssuer: (...args)=>T.string.as(d(()=>f.finance.creditCardIssuer(...args))),
207
+ creditCardNumber: (...args)=>T.string.as(d(()=>f.finance.creditCardNumber(...args))),
208
+ currency: (...args)=>T.object({
209
+ name: string,
210
+ code: string,
211
+ symbol: string,
212
+ numericCode: string
213
+ }).as(d(()=>f.finance.currency(...args))),
214
+ currencyCode: (...args)=>T.string.as(d(()=>f.finance.currencyCode(...args))),
215
+ currencyName: (...args)=>T.string.as(d(()=>f.finance.currencyName(...args))),
216
+ currencyNumericCode: (...args)=>T.string.as(d(()=>f.finance.currencyNumericCode(...args))),
217
+ currencySymbol: (...args)=>T.string.as(d(()=>f.finance.currencySymbol(...args))),
218
+ ethereumAddress: (...args)=>T.string.as(d(()=>f.finance.ethereumAddress(...args))),
219
+ iban: (...args)=>T.string.as(d(()=>f.finance.iban(...args))),
220
+ litecoinAddress: (...args)=>T.string.as(d(()=>f.finance.litecoinAddress(...args))),
221
+ pin: (...args)=>T.string.as(d(()=>f.finance.pin(...args))),
222
+ routingNumber: (...args)=>T.string.as(d(()=>f.finance.routingNumber(...args))),
223
+ transactionDescription: (...args)=>T.string.as(d(()=>f.finance.transactionDescription(...args))),
224
+ transactionType: (...args)=>T.string.as(d(()=>f.finance.transactionType(...args)))
225
+ },
226
+ food: {
227
+ adjective: (...args)=>T.string.as(d(()=>f.food.adjective(...args))),
228
+ description: (...args)=>T.string.as(d(()=>f.food.description(...args))),
229
+ dish: (...args)=>T.string.as(d(()=>f.food.dish(...args))),
230
+ ethnicCategory: (...args)=>T.string.as(d(()=>f.food.ethnicCategory(...args))),
231
+ fruit: (...args)=>T.string.as(d(()=>f.food.fruit(...args))),
232
+ ingredient: (...args)=>T.string.as(d(()=>f.food.ingredient(...args))),
233
+ meat: (...args)=>T.string.as(d(()=>f.food.meat(...args))),
234
+ spice: (...args)=>T.string.as(d(()=>f.food.spice(...args))),
235
+ vegetable: (...args)=>T.string.as(d(()=>f.food.vegetable(...args)))
236
+ },
237
+ git: {
238
+ branch: (...args)=>T.string.as(d(()=>f.git.branch(...args))),
239
+ commitDate: (...args)=>T.string.as(d(()=>f.git.commitDate(...args))),
240
+ commitEntry: (...args)=>T.string.as(d(()=>f.git.commitEntry(...args))),
241
+ commitMessage: (...args)=>T.string.as(d(()=>f.git.commitMessage(...args))),
242
+ commitSha: (...args)=>T.string.as(d(()=>f.git.commitSha(...args)))
243
+ },
244
+ hacker: {
245
+ abbreviation: (...args)=>T.string.as(d(()=>f.hacker.abbreviation(...args))),
246
+ adjective: (...args)=>T.string.as(d(()=>f.hacker.adjective(...args))),
247
+ ingverb: (...args)=>T.string.as(d(()=>f.hacker.ingverb(...args))),
248
+ noun: (...args)=>T.string.as(d(()=>f.hacker.noun(...args))),
249
+ phrase: (...args)=>T.string.as(d(()=>f.hacker.phrase(...args))),
250
+ verb: (...args)=>T.string.as(d(()=>f.hacker.verb(...args)))
251
+ },
252
+ image: {
253
+ avatar: (...args)=>T.string.as(d(()=>f.image.avatar(...args)), {
254
+ format: "uri"
255
+ }),
256
+ avatarGitHub: (...args)=>T.string.as(d(()=>f.image.avatarGitHub(...args)), {
257
+ format: "uri"
258
+ }),
259
+ dataUri: (...args)=>T.string.as(d(()=>f.image.dataUri(...args)), {
260
+ format: "uri"
261
+ }),
262
+ personPortrait: (...args)=>T.string.as(d(()=>f.image.personPortrait(...args)), {
263
+ format: "uri"
264
+ }),
265
+ url: (...args)=>T.string.as(d(()=>f.image.url(...args)), {
266
+ format: "uri"
267
+ }),
268
+ urlLoremFlickr: (...args)=>T.string.as(d(()=>f.image.urlLoremFlickr(...args))),
269
+ urlPicsumPhotos: (...args)=>T.string.as(d(()=>f.image.urlPicsumPhotos(...args)), {
270
+ format: "uri"
271
+ })
272
+ },
273
+ internet: {
274
+ displayName: (...args)=>T.string.as(d(()=>f.internet.displayName(...args))),
275
+ domainName: (...args)=>T.string.as(d(()=>f.internet.domainName(...args)), {
276
+ format: "hostname"
277
+ }),
278
+ domainSuffix: (...args)=>T.string.as(d(()=>f.internet.domainSuffix(...args))),
279
+ domainWord: (...args)=>T.string.as(d(()=>f.internet.domainWord(...args))),
280
+ email: (...args)=>T.string.as(d(()=>f.internet.email(...args)), {
281
+ format: "email"
282
+ }),
283
+ emoji: (...args)=>T.string.as(d(()=>f.internet.emoji(...args))),
284
+ exampleEmail: (...args)=>T.string.as(d(()=>f.internet.exampleEmail(...args)), {
285
+ format: "email"
286
+ }),
287
+ httpMethod: (...args)=>T.enum.uniform([
288
+ "GET",
289
+ "POST",
290
+ "PUT",
291
+ "DELETE",
292
+ "PATCH"
293
+ ]).as(d(()=>f.internet.httpMethod(...args))),
294
+ httpStatusCode: (...args)=>T.number.as(d(()=>f.internet.httpStatusCode(...args))),
295
+ ip: (...args)=>T.string.as(d(()=>f.internet.ip(...args))),
296
+ ipv4: (...args)=>T.string.as(d(()=>f.internet.ipv4(...args)), {
297
+ format: "ipv4"
298
+ }),
299
+ ipv6: (...args)=>T.string.as(d(()=>f.internet.ipv6(...args)), {
300
+ format: "ipv6"
301
+ }),
302
+ jwt: (...args)=>T.string.as(d(()=>f.internet.jwt(...args))),
303
+ jwtAlgorithm: (...args)=>T.string.as(d(()=>f.internet.jwtAlgorithm(...args))),
304
+ mac: (...args)=>T.string.as(d(()=>f.internet.mac(...args))),
305
+ password: (...args)=>T.string.as(d(()=>f.internet.password(...args))),
306
+ port: (...args)=>T.number.as(d(()=>f.internet.port(...args))),
307
+ protocol: (...args)=>T.enum.uniform([
308
+ "http",
309
+ "https"
310
+ ]).as(d(()=>f.internet.protocol(...args))),
311
+ url: (...args)=>T.string.as(d(()=>f.internet.url(...args)), {
312
+ format: "uri"
313
+ }),
314
+ userAgent: (...args)=>T.string.as(d(()=>f.internet.userAgent(...args))),
315
+ username: (...args)=>T.string.as(d(()=>f.internet.username(...args)))
316
+ },
317
+ location: {
318
+ buildingNumber: (...args)=>T.string.as(d(()=>f.location.buildingNumber(...args))),
319
+ cardinalDirection: (...args)=>T.string.as(d(()=>f.location.cardinalDirection(...args))),
320
+ city: (...args)=>T.string.as(d(()=>f.location.city(...args))),
321
+ continent: (...args)=>T.string.as(d(()=>f.location.continent(...args))),
322
+ country: (...args)=>T.string.as(d(()=>f.location.country(...args))),
323
+ countryCode: (...args)=>T.string.as(d(()=>f.location.countryCode(...args))),
324
+ county: (...args)=>T.string.as(d(()=>f.location.county(...args))),
325
+ direction: (...args)=>T.string.as(d(()=>f.location.direction(...args))),
326
+ language: (...args)=>T.object({
327
+ name: string,
328
+ alpha2: string,
329
+ alpha3: string
330
+ }).as(d(()=>f.location.language(...args))),
331
+ latitude: (...args)=>T.number.as(d(()=>f.location.latitude(...args))),
332
+ longitude: (...args)=>T.number.as(d(()=>f.location.longitude(...args))),
333
+ nearbyGPSCoordinate: (...args)=>T.tuple([
334
+ T.number,
335
+ T.number
336
+ ]).as(d(()=>f.location.nearbyGPSCoordinate(...args))),
337
+ ordinalDirection: (...args)=>T.string.as(d(()=>f.location.ordinalDirection(...args))),
338
+ postalAddress: (...args)=>T.string.as(d(()=>f.location.postalAddress(...args))),
339
+ secondaryAddress: (...args)=>T.string.as(d(()=>f.location.secondaryAddress(...args))),
340
+ state: (...args)=>T.string.as(d(()=>f.location.state(...args))),
341
+ street: (...args)=>T.string.as(d(()=>f.location.street(...args))),
342
+ streetAddress: (...args)=>T.string.as(d(()=>f.location.streetAddress(...args))),
343
+ timeZone: (...args)=>T.string.as(d(()=>f.location.timeZone(...args))),
344
+ zipCode: (...args)=>T.string.as(d(()=>f.location.zipCode(...args)))
345
+ },
346
+ lorem: {
347
+ lines: (...args)=>T.string.as(d(()=>f.lorem.lines(...args))),
348
+ paragraph: (...args)=>T.string.as(d(()=>f.lorem.paragraph(...args))),
349
+ paragraphs: (...args)=>T.string.as(d(()=>f.lorem.paragraphs(...args))),
350
+ sentence: (...args)=>T.string.as(d(()=>f.lorem.sentence(...args))),
351
+ sentences: (...args)=>T.string.as(d(()=>f.lorem.sentences(...args))),
352
+ slug: (...args)=>T.string.as(d(()=>f.lorem.slug(...args))),
353
+ text: (...args)=>T.string.as(d(()=>f.lorem.text(...args))),
354
+ word: (...args)=>T.string.as(d(()=>f.lorem.word(...args))),
355
+ words: (...args)=>T.string.as(d(()=>f.lorem.words(...args)))
356
+ },
357
+ music: {
358
+ album: (...args)=>T.string.as(d(()=>f.music.album(...args))),
359
+ artist: (...args)=>T.string.as(d(()=>f.music.artist(...args))),
360
+ genre: (...args)=>T.string.as(d(()=>f.music.genre(...args))),
361
+ songName: (...args)=>T.string.as(d(()=>f.music.songName(...args)))
362
+ },
363
+ number: {
364
+ bigInt: (...args)=>T.bigint.as(d(()=>f.number.bigInt(...args))),
365
+ binary: (...args)=>T.string.as(d(()=>f.number.binary(...args))),
366
+ float: (...args)=>T.number.as(d(()=>f.number.float(...args))),
367
+ hex: (...args)=>T.string.as(d(()=>f.number.hex(...args))),
368
+ int: (...args)=>T.number.as(d(()=>f.number.int(...args))),
369
+ octal: (...args)=>T.string.as(d(()=>f.number.octal(...args))),
370
+ romanNumeral: (...args)=>T.string.as(d(()=>f.number.romanNumeral(...args)))
371
+ },
372
+ person: {
373
+ bio: (...args)=>T.string.as(d(()=>f.person.bio(...args))),
374
+ firstName: (...args)=>T.string.as(d(()=>f.person.firstName(...args))),
375
+ fullName: (...args)=>T.string.as(d(()=>f.person.fullName(...args))),
376
+ gender: (...args)=>T.string.as(d(()=>f.person.gender(...args))),
377
+ jobArea: (...args)=>T.string.as(d(()=>f.person.jobArea(...args))),
378
+ jobDescriptor: (...args)=>T.string.as(d(()=>f.person.jobDescriptor(...args))),
379
+ jobTitle: (...args)=>T.string.as(d(()=>f.person.jobTitle(...args))),
380
+ jobType: (...args)=>T.string.as(d(()=>f.person.jobType(...args))),
381
+ lastName: (...args)=>T.string.as(d(()=>f.person.lastName(...args))),
382
+ middleName: (...args)=>T.string.as(d(()=>f.person.middleName(...args))),
383
+ prefix: (...args)=>T.string.as(d(()=>f.person.prefix(...args))),
384
+ sex: (...args)=>T.string.as(d(()=>f.person.sex(...args))),
385
+ sexType: (...args)=>T.enum.uniform([
386
+ "female",
387
+ "generic",
388
+ "male"
389
+ ]).as(d(()=>f.person.sexType(...args))),
390
+ suffix: (...args)=>T.string.as(d(()=>f.person.suffix(...args))),
391
+ zodiacSign: (...args)=>T.string.as(d(()=>f.person.zodiacSign(...args)))
392
+ },
393
+ phone: {
394
+ imei: (...args)=>T.string.as(d(()=>f.phone.imei(...args))),
395
+ number: (...args)=>T.string.as(d(()=>f.phone.number(...args)))
396
+ },
397
+ science: {
398
+ chemicalElement: (...args)=>T.object({
399
+ symbol: string,
400
+ name: string,
401
+ atomicNumber: T.number
402
+ }).as(d(()=>f.science.chemicalElement(...args))),
403
+ unit: (...args)=>T.object({
404
+ name: string,
405
+ symbol: string
406
+ }).as(d(()=>f.science.unit(...args)))
407
+ },
408
+ string: {
409
+ alpha: (...args)=>T.string.as(d(()=>f.string.alpha(...args))),
410
+ alphanumeric: (...args)=>T.string.as(d(()=>f.string.alphanumeric(...args))),
411
+ binary: (...args)=>T.string.as(d(()=>f.string.binary(...args))),
412
+ fromCharacters: (...args)=>T.string.as(d(()=>f.string.fromCharacters(...args))),
413
+ hexadecimal: (...args)=>T.string.as(d(()=>f.string.hexadecimal(...args))),
414
+ nanoid: (...args)=>T.string.as(d(()=>f.string.nanoid(...args))),
415
+ numeric: (...args)=>T.string.as(d(()=>f.string.numeric(...args))),
416
+ octal: (...args)=>T.string.as(d(()=>f.string.octal(...args))),
417
+ sample: (...args)=>T.string.as(d(()=>f.string.sample(...args))),
418
+ symbol: (...args)=>T.string.as(d(()=>f.string.symbol(...args))),
419
+ ulid: (...args)=>T.string.as(d(()=>f.string.ulid(...args))),
420
+ uuid: (...args)=>T.string.as(d(()=>f.string.uuid(...args)), {
421
+ format: "uuid"
422
+ })
423
+ },
424
+ system: {
425
+ commonFileExt: (...args)=>T.string.as(d(()=>f.system.commonFileExt(...args))),
426
+ commonFileName: (...args)=>T.string.as(d(()=>f.system.commonFileName(...args))),
427
+ commonFileType: (...args)=>T.string.as(d(()=>f.system.commonFileType(...args))),
428
+ cron: (...args)=>T.string.as(d(()=>f.system.cron(...args))),
429
+ directoryPath: (...args)=>T.string.as(d(()=>f.system.directoryPath(...args))),
430
+ fileExt: (...args)=>T.string.as(d(()=>f.system.fileExt(...args))),
431
+ fileName: (...args)=>T.string.as(d(()=>f.system.fileName(...args))),
432
+ filePath: (...args)=>T.string.as(d(()=>f.system.filePath(...args)), {
433
+ format: "uri-reference"
434
+ }),
435
+ fileType: (...args)=>T.string.as(d(()=>f.system.fileType(...args))),
436
+ mimeType: (...args)=>T.string.as(d(()=>f.system.mimeType(...args))),
437
+ networkInterface: (...args)=>T.string.as(d(()=>f.system.networkInterface(...args))),
438
+ semver: (...args)=>T.string.as(d(()=>f.system.semver(...args)))
439
+ },
440
+ vehicle: {
441
+ bicycle: (...args)=>T.string.as(d(()=>f.vehicle.bicycle(...args))),
442
+ color: (...args)=>T.string.as(d(()=>f.vehicle.color(...args))),
443
+ fuel: (...args)=>T.string.as(d(()=>f.vehicle.fuel(...args))),
444
+ manufacturer: (...args)=>T.string.as(d(()=>f.vehicle.manufacturer(...args))),
445
+ model: (...args)=>T.string.as(d(()=>f.vehicle.model(...args))),
446
+ type: (...args)=>T.string.as(d(()=>f.vehicle.type(...args))),
447
+ vehicle: (...args)=>T.string.as(d(()=>f.vehicle.vehicle(...args))),
448
+ vin: (...args)=>T.string.as(d(()=>f.vehicle.vin(...args))),
449
+ vrm: (...args)=>T.string.as(d(()=>f.vehicle.vrm(...args)))
450
+ },
451
+ word: {
452
+ adjective: (...args)=>T.string.as(d(()=>f.word.adjective(...args))),
453
+ adverb: (...args)=>T.string.as(d(()=>f.word.adverb(...args))),
454
+ conjunction: (...args)=>T.string.as(d(()=>f.word.conjunction(...args))),
455
+ interjection: (...args)=>T.string.as(d(()=>f.word.interjection(...args))),
456
+ noun: (...args)=>T.string.as(d(()=>f.word.noun(...args))),
457
+ preposition: (...args)=>T.string.as(d(()=>f.word.preposition(...args))),
458
+ sample: (...args)=>T.string.as(d(()=>f.word.sample(...args))),
459
+ verb: (...args)=>T.string.as(d(()=>f.word.verb(...args))),
460
+ words: (...args)=>T.string.as(d(()=>f.word.words(...args)))
461
+ }
462
+ };
463
+ }
464
+ export { build };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };