struct-fakerator 2.1.2 → 2.2.3
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 +30 -0
- package/biome.json +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +7 -6
- package/src/create_generator_fn.ts +5 -5
- package/src/index.ts +1 -0
- package/src/utils/airline.ts +16 -0
- package/src/utils/animal.ts +64 -0
- package/src/utils/color.ts +49 -0
- package/src/utils/commerce.ts +40 -0
- package/src/utils/common.ts +4 -0
- package/src/utils/company.ts +46 -0
- package/src/utils/database.ts +24 -0
- package/src/utils/datatype.ts +7 -0
- package/src/utils/datetime.ts +47 -0
- package/src/utils/finance.ts +93 -0
- package/src/utils/index.ts +44 -0
- package/src/utils/lorem.ts +41 -0
- package/src/utils/number.ts +26 -0
- package/src/utils/person.ts +69 -0
- package/src/utils/phone.ts +10 -0
- package/src/utils/string.ts +45 -0
- package/src/utils/word.ts +42 -0
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# 假資料結構產生器
|
|
2
|
+
|
|
3
|
+
|
|
2
4
|
- [假資料結構產生器](#假資料結構產生器)
|
|
5
|
+
- [port to fakerjs](#port-to-fakerjs)
|
|
3
6
|
- [用途](#用途)
|
|
4
7
|
- [createValueGenerator](#createvaluegenerator)
|
|
5
8
|
- [createSelectionGenerator](#createselectiongenerator)
|
|
@@ -9,6 +12,33 @@
|
|
|
9
12
|
- [createBoundedSeriesGenerator](#createboundedseriesgenerator)
|
|
10
13
|
- [擴充](#擴充)
|
|
11
14
|
|
|
15
|
+
## port to fakerjs
|
|
16
|
+
|
|
17
|
+
- [X] Airline
|
|
18
|
+
- [X] Animal
|
|
19
|
+
- [X] Color
|
|
20
|
+
- [X] Commerce
|
|
21
|
+
- [X] Company
|
|
22
|
+
- [X] Database
|
|
23
|
+
- [X] Datatype
|
|
24
|
+
- [X] Date(Datetime)
|
|
25
|
+
- [X] Finance
|
|
26
|
+
- [ ] Food
|
|
27
|
+
- [ ] Git
|
|
28
|
+
- [ ] Hacker
|
|
29
|
+
- [ ] Image
|
|
30
|
+
- [ ] Internet
|
|
31
|
+
- [ ] Location
|
|
32
|
+
- [X] Lorem
|
|
33
|
+
- [ ] Music
|
|
34
|
+
- [X] Number
|
|
35
|
+
- [X] Person
|
|
36
|
+
- [X] Phone
|
|
37
|
+
- [ ] Science
|
|
38
|
+
- [X] String
|
|
39
|
+
- [ ] System
|
|
40
|
+
- [ ] Vehicle
|
|
41
|
+
|
|
12
42
|
## 用途
|
|
13
43
|
|
|
14
44
|
使用 faker js 時是單一純值不能產生結構,需要自己手動組合結構,此專案利用撰寫設定檔的方式來產生一個特定的假資料函數,減少手動組合結構的麻煩。
|
package/biome.json
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -80,8 +80,8 @@ declare const createValueGenerator: <R = unknown>(config: ValueConfig<unknown>)
|
|
|
80
80
|
declare const createSelectionGenerator: <T extends SelectionConfig<unknown>>(config: T) => (() => Result<T>);
|
|
81
81
|
declare const createObjectGenerator: <T extends ObjectConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path?: string) => ValueConfig<unknown>) => (() => Result<T>);
|
|
82
82
|
declare const createArrayGenerator: <T extends ArrayConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path?: string) => ValueConfig<unknown>) => (() => Result<T>);
|
|
83
|
-
declare const createTupleGenerator: <T extends TupleConfig<unknown, unknown, unknown, unknown, unknown> | TupleConfig<unknown, unknown, unknown, unknown> | TupleConfig<unknown, unknown, unknown> | TupleConfig<unknown, unknown> | TupleConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path
|
|
83
|
+
declare const createTupleGenerator: <T extends TupleConfig<unknown, unknown, unknown, unknown, unknown> | TupleConfig<unknown, unknown, unknown, unknown> | TupleConfig<unknown, unknown, unknown> | TupleConfig<unknown, unknown> | TupleConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>) => (() => Result<T>);
|
|
84
84
|
declare const createBoundedSeriesGenerator: <T extends BoundedSeriesConfig>(config: T) => (() => Result<T>);
|
|
85
|
-
declare const createGeneratorByType: <T extends AllConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path
|
|
85
|
+
declare const createGeneratorByType: <T extends AllConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>) => (() => Result<T>);
|
|
86
86
|
|
|
87
87
|
export { type ArrayConfig, type BoundedSeriesConfig, type ObjectConfig, type Result, type SelectionConfig, type TupleConfig, type ValueConfig, createArrayConfig, createArrayGenerator, createBoundedSeriesConfig, createBoundedSeriesGenerator, createGeneratorByType, createObjectConfig, createObjectGenerator, createSelectionConfig, createSelectionGenerator, createTupleConfig, createTupleGenerator, createValueConfig, createValueGenerator };
|
package/dist/index.d.ts
CHANGED
|
@@ -80,8 +80,8 @@ declare const createValueGenerator: <R = unknown>(config: ValueConfig<unknown>)
|
|
|
80
80
|
declare const createSelectionGenerator: <T extends SelectionConfig<unknown>>(config: T) => (() => Result<T>);
|
|
81
81
|
declare const createObjectGenerator: <T extends ObjectConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path?: string) => ValueConfig<unknown>) => (() => Result<T>);
|
|
82
82
|
declare const createArrayGenerator: <T extends ArrayConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path?: string) => ValueConfig<unknown>) => (() => Result<T>);
|
|
83
|
-
declare const createTupleGenerator: <T extends TupleConfig<unknown, unknown, unknown, unknown, unknown> | TupleConfig<unknown, unknown, unknown, unknown> | TupleConfig<unknown, unknown, unknown> | TupleConfig<unknown, unknown> | TupleConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path
|
|
83
|
+
declare const createTupleGenerator: <T extends TupleConfig<unknown, unknown, unknown, unknown, unknown> | TupleConfig<unknown, unknown, unknown, unknown> | TupleConfig<unknown, unknown, unknown> | TupleConfig<unknown, unknown> | TupleConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>) => (() => Result<T>);
|
|
84
84
|
declare const createBoundedSeriesGenerator: <T extends BoundedSeriesConfig>(config: T) => (() => Result<T>);
|
|
85
|
-
declare const createGeneratorByType: <T extends AllConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path
|
|
85
|
+
declare const createGeneratorByType: <T extends AllConfig<unknown>>(config: T, customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>) => (() => Result<T>);
|
|
86
86
|
|
|
87
87
|
export { type ArrayConfig, type BoundedSeriesConfig, type ObjectConfig, type Result, type SelectionConfig, type TupleConfig, type ValueConfig, createArrayConfig, createArrayGenerator, createBoundedSeriesConfig, createBoundedSeriesGenerator, createGeneratorByType, createObjectConfig, createObjectGenerator, createSelectionConfig, createSelectionGenerator, createTupleConfig, createTupleGenerator, createValueConfig, createValueGenerator };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "struct-fakerator",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
16
|
+
"publish": "pnpm build && pnpm publish --access public",
|
|
16
17
|
"test": "vitest src"
|
|
17
18
|
},
|
|
18
19
|
"keywords": [],
|
|
@@ -20,11 +21,11 @@
|
|
|
20
21
|
"homepage": "https://github.com/FizzyElt/fakerator",
|
|
21
22
|
"license": "ISC",
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@biomejs/biome": "^1.
|
|
24
|
-
"@faker-js/faker": "^
|
|
25
|
-
"tsup": "^8.
|
|
26
|
-
"typescript": "^5.
|
|
27
|
-
"vitest": "^2.
|
|
24
|
+
"@biomejs/biome": "^1.9.1",
|
|
25
|
+
"@faker-js/faker": "^9.0.1",
|
|
26
|
+
"tsup": "^8.3.0",
|
|
27
|
+
"typescript": "^5.6.2",
|
|
28
|
+
"vitest": "^2.1.1"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"zod": "^3.23.8"
|
|
@@ -72,7 +72,7 @@ export const createSelectionGenerator = <T extends SelectionConfig<unknown>>(
|
|
|
72
72
|
const _createObjectGenerator = <T extends ObjectConfig<unknown>>(
|
|
73
73
|
config: T,
|
|
74
74
|
path: string,
|
|
75
|
-
customTypeMatch?: (config: unknown, path
|
|
75
|
+
customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
|
|
76
76
|
): (() => Result<T>) => {
|
|
77
77
|
try {
|
|
78
78
|
objConfigScheme.parse(config);
|
|
@@ -104,7 +104,7 @@ export const createObjectGenerator = <T extends ObjectConfig<unknown>>(
|
|
|
104
104
|
const _createArrayGenerator = <T extends ArrayConfig<unknown>>(
|
|
105
105
|
config: T,
|
|
106
106
|
path: string,
|
|
107
|
-
customTypeMatch?: (config: unknown, path
|
|
107
|
+
customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
|
|
108
108
|
): (() => Result<T>) => {
|
|
109
109
|
try {
|
|
110
110
|
arrayConfigScheme.parse(config);
|
|
@@ -165,7 +165,7 @@ export const createTupleGenerator = <
|
|
|
165
165
|
| TupleConfig<unknown>,
|
|
166
166
|
>(
|
|
167
167
|
config: T,
|
|
168
|
-
customTypeMatch?: (config: unknown, path
|
|
168
|
+
customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
|
|
169
169
|
): (() => Result<T>) => _createTupleGenerator(config, "*", customTypeMatch);
|
|
170
170
|
|
|
171
171
|
// =================== generator fn ====================
|
|
@@ -204,7 +204,7 @@ export const createBoundedSeriesGenerator = <T extends BoundedSeriesConfig>(
|
|
|
204
204
|
const _createGeneratorByType = <T extends AllConfig<unknown>>(
|
|
205
205
|
config: T,
|
|
206
206
|
path: string,
|
|
207
|
-
customTypeMatch?: (config: unknown, path
|
|
207
|
+
customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
|
|
208
208
|
): (() => Result<T>) => {
|
|
209
209
|
switch (config.type) {
|
|
210
210
|
case "obj":
|
|
@@ -242,5 +242,5 @@ const _createGeneratorByType = <T extends AllConfig<unknown>>(
|
|
|
242
242
|
|
|
243
243
|
export const createGeneratorByType = <T extends AllConfig<unknown>>(
|
|
244
244
|
config: T,
|
|
245
|
-
customTypeMatch?: (config: unknown, path
|
|
245
|
+
customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
|
|
246
246
|
): (() => Result<T>) => _createGeneratorByType(config, "*", customTypeMatch);
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Airline [aircraftType](https://fakerjs.dev/api/airline.html#aircraftType) */
|
|
5
|
+
export const aircraftType = (
|
|
6
|
+
...options: Parameters<typeof faker.airline.aircraftType>
|
|
7
|
+
) => createValueConfig(() => faker.airline.aircraftType(...options));
|
|
8
|
+
|
|
9
|
+
/** Airline [flightNumber](https://fakerjs.dev/api/airline.html#flightNumber) */
|
|
10
|
+
export const flightNumber = (
|
|
11
|
+
...options: Parameters<typeof faker.airline.flightNumber>
|
|
12
|
+
) => createValueConfig(() => faker.airline.flightNumber(...options));
|
|
13
|
+
|
|
14
|
+
/** Airline [seat](https://fakerjs.dev/api/airline.html#seat) */
|
|
15
|
+
export const seat = (...options: Parameters<typeof faker.airline.seat>) =>
|
|
16
|
+
createValueConfig(() => faker.airline.seat(...options));
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Animal [bear](https://fakerjs.dev/api/animal.html#bear) */
|
|
5
|
+
export const bear = (...options: Parameters<typeof faker.animal.bear>) =>
|
|
6
|
+
createValueConfig(() => faker.animal.bear(...options));
|
|
7
|
+
|
|
8
|
+
/** Animal [bird](https://fakerjs.dev/api/animal.html#bird) */
|
|
9
|
+
export const bird = (...options: Parameters<typeof faker.animal.bird>) =>
|
|
10
|
+
createValueConfig(() => faker.animal.bird(...options));
|
|
11
|
+
|
|
12
|
+
/** Animal [cat](https://fakerjs.dev/api/animal.html#cat) */
|
|
13
|
+
export const cat = (...options: Parameters<typeof faker.animal.cat>) =>
|
|
14
|
+
createValueConfig(() => faker.animal.cat(...options));
|
|
15
|
+
|
|
16
|
+
/** Animal [cetacean](https://fakerjs.dev/api/animal.html#cetacean) */
|
|
17
|
+
export const cetacean = (
|
|
18
|
+
...options: Parameters<typeof faker.animal.cetacean>
|
|
19
|
+
) => createValueConfig(() => faker.animal.cetacean(...options));
|
|
20
|
+
|
|
21
|
+
/** Animal [cow](https://fakerjs.dev/api/animal.html#cow) */
|
|
22
|
+
export const cow = (...options: Parameters<typeof faker.animal.cow>) =>
|
|
23
|
+
createValueConfig(() => faker.animal.cow(...options));
|
|
24
|
+
|
|
25
|
+
/** Animal [crocodilia](https://fakerjs.dev/api/animal.html#crocodilia) */
|
|
26
|
+
export const crocodilia = (
|
|
27
|
+
...options: Parameters<typeof faker.animal.crocodilia>
|
|
28
|
+
) => createValueConfig(() => faker.animal.crocodilia(...options));
|
|
29
|
+
|
|
30
|
+
/** Animal [dog](https://fakerjs.dev/api/animal.html#dog) */
|
|
31
|
+
export const dog = (...options: Parameters<typeof faker.animal.dog>) =>
|
|
32
|
+
createValueConfig(() => faker.animal.dog(...options));
|
|
33
|
+
|
|
34
|
+
/** Animal [fish](https://fakerjs.dev/api/animal.html#fish) */
|
|
35
|
+
export const fish = (...options: Parameters<typeof faker.animal.fish>) =>
|
|
36
|
+
createValueConfig(() => faker.animal.fish(...options));
|
|
37
|
+
|
|
38
|
+
/** Animal [horse](https://fakerjs.dev/api/animal.html#horse) */
|
|
39
|
+
export const horse = (...options: Parameters<typeof faker.animal.horse>) =>
|
|
40
|
+
createValueConfig(() => faker.animal.horse(...options));
|
|
41
|
+
|
|
42
|
+
/** Animal [insect](https://fakerjs.dev/api/animal.html#insect) */
|
|
43
|
+
export const insect = (...options: Parameters<typeof faker.animal.insect>) =>
|
|
44
|
+
createValueConfig(() => faker.animal.insect(...options));
|
|
45
|
+
|
|
46
|
+
/** Animal [lion](https://fakerjs.dev/api/animal.html#lion) */
|
|
47
|
+
export const lion = (...options: Parameters<typeof faker.animal.lion>) =>
|
|
48
|
+
createValueConfig(() => faker.animal.lion(...options));
|
|
49
|
+
|
|
50
|
+
/** Animal [rabbit](https://fakerjs.dev/api/animal.html#rabbit) */
|
|
51
|
+
export const rabbit = (...options: Parameters<typeof faker.animal.rabbit>) =>
|
|
52
|
+
createValueConfig(() => faker.animal.rabbit(...options));
|
|
53
|
+
|
|
54
|
+
/** Animal [rodent](https://fakerjs.dev/api/animal.html#rodent) */
|
|
55
|
+
export const rodent = (...options: Parameters<typeof faker.animal.rodent>) =>
|
|
56
|
+
createValueConfig(() => faker.animal.rodent(...options));
|
|
57
|
+
|
|
58
|
+
/** Animal [snake](https://fakerjs.dev/api/animal.html#snake) */
|
|
59
|
+
export const snake = (...options: Parameters<typeof faker.animal.snake>) =>
|
|
60
|
+
createValueConfig(() => faker.animal.snake(...options));
|
|
61
|
+
|
|
62
|
+
/** Animal [type](https://fakerjs.dev/api/animal.html#type) */
|
|
63
|
+
export const type = (...options: Parameters<typeof faker.animal.type>) =>
|
|
64
|
+
createValueConfig(() => faker.animal.type(...options));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Color [cmyk](https://fakerjs.dev/api/color.html#cmyk) */
|
|
5
|
+
export const cmyk = (...options: Parameters<typeof faker.color.cmyk>) =>
|
|
6
|
+
createValueConfig(() => faker.color.cmyk(...options));
|
|
7
|
+
|
|
8
|
+
/** Color [colorByCSSColorSpace](https://fakerjs.dev/api/color.html#colorByCSSColorSpace) */
|
|
9
|
+
export const colorByCSSColorSpace = (
|
|
10
|
+
...options: Parameters<typeof faker.color.colorByCSSColorSpace>
|
|
11
|
+
) => createValueConfig(() => faker.color.colorByCSSColorSpace(...options));
|
|
12
|
+
|
|
13
|
+
/** Color [cssSupportedFunction](https://fakerjs.dev/api/color.html#cssSupportedFunction) */
|
|
14
|
+
export const cssSupportedFunction = (
|
|
15
|
+
...options: Parameters<typeof faker.color.cssSupportedFunction>
|
|
16
|
+
) => createValueConfig(() => faker.color.cssSupportedFunction(...options));
|
|
17
|
+
|
|
18
|
+
/** Color [cssSupportedSpace](https://fakerjs.dev/api/color.html#cssSupportedSpace) */
|
|
19
|
+
export const cssSupportedSpace = (
|
|
20
|
+
...options: Parameters<typeof faker.color.cssSupportedSpace>
|
|
21
|
+
) => createValueConfig(() => faker.color.cssSupportedSpace(...options));
|
|
22
|
+
|
|
23
|
+
/** Color [hsl](https://fakerjs.dev/api/color.html#hsl) */
|
|
24
|
+
export const hsl = (...options: Parameters<typeof faker.color.hsl>) =>
|
|
25
|
+
createValueConfig(() => faker.color.hsl(...options));
|
|
26
|
+
|
|
27
|
+
/** Color [human](https://fakerjs.dev/api/color.html#human) */
|
|
28
|
+
export const human = (...options: Parameters<typeof faker.color.human>) =>
|
|
29
|
+
createValueConfig(() => faker.color.human(...options));
|
|
30
|
+
|
|
31
|
+
/** Color [hwb](https://fakerjs.dev/api/color.html#hwb) */
|
|
32
|
+
export const hwb = (...options: Parameters<typeof faker.color.hwb>) =>
|
|
33
|
+
createValueConfig(() => faker.color.hwb(...options));
|
|
34
|
+
|
|
35
|
+
/** Color [lab](https://fakerjs.dev/api/color.html#lab) */
|
|
36
|
+
export const lab = (...options: Parameters<typeof faker.color.lab>) =>
|
|
37
|
+
createValueConfig(() => faker.color.lab(...options));
|
|
38
|
+
|
|
39
|
+
/** Color [lch](https://fakerjs.dev/api/color.html#lch) */
|
|
40
|
+
export const lch = (...options: Parameters<typeof faker.color.lch>) =>
|
|
41
|
+
createValueConfig(() => faker.color.lch(...options));
|
|
42
|
+
|
|
43
|
+
/** Color [rgb](https://fakerjs.dev/api/color.html#rgb) */
|
|
44
|
+
export const rgb = (...options: Parameters<typeof faker.color.rgb>) =>
|
|
45
|
+
createValueConfig(() => faker.color.rgb(...options));
|
|
46
|
+
|
|
47
|
+
/** Color [space](https://fakerjs.dev/api/color.html#space) */
|
|
48
|
+
export const space = (...options: Parameters<typeof faker.color.space>) =>
|
|
49
|
+
createValueConfig(() => faker.color.space(...options));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Commerce [department](https://fakerjs.dev/api/commerce.html#department) */
|
|
5
|
+
export const department = (
|
|
6
|
+
...options: Parameters<typeof faker.commerce.department>
|
|
7
|
+
) => createValueConfig(() => faker.commerce.department(...options));
|
|
8
|
+
|
|
9
|
+
/** Commerce [isbn](https://fakerjs.dev/api/commerce.html#isbn) */
|
|
10
|
+
export const isbn = (...options: Parameters<typeof faker.commerce.isbn>) =>
|
|
11
|
+
createValueConfig(() => faker.commerce.isbn(...options));
|
|
12
|
+
|
|
13
|
+
/** Commerce [price](https://fakerjs.dev/api/commerce.html#price) */
|
|
14
|
+
export const price = (...options: Parameters<typeof faker.commerce.price>) =>
|
|
15
|
+
createValueConfig(() => faker.commerce.price(...options));
|
|
16
|
+
|
|
17
|
+
/** Commerce [product](https://fakerjs.dev/api/commerce.html#product) */
|
|
18
|
+
export const product = (
|
|
19
|
+
...options: Parameters<typeof faker.commerce.product>
|
|
20
|
+
) => createValueConfig(() => faker.commerce.product(...options));
|
|
21
|
+
|
|
22
|
+
/** Commerce [productAdjective](https://fakerjs.dev/api/commerce.html#productAdjective) */
|
|
23
|
+
export const productAdjective = (
|
|
24
|
+
...options: Parameters<typeof faker.commerce.productAdjective>
|
|
25
|
+
) => createValueConfig(() => faker.commerce.productAdjective(...options));
|
|
26
|
+
|
|
27
|
+
/** Commerce [productDescription](https://fakerjs.dev/api/commerce.html#productDescription) */
|
|
28
|
+
export const productDescription = (
|
|
29
|
+
...options: Parameters<typeof faker.commerce.productDescription>
|
|
30
|
+
) => createValueConfig(() => faker.commerce.productDescription(...options));
|
|
31
|
+
|
|
32
|
+
/** Commerce [productMaterial](https://fakerjs.dev/api/commerce.html#productMaterial) */
|
|
33
|
+
export const productMaterial = (
|
|
34
|
+
...options: Parameters<typeof faker.commerce.productMaterial>
|
|
35
|
+
) => createValueConfig(() => faker.commerce.productMaterial(...options));
|
|
36
|
+
|
|
37
|
+
/** Commerce [productName](https://fakerjs.dev/api/commerce.html#productName) */
|
|
38
|
+
export const productName = (
|
|
39
|
+
...options: Parameters<typeof faker.commerce.productName>
|
|
40
|
+
) => createValueConfig(() => faker.commerce.productName(...options));
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Company [buzzAdjective](https://fakerjs.dev/api/company.html#buzzAdjective) */
|
|
5
|
+
export const buzzAdjective = (
|
|
6
|
+
...options: Parameters<typeof faker.company.buzzAdjective>
|
|
7
|
+
) => createValueConfig(() => faker.company.buzzAdjective(...options));
|
|
8
|
+
|
|
9
|
+
/** Company [buzzNoun](https://fakerjs.dev/api/company.html#buzzNoun) */
|
|
10
|
+
export const buzzNoun = (
|
|
11
|
+
...options: Parameters<typeof faker.company.buzzNoun>
|
|
12
|
+
) => createValueConfig(() => faker.company.buzzNoun(...options));
|
|
13
|
+
|
|
14
|
+
/** Company [buzzPhrase](https://fakerjs.dev/api/company.html#buzzPhrase) */
|
|
15
|
+
export const buzzPhrase = (
|
|
16
|
+
...options: Parameters<typeof faker.company.buzzPhrase>
|
|
17
|
+
) => createValueConfig(() => faker.company.buzzPhrase(...options));
|
|
18
|
+
|
|
19
|
+
/** Company [buzzVerb](https://fakerjs.dev/api/company.html#buzzVerb) */
|
|
20
|
+
export const buzzVerb = (
|
|
21
|
+
...options: Parameters<typeof faker.company.buzzVerb>
|
|
22
|
+
) => createValueConfig(() => faker.company.buzzVerb(...options));
|
|
23
|
+
|
|
24
|
+
/** Company [catchPhrase](https://fakerjs.dev/api/company.html#catchPhrase) */
|
|
25
|
+
export const catchPhrase = (
|
|
26
|
+
...options: Parameters<typeof faker.company.catchPhrase>
|
|
27
|
+
) => createValueConfig(() => faker.company.catchPhrase(...options));
|
|
28
|
+
|
|
29
|
+
/** Company [catchPhraseAdjective](https://fakerjs.dev/api/company.html#catchPhraseAdjective) */
|
|
30
|
+
export const catchPhraseAdjective = (
|
|
31
|
+
...options: Parameters<typeof faker.company.catchPhraseAdjective>
|
|
32
|
+
) => createValueConfig(() => faker.company.catchPhraseAdjective(...options));
|
|
33
|
+
|
|
34
|
+
/** Company [catchPhraseDescriptor](https://fakerjs.dev/api/company.html#catchPhraseDescriptor) */
|
|
35
|
+
export const catchPhraseDescriptor = (
|
|
36
|
+
...options: Parameters<typeof faker.company.catchPhraseDescriptor>
|
|
37
|
+
) => createValueConfig(() => faker.company.catchPhraseDescriptor(...options));
|
|
38
|
+
|
|
39
|
+
/** Company [catchPhraseNoun](https://fakerjs.dev/api/company.html#catchPhraseNoun) */
|
|
40
|
+
export const catchPhraseNoun = (
|
|
41
|
+
...options: Parameters<typeof faker.company.catchPhraseNoun>
|
|
42
|
+
) => createValueConfig(() => faker.company.catchPhraseNoun(...options));
|
|
43
|
+
|
|
44
|
+
/** Company [name](https://fakerjs.dev/api/company.html#name) */
|
|
45
|
+
export const name = (...options: Parameters<typeof faker.company.name>) =>
|
|
46
|
+
createValueConfig(() => faker.company.name(...options));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Database [collation](https://fakerjs.dev/api/database.html#collation) */
|
|
5
|
+
export const collation = (
|
|
6
|
+
...options: Parameters<typeof faker.database.collation>
|
|
7
|
+
) => createValueConfig(() => faker.database.collation(...options));
|
|
8
|
+
|
|
9
|
+
/** Database [column](https://fakerjs.dev/api/database.html#column) */
|
|
10
|
+
export const column = (...options: Parameters<typeof faker.database.column>) =>
|
|
11
|
+
createValueConfig(() => faker.database.column(...options));
|
|
12
|
+
|
|
13
|
+
/** Database [engine](https://fakerjs.dev/api/database.html#engine) */
|
|
14
|
+
export const engine = (...options: Parameters<typeof faker.database.engine>) =>
|
|
15
|
+
createValueConfig(() => faker.database.engine(...options));
|
|
16
|
+
|
|
17
|
+
/** Database [mongodbObjectId](https://fakerjs.dev/api/database.html#mongodbObjectId) */
|
|
18
|
+
export const mongodbObjectId = (
|
|
19
|
+
...options: Parameters<typeof faker.database.mongodbObjectId>
|
|
20
|
+
) => createValueConfig(() => faker.database.mongodbObjectId(...options));
|
|
21
|
+
|
|
22
|
+
/** Database [type](https://fakerjs.dev/api/database.html#type) */
|
|
23
|
+
export const type = (...options: Parameters<typeof faker.database.type>) =>
|
|
24
|
+
createValueConfig(() => faker.database.type(...options));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Datatype [boolean](https://fakerjs.dev/api/datatype.html#boolean) */
|
|
5
|
+
export const boolean = (
|
|
6
|
+
...options: Parameters<typeof faker.datatype.boolean>
|
|
7
|
+
) => createValueConfig(() => faker.datatype.boolean(...options));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Datetime [anytime](https://fakerjs.dev/api/date.html#anytime) */
|
|
5
|
+
export const anytime = (...options: Parameters<typeof faker.date.anytime>) =>
|
|
6
|
+
createValueConfig(() => faker.date.anytime(...options));
|
|
7
|
+
|
|
8
|
+
/** Datetime [between](https://fakerjs.dev/api/date.html#between) */
|
|
9
|
+
export const between = (...options: Parameters<typeof faker.date.between>) =>
|
|
10
|
+
createValueConfig(() => faker.date.between(...options));
|
|
11
|
+
|
|
12
|
+
/** Datetime [betweens](https://fakerjs.dev/api/date.html#betweens) */
|
|
13
|
+
export const betweens = (...options: Parameters<typeof faker.date.betweens>) =>
|
|
14
|
+
createValueConfig(() => faker.date.betweens(...options));
|
|
15
|
+
|
|
16
|
+
/** Datetime [birthdate](https://fakerjs.dev/api/date.html#birthdate) */
|
|
17
|
+
export const birthdate = (
|
|
18
|
+
...options: Parameters<typeof faker.date.birthdate>
|
|
19
|
+
) => createValueConfig(() => faker.date.birthdate(...options));
|
|
20
|
+
|
|
21
|
+
/** Datetime [future](https://fakerjs.dev/api/date.html#future) */
|
|
22
|
+
export const future = (...options: Parameters<typeof faker.date.future>) =>
|
|
23
|
+
createValueConfig(() => faker.date.future(...options));
|
|
24
|
+
|
|
25
|
+
/** Datetime [month](https://fakerjs.dev/api/date.html#month) */
|
|
26
|
+
export const month = (...options: Parameters<typeof faker.date.month>) =>
|
|
27
|
+
createValueConfig(() => faker.date.month(...options));
|
|
28
|
+
|
|
29
|
+
/** Datetime [past](https://fakerjs.dev/api/date.html#past) */
|
|
30
|
+
export const past = (...options: Parameters<typeof faker.date.past>) =>
|
|
31
|
+
createValueConfig(() => faker.date.past(...options));
|
|
32
|
+
|
|
33
|
+
/** Datetime [recent](https://fakerjs.dev/api/date.html#recent) */
|
|
34
|
+
export const recent = (...options: Parameters<typeof faker.date.recent>) =>
|
|
35
|
+
createValueConfig(() => faker.date.recent(...options));
|
|
36
|
+
|
|
37
|
+
/** Datetime [soon](https://fakerjs.dev/api/date.html#soon) */
|
|
38
|
+
export const soon = (...options: Parameters<typeof faker.date.soon>) =>
|
|
39
|
+
createValueConfig(() => faker.date.soon(...options));
|
|
40
|
+
|
|
41
|
+
/** Datetime [timeZone](https://fakerjs.dev/api/date.html#timeZone) */
|
|
42
|
+
export const timeZone = (...options: Parameters<typeof faker.date.timeZone>) =>
|
|
43
|
+
createValueConfig(() => faker.date.timeZone(...options));
|
|
44
|
+
|
|
45
|
+
/** Datetime [weekday](https://fakerjs.dev/api/date.html#weekday) */
|
|
46
|
+
export const weekday = (...options: Parameters<typeof faker.date.weekday>) =>
|
|
47
|
+
createValueConfig(() => faker.date.weekday(...options));
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Finance [accountName](https://fakerjs.dev/api/finance.html#accountName) */
|
|
5
|
+
export const accountName = (
|
|
6
|
+
...options: Parameters<typeof faker.finance.accountName>
|
|
7
|
+
) => createValueConfig(() => faker.finance.accountName(...options));
|
|
8
|
+
|
|
9
|
+
/** Finance [accountNumber](https://fakerjs.dev/api/finance.html#accountNumber) */
|
|
10
|
+
export const accountNumber = (
|
|
11
|
+
...options: Parameters<typeof faker.finance.accountNumber>
|
|
12
|
+
) => createValueConfig(() => faker.finance.accountNumber(...options));
|
|
13
|
+
|
|
14
|
+
/** Finance [amount](https://fakerjs.dev/api/finance.html#amount) */
|
|
15
|
+
export const amount = (...options: Parameters<typeof faker.finance.amount>) =>
|
|
16
|
+
createValueConfig(() => faker.finance.amount(...options));
|
|
17
|
+
|
|
18
|
+
/** Finance [bic](https://fakerjs.dev/api/finance.html#bic) */
|
|
19
|
+
export const bic = (...options: Parameters<typeof faker.finance.bic>) =>
|
|
20
|
+
createValueConfig(() => faker.finance.bic(...options));
|
|
21
|
+
|
|
22
|
+
/** Finance [bitcoinAddress](https://fakerjs.dev/api/finance.html#bitcoinAddress) */
|
|
23
|
+
export const bitcoinAddress = (
|
|
24
|
+
...options: Parameters<typeof faker.finance.bitcoinAddress>
|
|
25
|
+
) => createValueConfig(() => faker.finance.bitcoinAddress(...options));
|
|
26
|
+
|
|
27
|
+
/** Finance [creditCardCVV](https://fakerjs.dev/api/finance.html#creditCardCVV) */
|
|
28
|
+
export const creditCardCVV = (
|
|
29
|
+
...options: Parameters<typeof faker.finance.creditCardCVV>
|
|
30
|
+
) => createValueConfig(() => faker.finance.creditCardCVV(...options));
|
|
31
|
+
|
|
32
|
+
/** Finance [creditCardIssuer](https://fakerjs.dev/api/finance.html#creditCardIssuer) */
|
|
33
|
+
export const creditCardIssuer = (
|
|
34
|
+
...options: Parameters<typeof faker.finance.creditCardIssuer>
|
|
35
|
+
) => createValueConfig(() => faker.finance.creditCardIssuer(...options));
|
|
36
|
+
|
|
37
|
+
/** Finance [creditCardNumber](https://fakerjs.dev/api/finance.html#creditCardNumber) */
|
|
38
|
+
export const creditCardNumber = (
|
|
39
|
+
...options: Parameters<typeof faker.finance.creditCardNumber>
|
|
40
|
+
) => createValueConfig(() => faker.finance.creditCardNumber(...options));
|
|
41
|
+
|
|
42
|
+
/** Finance [currency](https://fakerjs.dev/api/finance.html#currency) */
|
|
43
|
+
export const currency = (
|
|
44
|
+
...options: Parameters<typeof faker.finance.currency>
|
|
45
|
+
) => createValueConfig(() => faker.finance.currency(...options));
|
|
46
|
+
|
|
47
|
+
/** Finance [currencyCode](https://fakerjs.dev/api/finance.html#currencyCode) */
|
|
48
|
+
export const currencyCode = (
|
|
49
|
+
...options: Parameters<typeof faker.finance.currencyCode>
|
|
50
|
+
) => createValueConfig(() => faker.finance.currencyCode(...options));
|
|
51
|
+
|
|
52
|
+
/** Finance [currencySymbol](https://fakerjs.dev/api/finance.html#currencySymbol) */
|
|
53
|
+
export const currencySymbol = (
|
|
54
|
+
...options: Parameters<typeof faker.finance.currencySymbol>
|
|
55
|
+
) => createValueConfig(() => faker.finance.currencySymbol(...options));
|
|
56
|
+
|
|
57
|
+
/** Finance [ethereumAddress](https://fakerjs.dev/api/finance.html#ethereumAddress) */
|
|
58
|
+
export const ethereumAddress = (
|
|
59
|
+
...options: Parameters<typeof faker.finance.ethereumAddress>
|
|
60
|
+
) => createValueConfig(() => faker.finance.ethereumAddress(...options));
|
|
61
|
+
|
|
62
|
+
/** Finance [iban](https://fakerjs.dev/api/finance.html#iban) */
|
|
63
|
+
export const iban = (...options: Parameters<typeof faker.finance.iban>) =>
|
|
64
|
+
createValueConfig(() => faker.finance.iban(...options));
|
|
65
|
+
|
|
66
|
+
/** Finance [litecoinAddress](https://fakerjs.dev/api/finance.html#litecoinAddress) */
|
|
67
|
+
export const litecoinAddress = (
|
|
68
|
+
...options: Parameters<typeof faker.finance.litecoinAddress>
|
|
69
|
+
) => createValueConfig(() => faker.finance.litecoinAddress(...options));
|
|
70
|
+
|
|
71
|
+
/** Finance [maskedNumber](https://fakerjs.dev/api/finance.html#maskedNumber) */
|
|
72
|
+
export const maskedNumber = (
|
|
73
|
+
...options: Parameters<typeof faker.finance.maskedNumber>
|
|
74
|
+
) => createValueConfig(() => faker.finance.maskedNumber(...options));
|
|
75
|
+
|
|
76
|
+
/** Finance [pin](https://fakerjs.dev/api/finance.html#pin) */
|
|
77
|
+
export const pin = (...options: Parameters<typeof faker.finance.pin>) =>
|
|
78
|
+
createValueConfig(() => faker.finance.pin(...options));
|
|
79
|
+
|
|
80
|
+
/** Finance [routingNumber](https://fakerjs.dev/api/finance.html#routingNumber) */
|
|
81
|
+
export const routingNumber = (
|
|
82
|
+
...options: Parameters<typeof faker.finance.routingNumber>
|
|
83
|
+
) => createValueConfig(() => faker.finance.routingNumber(...options));
|
|
84
|
+
|
|
85
|
+
/** Finance [transactionDescription](https://fakerjs.dev/api/finance.html#transactionDescription) */
|
|
86
|
+
export const transactionDescription = (
|
|
87
|
+
...options: Parameters<typeof faker.finance.transactionDescription>
|
|
88
|
+
) => createValueConfig(() => faker.finance.transactionDescription(...options));
|
|
89
|
+
|
|
90
|
+
/** Finance [transactionType](https://fakerjs.dev/api/finance.html#transactionType) */
|
|
91
|
+
export const transactionType = (
|
|
92
|
+
...options: Parameters<typeof faker.finance.transactionType>
|
|
93
|
+
) => createValueConfig(() => faker.finance.transactionType(...options));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** [Airline](https://fakerjs.dev/api/airline.html) */
|
|
2
|
+
export * as Airline from "./airline";
|
|
3
|
+
|
|
4
|
+
/** [Animal](https://fakerjs.dev/api/animal.html) */
|
|
5
|
+
export * as Animal from "./animal";
|
|
6
|
+
|
|
7
|
+
/** [Color](https://fakerjs.dev/api/color.html) */
|
|
8
|
+
export * as Color from "./color";
|
|
9
|
+
|
|
10
|
+
/** [Commerce](https://fakerjs.dev/api/commerce.html) */
|
|
11
|
+
export * as Commerce from "./commerce";
|
|
12
|
+
|
|
13
|
+
/** [Common](https://fakerjs.dev/api/common.html) */
|
|
14
|
+
export * as Common from "./common";
|
|
15
|
+
|
|
16
|
+
/** [Company](https://fakerjs.dev/api/company.html) */
|
|
17
|
+
export * as Company from "./company";
|
|
18
|
+
|
|
19
|
+
/** [Database](https://fakerjs.dev/api/database.html) */
|
|
20
|
+
export * as Database from "./database";
|
|
21
|
+
|
|
22
|
+
/** [Datatype](https://fakerjs.dev/api/datatype.html) */
|
|
23
|
+
export * as Datatype from "./datatype";
|
|
24
|
+
|
|
25
|
+
/** [DateTime](https://fakerjs.dev/api/date.html) */
|
|
26
|
+
export * as DateTime from "./datetime";
|
|
27
|
+
|
|
28
|
+
/** [Finance](https://fakerjs.dev/api/finance.html) */
|
|
29
|
+
export * as Finance from "./finance";
|
|
30
|
+
|
|
31
|
+
/** [Lorem](https://fakerjs.dev/api/lorem.html) */
|
|
32
|
+
export * as Lorem from "./lorem";
|
|
33
|
+
|
|
34
|
+
/** [Number](https://fakerjs.dev/api/number.html) */
|
|
35
|
+
export * as Number from "./number";
|
|
36
|
+
|
|
37
|
+
/** [Person](https://fakerjs.dev/api/person.html) */
|
|
38
|
+
export * as Person from "./person";
|
|
39
|
+
|
|
40
|
+
/** [Phone](https://fakerjs.dev/api/phone.html) */
|
|
41
|
+
export * as Phone from "./phone";
|
|
42
|
+
|
|
43
|
+
/** [String](https://fakerjs.dev/api/string.html) */
|
|
44
|
+
export * as String from "./string";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Lorem [lines](https://fakerjs.dev/api/lorem.html#lines) */
|
|
5
|
+
export const lines = (...options: Parameters<typeof faker.lorem.lines>) =>
|
|
6
|
+
createValueConfig(() => faker.lorem.lines(...options));
|
|
7
|
+
|
|
8
|
+
/** Lorem [paragraph](https://fakerjs.dev/api/lorem.html#paragraph) */
|
|
9
|
+
export const paragraph = (
|
|
10
|
+
...options: Parameters<typeof faker.lorem.paragraph>
|
|
11
|
+
) => createValueConfig(() => faker.lorem.paragraph(...options));
|
|
12
|
+
|
|
13
|
+
/** Lorem [paragraphs](https://fakerjs.dev/api/lorem.html#paragraphs) */
|
|
14
|
+
export const paragraphs = (
|
|
15
|
+
...options: Parameters<typeof faker.lorem.paragraphs>
|
|
16
|
+
) => createValueConfig(() => faker.lorem.paragraphs(...options));
|
|
17
|
+
|
|
18
|
+
/** Lorem [sentence](https://fakerjs.dev/api/lorem.html#sentence) */
|
|
19
|
+
export const sentence = (...options: Parameters<typeof faker.lorem.sentence>) =>
|
|
20
|
+
createValueConfig(() => faker.lorem.sentence(...options));
|
|
21
|
+
|
|
22
|
+
/** Lorem [sentences](https://fakerjs.dev/api/lorem.html#sentences) */
|
|
23
|
+
export const sentences = (
|
|
24
|
+
...options: Parameters<typeof faker.lorem.sentences>
|
|
25
|
+
) => createValueConfig(() => faker.lorem.sentences(...options));
|
|
26
|
+
|
|
27
|
+
/** Lorem [slug](https://fakerjs.dev/api/lorem.html#slug) */
|
|
28
|
+
export const slug = (...options: Parameters<typeof faker.lorem.slug>) =>
|
|
29
|
+
createValueConfig(() => faker.lorem.slug(...options));
|
|
30
|
+
|
|
31
|
+
/** Lorem [text](https://fakerjs.dev/api/lorem.html#text) */
|
|
32
|
+
export const text = (...options: Parameters<typeof faker.lorem.text>) =>
|
|
33
|
+
createValueConfig(() => faker.lorem.text(...options));
|
|
34
|
+
|
|
35
|
+
/** Lorem [word](https://fakerjs.dev/api/lorem.html#word) */
|
|
36
|
+
export const word = (...options: Parameters<typeof faker.lorem.word>) =>
|
|
37
|
+
createValueConfig(() => faker.lorem.word(...options));
|
|
38
|
+
|
|
39
|
+
/** Lorem [words](https://fakerjs.dev/api/lorem.html#words) */
|
|
40
|
+
export const words = (...options: Parameters<typeof faker.lorem.words>) =>
|
|
41
|
+
createValueConfig(() => faker.lorem.words(...options));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Number [bigInt](https://fakerjs.dev/api/number.html#bigInt) */
|
|
5
|
+
export const bigInt = (...options: Parameters<typeof faker.number.bigInt>) =>
|
|
6
|
+
createValueConfig(() => faker.number.bigInt(...options));
|
|
7
|
+
|
|
8
|
+
/** Number [binary](https://fakerjs.dev/api/number.html#binary) */
|
|
9
|
+
export const binary = (...options: Parameters<typeof faker.number.binary>) =>
|
|
10
|
+
createValueConfig(() => faker.number.binary(...options));
|
|
11
|
+
|
|
12
|
+
/** Number [float](https://fakerjs.dev/api/number.html#float) */
|
|
13
|
+
export const float = (...options: Parameters<typeof faker.number.float>) =>
|
|
14
|
+
createValueConfig(() => faker.number.float(...options));
|
|
15
|
+
|
|
16
|
+
/** Number [hex](https://fakerjs.dev/api/number.html#hex) */
|
|
17
|
+
export const hex = (...options: Parameters<typeof faker.number.hex>) =>
|
|
18
|
+
createValueConfig(() => faker.number.hex(...options));
|
|
19
|
+
|
|
20
|
+
/** Number [int](https://fakerjs.dev/api/number.html#int) */
|
|
21
|
+
export const int = (...options: Parameters<typeof faker.number.int>) =>
|
|
22
|
+
createValueConfig(() => faker.number.int(...options));
|
|
23
|
+
|
|
24
|
+
/** Number [octal](https://fakerjs.dev/api/number.html#octal) */
|
|
25
|
+
export const octal = (...options: Parameters<typeof faker.number.octal>) =>
|
|
26
|
+
createValueConfig(() => faker.number.octal(...options));
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Person [bio](https://fakerjs.dev/api/person.html#bio) */
|
|
5
|
+
export const bio = (...options: Parameters<typeof faker.person.bio>) =>
|
|
6
|
+
createValueConfig(() => faker.person.bio(...options));
|
|
7
|
+
|
|
8
|
+
/** Person [firstName](https://fakerjs.dev/api/person.html#firstName) */
|
|
9
|
+
export const firstName = (
|
|
10
|
+
...options: Parameters<typeof faker.person.firstName>
|
|
11
|
+
) => createValueConfig(() => faker.person.firstName(...options));
|
|
12
|
+
|
|
13
|
+
/** Person [fullName](https://fakerjs.dev/api/person.html#fullName) */
|
|
14
|
+
export const fullName = (
|
|
15
|
+
...options: Parameters<typeof faker.person.fullName>
|
|
16
|
+
) => createValueConfig(() => faker.person.fullName(...options));
|
|
17
|
+
|
|
18
|
+
/** Person [gender](https://fakerjs.dev/api/person.html#gender) */
|
|
19
|
+
export const gender = (...options: Parameters<typeof faker.person.gender>) =>
|
|
20
|
+
createValueConfig(() => faker.person.gender(...options));
|
|
21
|
+
|
|
22
|
+
/** Person [jobArea](https://fakerjs.dev/api/person.html#jobArea) */
|
|
23
|
+
export const jobArea = (...options: Parameters<typeof faker.person.jobArea>) =>
|
|
24
|
+
createValueConfig(() => faker.person.jobArea(...options));
|
|
25
|
+
|
|
26
|
+
/** Person [jobDescriptor](https://fakerjs.dev/api/person.html#jobDescriptor) */
|
|
27
|
+
export const jobDescriptor = (
|
|
28
|
+
...options: Parameters<typeof faker.person.jobDescriptor>
|
|
29
|
+
) => createValueConfig(() => faker.person.bio(...options));
|
|
30
|
+
|
|
31
|
+
/** Person [jobTitle](https://fakerjs.dev/api/person.html#jobTitle) */
|
|
32
|
+
export const jobTitle = (
|
|
33
|
+
...options: Parameters<typeof faker.person.jobTitle>
|
|
34
|
+
) => createValueConfig(() => faker.person.jobTitle(...options));
|
|
35
|
+
|
|
36
|
+
/** Person [jobType](https://fakerjs.dev/api/person.html#jobType) */
|
|
37
|
+
export const jobType = (...options: Parameters<typeof faker.person.jobType>) =>
|
|
38
|
+
createValueConfig(() => faker.person.jobType(...options));
|
|
39
|
+
|
|
40
|
+
/** Person [lastName](https://fakerjs.dev/api/person.html#lastName) */
|
|
41
|
+
export const lastName = (
|
|
42
|
+
...options: Parameters<typeof faker.person.lastName>
|
|
43
|
+
) => createValueConfig(() => faker.person.lastName(...options));
|
|
44
|
+
|
|
45
|
+
/** Person [middleName](https://fakerjs.dev/api/person.html#middleName) */
|
|
46
|
+
export const middleName = (
|
|
47
|
+
...options: Parameters<typeof faker.person.middleName>
|
|
48
|
+
) => createValueConfig(() => faker.person.middleName(...options));
|
|
49
|
+
|
|
50
|
+
/** Person [prefix](https://fakerjs.dev/api/person.html#prefix) */
|
|
51
|
+
export const prefix = (...options: Parameters<typeof faker.person.prefix>) =>
|
|
52
|
+
createValueConfig(() => faker.person.prefix(...options));
|
|
53
|
+
|
|
54
|
+
/** Person [sex](https://fakerjs.dev/api/person.html#sex) */
|
|
55
|
+
export const sex = (...options: Parameters<typeof faker.person.sex>) =>
|
|
56
|
+
createValueConfig(() => faker.person.sex(...options));
|
|
57
|
+
|
|
58
|
+
/** Person [sexType](https://fakerjs.dev/api/person.html#sexType) */
|
|
59
|
+
export const sexType = (...options: Parameters<typeof faker.person.sexType>) =>
|
|
60
|
+
createValueConfig(() => faker.person.sexType(...options));
|
|
61
|
+
|
|
62
|
+
/** Person [suffix](https://fakerjs.dev/api/person.html#suffix) */
|
|
63
|
+
export const suffix = (...options: Parameters<typeof faker.person.suffix>) =>
|
|
64
|
+
createValueConfig(() => faker.person.suffix(...options));
|
|
65
|
+
|
|
66
|
+
/** Person [zodiacSign](https://fakerjs.dev/api/person.html#zodiacSign) */
|
|
67
|
+
export const zodiacSign = (
|
|
68
|
+
...options: Parameters<typeof faker.person.zodiacSign>
|
|
69
|
+
) => createValueConfig(() => faker.person.zodiacSign(...options));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Phone [imei](https://fakerjs.dev/api/phone.html#imei) */
|
|
5
|
+
export const imei = (...options: Parameters<typeof faker.phone.imei>) =>
|
|
6
|
+
createValueConfig(() => faker.phone.imei(...options));
|
|
7
|
+
|
|
8
|
+
/** Phone [number](https://fakerjs.dev/api/phone.html#number) */
|
|
9
|
+
export const number = (...options: Parameters<typeof faker.phone.number>) =>
|
|
10
|
+
createValueConfig(() => faker.phone.number(...options));
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** String [alpha](https://fakerjs.dev/api/string.html#alpha) */
|
|
5
|
+
export const alpha = (...options: Parameters<typeof faker.string.alpha>) =>
|
|
6
|
+
createValueConfig(() => faker.string.alpha(...options));
|
|
7
|
+
|
|
8
|
+
/** String [alphanumeric](https://fakerjs.dev/api/string.html#alphanumeric) */
|
|
9
|
+
export const alphanumeric = (
|
|
10
|
+
...options: Parameters<typeof faker.string.alphanumeric>
|
|
11
|
+
) => createValueConfig(() => faker.string.alphanumeric(...options));
|
|
12
|
+
|
|
13
|
+
/** String [binary](https://fakerjs.dev/api/string.html#binary) */
|
|
14
|
+
export const binary = (...options: Parameters<typeof faker.string.binary>) =>
|
|
15
|
+
createValueConfig(() => faker.string.binary(...options));
|
|
16
|
+
|
|
17
|
+
/** String [fromCharacters](https://fakerjs.dev/api/string.html#fromCharacters) */
|
|
18
|
+
export const fromCharacters = (
|
|
19
|
+
...options: Parameters<typeof faker.string.fromCharacters>
|
|
20
|
+
) => createValueConfig(() => faker.string.fromCharacters(...options));
|
|
21
|
+
|
|
22
|
+
/** String [hexadecimal](https://fakerjs.dev/api/string.html#hexadecimal) */
|
|
23
|
+
export const hexadecimal = (
|
|
24
|
+
...options: Parameters<typeof faker.string.hexadecimal>
|
|
25
|
+
) => createValueConfig(() => faker.string.hexadecimal(...options));
|
|
26
|
+
|
|
27
|
+
/** String [nanoid](https://fakerjs.dev/api/string.html#nanoid) */
|
|
28
|
+
export const nanoid = (...options: Parameters<typeof faker.string.nanoid>) =>
|
|
29
|
+
createValueConfig(() => faker.string.nanoid(...options));
|
|
30
|
+
|
|
31
|
+
/** String [octal](https://fakerjs.dev/api/string.html#octal) */
|
|
32
|
+
export const octal = (...options: Parameters<typeof faker.string.octal>) =>
|
|
33
|
+
createValueConfig(() => faker.string.octal(...options));
|
|
34
|
+
|
|
35
|
+
/** String [sample](https://fakerjs.dev/api/string.html#sample) */
|
|
36
|
+
export const sample = (...options: Parameters<typeof faker.string.sample>) =>
|
|
37
|
+
createValueConfig(() => faker.string.sample(...options));
|
|
38
|
+
|
|
39
|
+
/** String [symbol](https://fakerjs.dev/api/string.html#symbol) */
|
|
40
|
+
export const symbol = (...options: Parameters<typeof faker.string.symbol>) =>
|
|
41
|
+
createValueConfig(() => faker.string.symbol(...options));
|
|
42
|
+
|
|
43
|
+
/** String [uuid](https://fakerjs.dev/api/string.html#uuid) */
|
|
44
|
+
export const uuid = (...options: Parameters<typeof faker.string.uuid>) =>
|
|
45
|
+
createValueConfig(() => faker.string.uuid(...options));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { createValueConfig } from "../create_config";
|
|
3
|
+
|
|
4
|
+
/** Word [adjective](https://fakerjs.dev/word.html#adjective) */
|
|
5
|
+
export const adjective = (
|
|
6
|
+
...options: Parameters<typeof faker.word.adjective>
|
|
7
|
+
) => createValueConfig(() => faker.word.adjective(...options));
|
|
8
|
+
|
|
9
|
+
/** Word [adverb](https://fakerjs.dev/word.html#adverb) */
|
|
10
|
+
export const adverb = (...options: Parameters<typeof faker.word.adverb>) =>
|
|
11
|
+
createValueConfig(() => faker.word.adverb(...options));
|
|
12
|
+
|
|
13
|
+
/** Word [conjunction](https://fakerjs.dev/word.html#conjunction) */
|
|
14
|
+
export const conjunction = (
|
|
15
|
+
...options: Parameters<typeof faker.word.conjunction>
|
|
16
|
+
) => createValueConfig(() => faker.word.conjunction(...options));
|
|
17
|
+
|
|
18
|
+
/** Word [interjection](https://fakerjs.dev/word.html#interjection) */
|
|
19
|
+
export const interjection = (
|
|
20
|
+
...options: Parameters<typeof faker.word.interjection>
|
|
21
|
+
) => createValueConfig(() => faker.word.interjection(...options));
|
|
22
|
+
|
|
23
|
+
/** Word [noun](https://fakerjs.dev/word.html#noun) */
|
|
24
|
+
export const noun = (...options: Parameters<typeof faker.word.noun>) =>
|
|
25
|
+
createValueConfig(() => faker.word.noun(...options));
|
|
26
|
+
|
|
27
|
+
/** Word [preposition](https://fakerjs.dev/word.html#preposition) */
|
|
28
|
+
export const preposition = (
|
|
29
|
+
...options: Parameters<typeof faker.word.preposition>
|
|
30
|
+
) => createValueConfig(() => faker.word.preposition(...options));
|
|
31
|
+
|
|
32
|
+
/** Word [sample](https://fakerjs.dev/word.html#sample) */
|
|
33
|
+
export const sample = (...options: Parameters<typeof faker.word.sample>) =>
|
|
34
|
+
createValueConfig(() => faker.word.sample(...options));
|
|
35
|
+
|
|
36
|
+
/** Word [verb](https://fakerjs.dev/word.html#verb) */
|
|
37
|
+
export const verb = (...options: Parameters<typeof faker.word.verb>) =>
|
|
38
|
+
createValueConfig(() => faker.word.verb(...options));
|
|
39
|
+
|
|
40
|
+
/** Word [words](https://fakerjs.dev/word.html#words) */
|
|
41
|
+
export const words = (...options: Parameters<typeof faker.word.words>) =>
|
|
42
|
+
createValueConfig(() => faker.word.words(...options));
|