struct-fakerator 2.4.5 → 2.4.7
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/dist/chunk-3FFGDXA5.mjs +48 -0
- package/dist/{chunk-HADENNJW.js → chunk-3MYH2PDS.js} +5 -3
- package/dist/chunk-4ESFUYHU.js +48 -0
- package/dist/chunk-4XQBQAPC.mjs +33 -0
- package/dist/{chunk-J266ZY25.mjs → chunk-5M3DUBFV.mjs} +6 -4
- package/dist/chunk-62NUC6UZ.js +51 -0
- package/dist/chunk-7IQW6MWT.mjs +81 -0
- package/dist/{chunk-TX7HRLKE.mjs → chunk-7V3T6MQ3.mjs} +5 -3
- package/dist/chunk-AWKBY27N.js +35 -0
- package/dist/{chunk-7R4M2AAS.js → chunk-BGE4WZH7.js} +6 -4
- package/dist/chunk-BNUCXH6Q.js +49 -0
- package/dist/{chunk-YY2TF7WC.mjs → chunk-CC255UJD.mjs} +7 -5
- package/dist/chunk-CK65OFQQ.mjs +56 -0
- package/dist/chunk-FG2O523S.js +48 -0
- package/dist/chunk-GF4PSVJ7.js +81 -0
- package/dist/{chunk-7YNCYSJY.js → chunk-GL777PKT.js} +4 -2
- package/dist/{chunk-BXJJGEM5.js → chunk-GR5EJCJ2.js} +5 -3
- package/dist/chunk-HAIK2LXD.js +63 -0
- package/dist/chunk-HK4L636Y.mjs +49 -0
- package/dist/chunk-HMGGQ5ZJ.js +45 -0
- package/dist/chunk-IZVHA6FO.js +45 -0
- package/dist/{chunk-CFX43E3I.mjs → chunk-JFYN4RCQ.mjs} +6 -4
- package/dist/{chunk-LBQLRQOQ.js → chunk-KB4QNLUX.js} +7 -5
- package/dist/chunk-KK4QURZV.mjs +63 -0
- package/dist/chunk-KLYK2EDS.js +18 -0
- package/dist/chunk-L63CILKL.js +36 -0
- package/dist/chunk-LCQV5ZXR.js +63 -0
- package/dist/chunk-M7SBPX3E.mjs +45 -0
- package/dist/chunk-MJWNNESP.js +57 -0
- package/dist/chunk-MKTV5ZCC.mjs +30 -0
- package/dist/chunk-MNRDBDJD.js +33 -0
- package/dist/chunk-MTNLYYS2.mjs +51 -0
- package/dist/chunk-NPYKAZ5O.mjs +42 -0
- package/dist/chunk-PS673ZMG.mjs +78 -0
- package/dist/chunk-RCDDW7NN.js +36 -0
- package/dist/chunk-RWSXJDFQ.mjs +57 -0
- package/dist/chunk-SAYLPMKP.js +74 -0
- package/dist/chunk-SOFVWH6A.js +56 -0
- package/dist/chunk-T4IVAGFU.mjs +48 -0
- package/dist/chunk-TKS2PTMF.mjs +18 -0
- package/dist/chunk-UOSN6FPU.js +42 -0
- package/dist/chunk-V4JFB4H6.mjs +45 -0
- package/dist/chunk-XJ3B37LJ.js +45 -0
- package/dist/chunk-XKWYGGIM.mjs +36 -0
- package/dist/chunk-XMR5DWYS.mjs +74 -0
- package/dist/chunk-XYNVAWSB.mjs +45 -0
- package/dist/chunk-YNT5L5UH.js +78 -0
- package/dist/chunk-YRRALMO4.mjs +36 -0
- package/dist/chunk-Z5HPFZ65.mjs +35 -0
- package/dist/chunk-ZKVLWCGR.mjs +63 -0
- package/dist/utils/airline.js +3 -2
- package/dist/utils/airline.mjs +2 -1
- package/dist/utils/animal.js +3 -2
- package/dist/utils/animal.mjs +2 -1
- package/dist/utils/color.js +3 -2
- package/dist/utils/color.mjs +2 -1
- package/dist/utils/commerce.js +3 -2
- package/dist/utils/commerce.mjs +2 -1
- package/dist/utils/company.js +3 -2
- package/dist/utils/company.mjs +2 -1
- package/dist/utils/database.js +3 -2
- package/dist/utils/database.mjs +2 -1
- package/dist/utils/datatype.js +3 -2
- package/dist/utils/datatype.mjs +2 -1
- package/dist/utils/datetime.js +3 -2
- package/dist/utils/datetime.mjs +2 -1
- package/dist/utils/finance.js +3 -2
- package/dist/utils/finance.mjs +2 -1
- package/dist/utils/food.js +3 -2
- package/dist/utils/food.mjs +2 -1
- package/dist/utils/git.js +3 -2
- package/dist/utils/git.mjs +2 -1
- package/dist/utils/hacker.js +3 -2
- package/dist/utils/hacker.mjs +2 -1
- package/dist/utils/image.js +3 -2
- package/dist/utils/image.mjs +2 -1
- package/dist/utils/index.d.mts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +29 -25
- package/dist/utils/index.mjs +29 -25
- package/dist/utils/internet.js +3 -2
- package/dist/utils/internet.mjs +2 -1
- package/dist/utils/location.js +3 -2
- package/dist/utils/location.mjs +2 -1
- package/dist/utils/lorem.js +3 -2
- package/dist/utils/lorem.mjs +2 -1
- package/dist/utils/music.js +3 -2
- package/dist/utils/music.mjs +2 -1
- package/dist/utils/number.js +3 -2
- package/dist/utils/number.mjs +2 -1
- package/dist/utils/person.js +3 -2
- package/dist/utils/person.mjs +2 -1
- package/dist/utils/phone.js +3 -2
- package/dist/utils/phone.mjs +2 -1
- package/dist/utils/science.js +3 -2
- package/dist/utils/science.mjs +2 -1
- package/dist/utils/string.js +3 -2
- package/dist/utils/string.mjs +2 -1
- package/dist/utils/system.js +3 -2
- package/dist/utils/system.mjs +2 -1
- package/dist/utils/utils.d.mts +2 -0
- package/dist/utils/utils.d.ts +2 -0
- package/dist/utils/utils.js +7 -0
- package/dist/utils/utils.mjs +7 -0
- package/dist/utils/vehicle.js +3 -2
- package/dist/utils/vehicle.mjs +2 -1
- package/dist/utils/word.js +12 -11
- package/dist/utils/word.mjs +13 -12
- package/dist/utils-BiDlGzTl.d.mts +10 -0
- package/dist/utils-DinJc3Cq.d.ts +10 -0
- package/package.json +13 -13
- package/src/utils/airline.ts +4 -9
- package/src/utils/animal.ts +16 -33
- package/src/utils/color.ts +18 -26
- package/src/utils/commerce.ts +15 -23
- package/src/utils/company.ts +14 -27
- package/src/utils/database.ts +8 -13
- package/src/utils/datatype.ts +2 -4
- package/src/utils/datetime.ts +12 -24
- package/src/utils/finance.ts +26 -54
- package/src/utils/food.ts +10 -24
- package/src/utils/git.ts +6 -14
- package/src/utils/hacker.ts +7 -15
- package/src/utils/image.ts +9 -22
- package/src/utils/index.ts +2 -0
- package/src/utils/internet.ts +21 -52
- package/src/utils/location.ts +25 -45
- package/src/utils/lorem.ts +10 -22
- package/src/utils/music.ts +5 -9
- package/src/utils/number.ts +7 -13
- package/src/utils/person.ts +16 -38
- package/src/utils/phone.ts +3 -5
- package/src/utils/science.ts +3 -6
- package/src/utils/string.ts +11 -24
- package/src/utils/system.ts +15 -34
- package/src/utils/utils.ts +8 -0
- package/src/utils/vehicle.ts +10 -20
- package/src/utils/word.ts +10 -23
- package/dist/chunk-2R3Q64AD.mjs +0 -28
- package/dist/chunk-5U5KT6H4.js +0 -61
- package/dist/chunk-7GE2A5VT.mjs +0 -43
- package/dist/chunk-A5HM6XTD.js +0 -76
- package/dist/chunk-AONYMB6O.mjs +0 -40
- package/dist/chunk-ARUJ7L4V.mjs +0 -64
- package/dist/chunk-BB5LVHI7.mjs +0 -46
- package/dist/chunk-BELV2S6H.js +0 -46
- package/dist/chunk-D7PC2EQM.mjs +0 -73
- package/dist/chunk-DF3HCW6W.js +0 -43
- package/dist/chunk-DVBKP7FB.mjs +0 -31
- package/dist/chunk-EDATUWC4.js +0 -40
- package/dist/chunk-FLNVEEY2.mjs +0 -34
- package/dist/chunk-GE7QO474.js +0 -64
- package/dist/chunk-H4XUR4CP.mjs +0 -34
- package/dist/chunk-HHL3SY7A.js +0 -34
- package/dist/chunk-HOVGSNA4.js +0 -73
- package/dist/chunk-J3IXKUJK.js +0 -61
- package/dist/chunk-J5ZX7PK3.js +0 -34
- package/dist/chunk-L7PFM742.mjs +0 -49
- package/dist/chunk-LJKI4ZZ5.mjs +0 -43
- package/dist/chunk-M2J3MAM7.mjs +0 -52
- package/dist/chunk-NEE5QKPY.mjs +0 -40
- package/dist/chunk-P65FYBLE.mjs +0 -61
- package/dist/chunk-PVPH6A5C.mjs +0 -43
- package/dist/chunk-RKTNWUZK.js +0 -43
- package/dist/chunk-S73SWVKV.js +0 -31
- package/dist/chunk-SYSS7JTS.js +0 -49
- package/dist/chunk-T5JPOARU.js +0 -40
- package/dist/chunk-USSK73G6.js +0 -43
- package/dist/chunk-VCWW76K4.mjs +0 -61
- package/dist/chunk-WJ5EC6UN.js +0 -49
- package/dist/chunk-X5TOZB77.mjs +0 -43
- package/dist/chunk-XPZ47TRN.js +0 -52
- package/dist/chunk-YJWVP2PN.mjs +0 -31
- package/dist/chunk-YQWQUNOA.js +0 -31
- package/dist/chunk-YTTIRC5J.mjs +0 -49
- package/dist/chunk-ZPQWZLYI.js +0 -43
- package/dist/chunk-ZRQDW34U.mjs +0 -76
package/src/utils/finance.ts
CHANGED
|
@@ -1,93 +1,65 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
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));
|
|
5
|
+
export const accountName = makeValueConfigFn(faker.finance.accountName);
|
|
8
6
|
|
|
9
7
|
/** 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));
|
|
8
|
+
export const accountNumber = makeValueConfigFn(faker.finance.accountNumber);
|
|
13
9
|
|
|
14
10
|
/** Finance [amount](https://fakerjs.dev/api/finance.html#amount) */
|
|
15
|
-
export const amount = (
|
|
16
|
-
createValueConfig(() => faker.finance.amount(...options));
|
|
11
|
+
export const amount = makeValueConfigFn(faker.finance.amount);
|
|
17
12
|
|
|
18
13
|
/** Finance [bic](https://fakerjs.dev/api/finance.html#bic) */
|
|
19
|
-
export const bic = (
|
|
20
|
-
createValueConfig(() => faker.finance.bic(...options));
|
|
14
|
+
export const bic = makeValueConfigFn(faker.finance.bic);
|
|
21
15
|
|
|
22
16
|
/** 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));
|
|
17
|
+
export const bitcoinAddress = makeValueConfigFn(faker.finance.bitcoinAddress);
|
|
26
18
|
|
|
27
19
|
/** 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));
|
|
20
|
+
export const creditCardCVV = makeValueConfigFn(faker.finance.creditCardCVV);
|
|
31
21
|
|
|
32
22
|
/** Finance [creditCardIssuer](https://fakerjs.dev/api/finance.html#creditCardIssuer) */
|
|
33
|
-
export const creditCardIssuer = (
|
|
34
|
-
|
|
35
|
-
)
|
|
23
|
+
export const creditCardIssuer = makeValueConfigFn(
|
|
24
|
+
faker.finance.creditCardIssuer,
|
|
25
|
+
);
|
|
36
26
|
|
|
37
27
|
/** Finance [creditCardNumber](https://fakerjs.dev/api/finance.html#creditCardNumber) */
|
|
38
|
-
export const creditCardNumber = (
|
|
39
|
-
|
|
40
|
-
)
|
|
28
|
+
export const creditCardNumber = makeValueConfigFn(
|
|
29
|
+
faker.finance.creditCardNumber,
|
|
30
|
+
);
|
|
41
31
|
|
|
42
32
|
/** 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));
|
|
33
|
+
export const currency = makeValueConfigFn(faker.finance.currency);
|
|
46
34
|
|
|
47
35
|
/** 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));
|
|
36
|
+
export const currencyCode = makeValueConfigFn(faker.finance.currencyCode);
|
|
51
37
|
|
|
52
38
|
/** 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));
|
|
39
|
+
export const currencySymbol = makeValueConfigFn(faker.finance.currencySymbol);
|
|
56
40
|
|
|
57
41
|
/** 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));
|
|
42
|
+
export const ethereumAddress = makeValueConfigFn(faker.finance.ethereumAddress);
|
|
61
43
|
|
|
62
44
|
/** Finance [iban](https://fakerjs.dev/api/finance.html#iban) */
|
|
63
|
-
export const iban = (
|
|
64
|
-
createValueConfig(() => faker.finance.iban(...options));
|
|
45
|
+
export const iban = makeValueConfigFn(faker.finance.iban);
|
|
65
46
|
|
|
66
47
|
/** 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));
|
|
48
|
+
export const litecoinAddress = makeValueConfigFn(faker.finance.litecoinAddress);
|
|
70
49
|
|
|
71
50
|
/** 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));
|
|
51
|
+
export const maskedNumber = makeValueConfigFn(faker.finance.maskedNumber);
|
|
75
52
|
|
|
76
53
|
/** Finance [pin](https://fakerjs.dev/api/finance.html#pin) */
|
|
77
|
-
export const pin = (
|
|
78
|
-
createValueConfig(() => faker.finance.pin(...options));
|
|
54
|
+
export const pin = makeValueConfigFn(faker.finance.pin);
|
|
79
55
|
|
|
80
56
|
/** 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));
|
|
57
|
+
export const routingNumber = makeValueConfigFn(faker.finance.routingNumber);
|
|
84
58
|
|
|
85
59
|
/** Finance [transactionDescription](https://fakerjs.dev/api/finance.html#transactionDescription) */
|
|
86
|
-
export const transactionDescription = (
|
|
87
|
-
|
|
88
|
-
)
|
|
60
|
+
export const transactionDescription = makeValueConfigFn(
|
|
61
|
+
faker.finance.transactionDescription,
|
|
62
|
+
);
|
|
89
63
|
|
|
90
64
|
/** 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));
|
|
65
|
+
export const transactionType = makeValueConfigFn(faker.finance.transactionType);
|
package/src/utils/food.ts
CHANGED
|
@@ -1,43 +1,29 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Food [adjective](https://fakerjs.dev/api/food.html#adjective) */
|
|
5
|
-
export const adjective = (
|
|
6
|
-
...options: Parameters<typeof faker.food.adjective>
|
|
7
|
-
) => createValueConfig(() => faker.food.adjective(...options));
|
|
5
|
+
export const adjective = makeValueConfigFn(faker.food.adjective);
|
|
8
6
|
|
|
9
7
|
/** Food [description](https://fakerjs.dev/api/food.html#description) */
|
|
10
|
-
export const description = (
|
|
11
|
-
...options: Parameters<typeof faker.food.description>
|
|
12
|
-
) => createValueConfig(() => faker.food.description(...options));
|
|
8
|
+
export const description = makeValueConfigFn(faker.food.description);
|
|
13
9
|
|
|
14
10
|
/** Food [dish](https://fakerjs.dev/api/food.html#dish) */
|
|
15
|
-
export const dish = (
|
|
16
|
-
createValueConfig(() => faker.food.dish(...options));
|
|
11
|
+
export const dish = makeValueConfigFn(faker.food.dish);
|
|
17
12
|
|
|
18
13
|
/** Food [ethnicCategory](https://fakerjs.dev/api/food.html#ethnicCategory) */
|
|
19
|
-
export const ethnicCategory = (
|
|
20
|
-
...options: Parameters<typeof faker.food.ethnicCategory>
|
|
21
|
-
) => createValueConfig(() => faker.food.ethnicCategory(...options));
|
|
14
|
+
export const ethnicCategory = makeValueConfigFn(faker.food.ethnicCategory);
|
|
22
15
|
|
|
23
16
|
/** Food [fruit](https://fakerjs.dev/api/food.html#fruit) */
|
|
24
|
-
export const fruit = (
|
|
25
|
-
createValueConfig(() => faker.food.fruit(...options));
|
|
17
|
+
export const fruit = makeValueConfigFn(faker.food.fruit);
|
|
26
18
|
|
|
27
19
|
/** Food [ingredient](https://fakerjs.dev/api/food.html#ingredient) */
|
|
28
|
-
export const ingredient = (
|
|
29
|
-
...options: Parameters<typeof faker.food.ingredient>
|
|
30
|
-
) => createValueConfig(() => faker.food.ingredient(...options));
|
|
20
|
+
export const ingredient = makeValueConfigFn(faker.food.ingredient);
|
|
31
21
|
|
|
32
22
|
/** Food [meat](https://fakerjs.dev/api/food.html#meat) */
|
|
33
|
-
export const meat = (
|
|
34
|
-
createValueConfig(() => faker.food.meat(...options));
|
|
23
|
+
export const meat = makeValueConfigFn(faker.food.meat);
|
|
35
24
|
|
|
36
25
|
/** Food [spice](https://fakerjs.dev/api/food.html#spice) */
|
|
37
|
-
export const spice = (
|
|
38
|
-
createValueConfig(() => faker.food.spice(...options));
|
|
26
|
+
export const spice = makeValueConfigFn(faker.food.spice);
|
|
39
27
|
|
|
40
28
|
/** Food [vegetable](https://fakerjs.dev/api/food.html#vegetable) */
|
|
41
|
-
export const vegetable = (
|
|
42
|
-
...options: Parameters<typeof faker.food.vegetable>
|
|
43
|
-
) => createValueConfig(() => faker.food.vegetable(...options));
|
|
29
|
+
export const vegetable = makeValueConfigFn(faker.food.vegetable);
|
package/src/utils/git.ts
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Git [branch](https://fakerjs.dev/api/git.html#branch) */
|
|
5
|
-
export const branch = (
|
|
6
|
-
createValueConfig(() => faker.git.branch(...options));
|
|
5
|
+
export const branch = makeValueConfigFn(faker.git.branch);
|
|
7
6
|
|
|
8
7
|
/** Git [commitDate](https://fakerjs.dev/api/git.html#commitDate) */
|
|
9
|
-
export const commitDate = (
|
|
10
|
-
...options: Parameters<typeof faker.git.commitDate>
|
|
11
|
-
) => createValueConfig(() => faker.git.commitDate(...options));
|
|
8
|
+
export const commitDate = makeValueConfigFn(faker.git.commitDate);
|
|
12
9
|
|
|
13
10
|
/** Git [commitEntry](https://fakerjs.dev/api/git.html#commitEntry) */
|
|
14
|
-
export const commitEntry = (
|
|
15
|
-
...options: Parameters<typeof faker.git.commitEntry>
|
|
16
|
-
) => createValueConfig(() => faker.git.commitEntry(...options));
|
|
11
|
+
export const commitEntry = makeValueConfigFn(faker.git.commitEntry);
|
|
17
12
|
|
|
18
13
|
/** Git [commitMessage](https://fakerjs.dev/api/git.html#commitMessage) */
|
|
19
|
-
export const commitMessage = (
|
|
20
|
-
...options: Parameters<typeof faker.git.commitMessage>
|
|
21
|
-
) => createValueConfig(() => faker.git.commitMessage(...options));
|
|
14
|
+
export const commitMessage = makeValueConfigFn(faker.git.commitMessage);
|
|
22
15
|
|
|
23
16
|
/** Git [commitSha](https://fakerjs.dev/api/git.html#commitSha) */
|
|
24
|
-
export const commitSha = (
|
|
25
|
-
createValueConfig(() => faker.git.commitSha(...options));
|
|
17
|
+
export const commitSha = makeValueConfigFn(faker.git.commitSha);
|
package/src/utils/hacker.ts
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Hacker [abbreviation](https://fakerjs.dev/api/hacker.html#abbreviation) */
|
|
5
|
-
export const abbreviation = (
|
|
6
|
-
...options: Parameters<typeof faker.hacker.abbreviation>
|
|
7
|
-
) => createValueConfig(() => faker.hacker.abbreviation(...options));
|
|
5
|
+
export const abbreviation = makeValueConfigFn(faker.hacker.abbreviation);
|
|
8
6
|
|
|
9
7
|
/** Hacker [adjective](https://fakerjs.dev/api/hacker.html#adjective) */
|
|
10
|
-
export const adjective = (
|
|
11
|
-
...options: Parameters<typeof faker.hacker.adjective>
|
|
12
|
-
) => createValueConfig(() => faker.hacker.adjective(...options));
|
|
8
|
+
export const adjective = makeValueConfigFn(faker.hacker.adjective);
|
|
13
9
|
|
|
14
10
|
/** Hacker [ingverb](https://fakerjs.dev/api/hacker.html#ingverb) */
|
|
15
|
-
export const ingverb = (
|
|
16
|
-
createValueConfig(() => faker.hacker.ingverb(...options));
|
|
11
|
+
export const ingverb = makeValueConfigFn(faker.hacker.ingverb);
|
|
17
12
|
|
|
18
13
|
/** Hacker [noun](https://fakerjs.dev/api/hacker.html#noun) */
|
|
19
|
-
export const noun = (
|
|
20
|
-
createValueConfig(() => faker.hacker.noun(...options));
|
|
14
|
+
export const noun = makeValueConfigFn(faker.hacker.noun);
|
|
21
15
|
|
|
22
16
|
/** Hacker [phrase](https://fakerjs.dev/api/hacker.html#phrase) */
|
|
23
|
-
export const phrase = (
|
|
24
|
-
createValueConfig(() => faker.hacker.phrase(...options));
|
|
17
|
+
export const phrase = makeValueConfigFn(faker.hacker.phrase);
|
|
25
18
|
|
|
26
19
|
/** Hacker [verb](https://fakerjs.dev/api/hacker.html#verb) */
|
|
27
|
-
export const verb = (
|
|
28
|
-
createValueConfig(() => faker.hacker.verb(...options));
|
|
20
|
+
export const verb = makeValueConfigFn(faker.hacker.verb);
|
package/src/utils/image.ts
CHANGED
|
@@ -1,39 +1,26 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Image [avatar](https://fakerjs.dev/api/image.html#avatar) */
|
|
5
|
-
export const avatar = (
|
|
6
|
-
createValueConfig(() => faker.image.avatar(...options));
|
|
5
|
+
export const avatar = makeValueConfigFn(faker.image.avatar);
|
|
7
6
|
|
|
8
7
|
/** Image [avatarGitHub](https://fakerjs.dev/api/image.html#avatarGitHub) */
|
|
9
|
-
export const avatarGitHub = (
|
|
10
|
-
...options: Parameters<typeof faker.image.avatarGitHub>
|
|
11
|
-
) => createValueConfig(() => faker.image.avatarGitHub(...options));
|
|
8
|
+
export const avatarGitHub = makeValueConfigFn(faker.image.avatarGitHub);
|
|
12
9
|
|
|
13
10
|
/** Image [avatarLegacy](https://fakerjs.dev/api/image.html#avatarLegacy) */
|
|
14
|
-
export const avatarLegacy = (
|
|
15
|
-
...options: Parameters<typeof faker.image.avatarLegacy>
|
|
16
|
-
) => createValueConfig(() => faker.image.avatarLegacy(...options));
|
|
11
|
+
export const avatarLegacy = makeValueConfigFn(faker.image.avatarLegacy);
|
|
17
12
|
|
|
18
13
|
/** Image [dataUri](https://fakerjs.dev/api/image.html#dataUri) */
|
|
19
|
-
export const dataUri = (
|
|
20
|
-
createValueConfig(() => faker.image.dataUri(...options));
|
|
14
|
+
export const dataUri = makeValueConfigFn(faker.image.dataUri);
|
|
21
15
|
|
|
22
16
|
/** Image [url](https://fakerjs.dev/api/image.html#url) */
|
|
23
|
-
export const url = (
|
|
24
|
-
createValueConfig(() => faker.image.url(...options));
|
|
17
|
+
export const url = makeValueConfigFn(faker.image.url);
|
|
25
18
|
|
|
26
19
|
/** Image [urlLoremFlickr](https://fakerjs.dev/api/image.html#urlLoremFlickr) */
|
|
27
|
-
export const urlLoremFlickr = (
|
|
28
|
-
...options: Parameters<typeof faker.image.urlLoremFlickr>
|
|
29
|
-
) => createValueConfig(() => faker.image.urlLoremFlickr(...options));
|
|
20
|
+
export const urlLoremFlickr = makeValueConfigFn(faker.image.urlLoremFlickr);
|
|
30
21
|
|
|
31
22
|
/** Image [urlPicsumPhotos](https://fakerjs.dev/api/image.html#urlPicsumPhotos) */
|
|
32
|
-
export const urlPicsumPhotos = (
|
|
33
|
-
...options: Parameters<typeof faker.image.urlPicsumPhotos>
|
|
34
|
-
) => createValueConfig(() => faker.image.urlPicsumPhotos(...options));
|
|
23
|
+
export const urlPicsumPhotos = makeValueConfigFn(faker.image.urlPicsumPhotos);
|
|
35
24
|
|
|
36
25
|
/** Image [urlPlaceholder](https://fakerjs.dev/api/image.html#urlPlaceholder) */
|
|
37
|
-
export const urlPlaceholder = (
|
|
38
|
-
...options: Parameters<typeof faker.image.urlPlaceholder>
|
|
39
|
-
) => createValueConfig(() => faker.image.urlPlaceholder(...options));
|
|
26
|
+
export const urlPlaceholder = makeValueConfigFn(faker.image.urlPlaceholder);
|
package/src/utils/index.ts
CHANGED
package/src/utils/internet.ts
CHANGED
|
@@ -1,93 +1,62 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Internet [color](https://fakerjs.dev/api/internet.html#color) */
|
|
5
|
-
export const color = (
|
|
6
|
-
createValueConfig(() => faker.internet.color(...options));
|
|
5
|
+
export const color = makeValueConfigFn(faker.internet.color);
|
|
7
6
|
|
|
8
7
|
/** Internet [displayName](https://fakerjs.dev/api/internet.html#displayName) */
|
|
9
|
-
export const displayName = (
|
|
10
|
-
...options: Parameters<typeof faker.internet.displayName>
|
|
11
|
-
) => createValueConfig(() => faker.internet.displayName(...options));
|
|
8
|
+
export const displayName = makeValueConfigFn(faker.internet.displayName);
|
|
12
9
|
|
|
13
10
|
/** Internet [domainName](https://fakerjs.dev/api/internet.html#domainName) */
|
|
14
|
-
export const domainName = (
|
|
15
|
-
...options: Parameters<typeof faker.internet.domainName>
|
|
16
|
-
) => createValueConfig(() => faker.internet.domainName(...options));
|
|
11
|
+
export const domainName = makeValueConfigFn(faker.internet.domainName);
|
|
17
12
|
|
|
18
13
|
/** Internet [domainSuffix](https://fakerjs.dev/api/internet.html#domainSuffix) */
|
|
19
|
-
export const domainSuffix = (
|
|
20
|
-
...options: Parameters<typeof faker.internet.domainSuffix>
|
|
21
|
-
) => createValueConfig(() => faker.internet.domainSuffix(...options));
|
|
14
|
+
export const domainSuffix = makeValueConfigFn(faker.internet.domainSuffix);
|
|
22
15
|
|
|
23
16
|
/** Internet [domainWord](https://fakerjs.dev/api/internet.html#domainWord) */
|
|
24
|
-
export const domainWord = (
|
|
25
|
-
...options: Parameters<typeof faker.internet.domainWord>
|
|
26
|
-
) => createValueConfig(() => faker.internet.domainWord(...options));
|
|
17
|
+
export const domainWord = makeValueConfigFn(faker.internet.domainWord);
|
|
27
18
|
|
|
28
19
|
/** Internet [email](https://fakerjs.dev/api/internet.html#email) */
|
|
29
|
-
export const email = (
|
|
30
|
-
createValueConfig(() => faker.internet.email(...options));
|
|
20
|
+
export const email = makeValueConfigFn(faker.internet.email);
|
|
31
21
|
|
|
32
22
|
/** Internet [emoji](https://fakerjs.dev/api/internet.html#emoji) */
|
|
33
|
-
export const emoji = (
|
|
34
|
-
createValueConfig(() => faker.internet.emoji(...options));
|
|
23
|
+
export const emoji = makeValueConfigFn(faker.internet.emoji);
|
|
35
24
|
|
|
36
25
|
/** Internet [exampleEmail](https://fakerjs.dev/api/internet.html#exampleEmail) */
|
|
37
|
-
export const exampleEmail = (
|
|
38
|
-
...options: Parameters<typeof faker.internet.exampleEmail>
|
|
39
|
-
) => createValueConfig(() => faker.internet.exampleEmail(...options));
|
|
26
|
+
export const exampleEmail = makeValueConfigFn(faker.internet.exampleEmail);
|
|
40
27
|
|
|
41
28
|
/** Internet [httpMethod](https://fakerjs.dev/api/internet.html#httpMethod) */
|
|
42
|
-
export const httpMethod = (
|
|
43
|
-
...options: Parameters<typeof faker.internet.httpMethod>
|
|
44
|
-
) => createValueConfig(() => faker.internet.httpMethod(...options));
|
|
29
|
+
export const httpMethod = makeValueConfigFn(faker.internet.httpMethod);
|
|
45
30
|
|
|
46
31
|
/** Internet [httpStatusCode](https://fakerjs.dev/api/internet.html#httpStatusCode) */
|
|
47
|
-
export const httpStatusCode = (
|
|
48
|
-
...options: Parameters<typeof faker.internet.httpStatusCode>
|
|
49
|
-
) => createValueConfig(() => faker.internet.httpStatusCode(...options));
|
|
32
|
+
export const httpStatusCode = makeValueConfigFn(faker.internet.httpStatusCode);
|
|
50
33
|
|
|
51
34
|
/** Internet [ip](https://fakerjs.dev/api/internet.html#ip) */
|
|
52
|
-
export const ip = (
|
|
53
|
-
createValueConfig(() => faker.internet.ip(...options));
|
|
35
|
+
export const ip = makeValueConfigFn(faker.internet.ip);
|
|
54
36
|
|
|
55
37
|
/** Internet [ipv4](https://fakerjs.dev/api/internet.html#ipv4) */
|
|
56
|
-
export const ipv4 = (
|
|
57
|
-
createValueConfig(() => faker.internet.ipv4(...options));
|
|
38
|
+
export const ipv4 = makeValueConfigFn(faker.internet.ipv4);
|
|
58
39
|
|
|
59
40
|
/** Internet [ipv6](https://fakerjs.dev/api/internet.html#ipv6) */
|
|
60
|
-
export const ipv6 = (
|
|
61
|
-
createValueConfig(() => faker.internet.ipv6(...options));
|
|
41
|
+
export const ipv6 = makeValueConfigFn(faker.internet.ipv6);
|
|
62
42
|
|
|
63
43
|
/** Internet [mac](https://fakerjs.dev/api/internet.html#mac) */
|
|
64
|
-
export const mac = (
|
|
65
|
-
createValueConfig(() => faker.internet.mac(...options));
|
|
44
|
+
export const mac = makeValueConfigFn(faker.internet.mac);
|
|
66
45
|
|
|
67
46
|
/** Internet [password](https://fakerjs.dev/api/internet.html#password) */
|
|
68
|
-
export const password = (
|
|
69
|
-
...options: Parameters<typeof faker.internet.password>
|
|
70
|
-
) => createValueConfig(() => faker.internet.password(...options));
|
|
47
|
+
export const password = makeValueConfigFn(faker.internet.password);
|
|
71
48
|
|
|
72
49
|
/** Internet [port](https://fakerjs.dev/api/internet.html#port) */
|
|
73
|
-
export const port = (
|
|
74
|
-
createValueConfig(() => faker.internet.port(...options));
|
|
50
|
+
export const port = makeValueConfigFn(faker.internet.port);
|
|
75
51
|
|
|
76
52
|
/** Internet [protocol](https://fakerjs.dev/api/internet.html#protocol) */
|
|
77
|
-
export const protocol = (
|
|
78
|
-
...options: Parameters<typeof faker.internet.protocol>
|
|
79
|
-
) => createValueConfig(() => faker.internet.protocol(...options));
|
|
53
|
+
export const protocol = makeValueConfigFn(faker.internet.protocol);
|
|
80
54
|
|
|
81
55
|
/** Internet [url](https://fakerjs.dev/api/internet.html#url) */
|
|
82
|
-
export const url = (
|
|
83
|
-
createValueConfig(() => faker.internet.url(...options));
|
|
56
|
+
export const url = makeValueConfigFn(faker.internet.url);
|
|
84
57
|
|
|
85
58
|
/** Internet [userAgent](https://fakerjs.dev/api/internet.html#userAgent) */
|
|
86
|
-
export const userAgent = (
|
|
87
|
-
...options: Parameters<typeof faker.internet.userAgent>
|
|
88
|
-
) => createValueConfig(() => faker.internet.userAgent(...options));
|
|
59
|
+
export const userAgent = makeValueConfigFn(faker.internet.userAgent);
|
|
89
60
|
|
|
90
61
|
/** Internet [userName](https://fakerjs.dev/api/internet.html#userName) */
|
|
91
|
-
export const userName = (
|
|
92
|
-
...options: Parameters<typeof faker.internet.userName>
|
|
93
|
-
) => createValueConfig(() => faker.internet.userName(...options));
|
|
62
|
+
export const userName = makeValueConfigFn(faker.internet.userName);
|
package/src/utils/location.ts
CHANGED
|
@@ -1,78 +1,58 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Location [buildingNumber](https://fakerjs.dev/api/location.html#buildingNumber) */
|
|
5
|
-
export const buildingNumber = (
|
|
6
|
-
...options: Parameters<typeof faker.location.buildingNumber>
|
|
7
|
-
) => createValueConfig(() => faker.location.buildingNumber(...options));
|
|
5
|
+
export const buildingNumber = makeValueConfigFn(faker.location.buildingNumber);
|
|
8
6
|
|
|
9
7
|
/** Location [cardinalDirection](https://fakerjs.dev/api/location.html#cardinalDirection) */
|
|
10
|
-
export const cardinalDirection = (
|
|
11
|
-
|
|
12
|
-
)
|
|
8
|
+
export const cardinalDirection = makeValueConfigFn(
|
|
9
|
+
faker.location.cardinalDirection,
|
|
10
|
+
);
|
|
13
11
|
|
|
14
12
|
/** Location [city](https://fakerjs.dev/api/location.html#city) */
|
|
15
|
-
export const city = (
|
|
16
|
-
createValueConfig(() => faker.location.city(...options));
|
|
13
|
+
export const city = makeValueConfigFn(faker.location.city);
|
|
17
14
|
|
|
18
15
|
/** Location [country](https://fakerjs.dev/api/location.html#country) */
|
|
19
|
-
export const country = (
|
|
20
|
-
...options: Parameters<typeof faker.location.country>
|
|
21
|
-
) => createValueConfig(() => faker.location.country(...options));
|
|
16
|
+
export const country = makeValueConfigFn(faker.location.country);
|
|
22
17
|
|
|
23
18
|
/** Location [countryCode](https://fakerjs.dev/api/location.html#countryCode) */
|
|
24
|
-
export const countryCode = (
|
|
25
|
-
...options: Parameters<typeof faker.location.countryCode>
|
|
26
|
-
) => createValueConfig(() => faker.location.countryCode(...options));
|
|
19
|
+
export const countryCode = makeValueConfigFn(faker.location.countryCode);
|
|
27
20
|
|
|
28
21
|
/** Location [county](https://fakerjs.dev/api/location.html#county) */
|
|
29
|
-
export const county = (
|
|
30
|
-
createValueConfig(() => faker.location.county(...options));
|
|
22
|
+
export const county = makeValueConfigFn(faker.location.county);
|
|
31
23
|
|
|
32
24
|
/** Location [direction](https://fakerjs.dev/api/location.html#direction) */
|
|
33
|
-
export const direction = (
|
|
34
|
-
...options: Parameters<typeof faker.location.direction>
|
|
35
|
-
) => createValueConfig(() => faker.location.direction(...options));
|
|
25
|
+
export const direction = makeValueConfigFn(faker.location.direction);
|
|
36
26
|
|
|
37
27
|
/** Location [latitude](https://fakerjs.dev/api/location.html#latitude) */
|
|
38
|
-
export const latitude = (
|
|
39
|
-
...options: Parameters<typeof faker.location.latitude>
|
|
40
|
-
) => createValueConfig(() => faker.location.latitude(...options));
|
|
28
|
+
export const latitude = makeValueConfigFn(faker.location.latitude);
|
|
41
29
|
|
|
42
30
|
/** Location [longitude](https://fakerjs.dev/api/location.html#longitude) */
|
|
43
|
-
export const longitude = (
|
|
44
|
-
...options: Parameters<typeof faker.location.longitude>
|
|
45
|
-
) => createValueConfig(() => faker.location.longitude(...options));
|
|
31
|
+
export const longitude = makeValueConfigFn(faker.location.longitude);
|
|
46
32
|
|
|
47
33
|
/** Location [nearbyGPSCoordinate](https://fakerjs.dev/api/location.html#nearbyGPSCoordinate) */
|
|
48
|
-
export const nearbyGPSCoordinate = (
|
|
49
|
-
|
|
50
|
-
)
|
|
34
|
+
export const nearbyGPSCoordinate = makeValueConfigFn(
|
|
35
|
+
faker.location.nearbyGPSCoordinate,
|
|
36
|
+
);
|
|
51
37
|
|
|
52
38
|
/** Location [ordinalDirection](https://fakerjs.dev/api/location.html#ordinalDirection) */
|
|
53
|
-
export const ordinalDirection = (
|
|
54
|
-
|
|
55
|
-
)
|
|
39
|
+
export const ordinalDirection = makeValueConfigFn(
|
|
40
|
+
faker.location.ordinalDirection,
|
|
41
|
+
);
|
|
56
42
|
|
|
57
43
|
/** Location [secondaryAddress](https://fakerjs.dev/api/location.html#secondaryAddress) */
|
|
58
|
-
export const secondaryAddress = (
|
|
59
|
-
|
|
60
|
-
)
|
|
44
|
+
export const secondaryAddress = makeValueConfigFn(
|
|
45
|
+
faker.location.secondaryAddress,
|
|
46
|
+
);
|
|
61
47
|
|
|
62
48
|
/** Location [state](https://fakerjs.dev/api/location.html#state) */
|
|
63
|
-
export const state = (
|
|
64
|
-
createValueConfig(() => faker.location.state(...options));
|
|
49
|
+
export const state = makeValueConfigFn(faker.location.state);
|
|
65
50
|
|
|
66
51
|
/** Location [street](https://fakerjs.dev/api/location.html#street) */
|
|
67
|
-
export const street = (
|
|
68
|
-
createValueConfig(() => faker.location.street(...options));
|
|
52
|
+
export const street = makeValueConfigFn(faker.location.street);
|
|
69
53
|
|
|
70
54
|
/** Location [streetAddress](https://fakerjs.dev/api/location.html#streetAddress) */
|
|
71
|
-
export const streetAddress = (
|
|
72
|
-
...options: Parameters<typeof faker.location.streetAddress>
|
|
73
|
-
) => createValueConfig(() => faker.location.streetAddress(...options));
|
|
55
|
+
export const streetAddress = makeValueConfigFn(faker.location.streetAddress);
|
|
74
56
|
|
|
75
57
|
/** Location [timeZone](https://fakerjs.dev/api/location.html#timeZone) */
|
|
76
|
-
export const timeZone = (
|
|
77
|
-
...options: Parameters<typeof faker.location.timeZone>
|
|
78
|
-
) => createValueConfig(() => faker.location.timeZone(...options));
|
|
58
|
+
export const timeZone = makeValueConfigFn(faker.location.timeZone);
|
package/src/utils/lorem.ts
CHANGED
|
@@ -1,41 +1,29 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Lorem [lines](https://fakerjs.dev/api/lorem.html#lines) */
|
|
5
|
-
export const lines = (
|
|
6
|
-
createValueConfig(() => faker.lorem.lines(...options));
|
|
5
|
+
export const lines = makeValueConfigFn(faker.lorem.lines);
|
|
7
6
|
|
|
8
7
|
/** 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));
|
|
8
|
+
export const paragraph = makeValueConfigFn(faker.lorem.paragraph);
|
|
12
9
|
|
|
13
10
|
/** 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));
|
|
11
|
+
export const paragraphs = makeValueConfigFn(faker.lorem.paragraphs);
|
|
17
12
|
|
|
18
13
|
/** Lorem [sentence](https://fakerjs.dev/api/lorem.html#sentence) */
|
|
19
|
-
export const sentence = (
|
|
20
|
-
createValueConfig(() => faker.lorem.sentence(...options));
|
|
14
|
+
export const sentence = makeValueConfigFn(faker.lorem.sentence);
|
|
21
15
|
|
|
22
16
|
/** 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));
|
|
17
|
+
export const sentences = makeValueConfigFn(faker.lorem.sentences);
|
|
26
18
|
|
|
27
19
|
/** Lorem [slug](https://fakerjs.dev/api/lorem.html#slug) */
|
|
28
|
-
export const slug = (
|
|
29
|
-
createValueConfig(() => faker.lorem.slug(...options));
|
|
20
|
+
export const slug = makeValueConfigFn(faker.lorem.slug);
|
|
30
21
|
|
|
31
22
|
/** Lorem [text](https://fakerjs.dev/api/lorem.html#text) */
|
|
32
|
-
export const text = (
|
|
33
|
-
createValueConfig(() => faker.lorem.text(...options));
|
|
23
|
+
export const text = makeValueConfigFn(faker.lorem.text);
|
|
34
24
|
|
|
35
25
|
/** Lorem [word](https://fakerjs.dev/api/lorem.html#word) */
|
|
36
|
-
export const word = (
|
|
37
|
-
createValueConfig(() => faker.lorem.word(...options));
|
|
26
|
+
export const word = makeValueConfigFn(faker.lorem.word);
|
|
38
27
|
|
|
39
28
|
/** Lorem [words](https://fakerjs.dev/api/lorem.html#words) */
|
|
40
|
-
export const words = (
|
|
41
|
-
createValueConfig(() => faker.lorem.words(...options));
|
|
29
|
+
export const words = makeValueConfigFn(faker.lorem.words);
|
package/src/utils/music.ts
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Music [album](https://fakerjs.dev/api/music.html#album) */
|
|
5
|
-
export const album = (
|
|
6
|
-
createValueConfig(() => faker.music.album(...options));
|
|
5
|
+
export const album = makeValueConfigFn(faker.music.album);
|
|
7
6
|
|
|
8
7
|
/** Music [artist](https://fakerjs.dev/api/music.html#artist) */
|
|
9
|
-
export const artist = (
|
|
10
|
-
createValueConfig(() => faker.music.artist(...options));
|
|
8
|
+
export const artist = makeValueConfigFn(faker.music.artist);
|
|
11
9
|
|
|
12
10
|
/** Music [genre](https://fakerjs.dev/api/music.html#genre) */
|
|
13
|
-
export const genre = (
|
|
14
|
-
createValueConfig(() => faker.music.genre(...options));
|
|
11
|
+
export const genre = makeValueConfigFn(faker.music.genre);
|
|
15
12
|
|
|
16
13
|
/** Music [songName](https://fakerjs.dev/api/music.html#songName) */
|
|
17
|
-
export const songName = (
|
|
18
|
-
createValueConfig(() => faker.music.songName(...options));
|
|
14
|
+
export const songName = makeValueConfigFn(faker.music.songName);
|
package/src/utils/number.ts
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Number [bigInt](https://fakerjs.dev/api/number.html#bigInt) */
|
|
5
|
-
export const bigInt = (
|
|
6
|
-
createValueConfig(() => faker.number.bigInt(...options));
|
|
5
|
+
export const bigInt = makeValueConfigFn(faker.number.bigInt);
|
|
7
6
|
|
|
8
7
|
/** Number [binary](https://fakerjs.dev/api/number.html#binary) */
|
|
9
|
-
export const binary = (
|
|
10
|
-
createValueConfig(() => faker.number.binary(...options));
|
|
8
|
+
export const binary = makeValueConfigFn(faker.number.binary);
|
|
11
9
|
|
|
12
10
|
/** Number [float](https://fakerjs.dev/api/number.html#float) */
|
|
13
|
-
export const float = (
|
|
14
|
-
createValueConfig(() => faker.number.float(...options));
|
|
11
|
+
export const float = makeValueConfigFn(faker.number.float);
|
|
15
12
|
|
|
16
13
|
/** Number [hex](https://fakerjs.dev/api/number.html#hex) */
|
|
17
|
-
export const hex = (
|
|
18
|
-
createValueConfig(() => faker.number.hex(...options));
|
|
14
|
+
export const hex = makeValueConfigFn(faker.number.hex);
|
|
19
15
|
|
|
20
16
|
/** Number [int](https://fakerjs.dev/api/number.html#int) */
|
|
21
|
-
export const int = (
|
|
22
|
-
createValueConfig(() => faker.number.int(...options));
|
|
17
|
+
export const int = makeValueConfigFn(faker.number.int);
|
|
23
18
|
|
|
24
19
|
/** Number [octal](https://fakerjs.dev/api/number.html#octal) */
|
|
25
|
-
export const octal = (
|
|
26
|
-
createValueConfig(() => faker.number.octal(...options));
|
|
20
|
+
export const octal = makeValueConfigFn(faker.number.octal);
|