struct-fakerator 2.4.4 → 2.4.6
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/package.json +19 -1
- 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/airline-BUwgrfsj.d.ts +0 -26
- package/dist/airline-C0ManYED.d.mts +0 -26
- package/dist/animal-arG64NM6.d.mts +0 -53
- package/dist/animal-erAZXs_d.d.ts +0 -53
- package/dist/chunk-2R3Q64AD.mjs +0 -28
- package/dist/chunk-3HQMGDUF.js +0 -98
- package/dist/chunk-4UGSTE5Q.js +0 -1968
- package/dist/chunk-5U5KT6H4.js +0 -61
- package/dist/chunk-7GE2A5VT.mjs +0 -43
- package/dist/chunk-7R4M2AAS.js +0 -25
- package/dist/chunk-7YNCYSJY.js +0 -19
- 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-BS7IEV74.mjs +0 -1968
- package/dist/chunk-BXJJGEM5.js +0 -22
- package/dist/chunk-CFX43E3I.mjs +0 -22
- 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-HADENNJW.js +0 -22
- package/dist/chunk-HHL3SY7A.js +0 -34
- package/dist/chunk-HOVGSNA4.js +0 -73
- package/dist/chunk-J266ZY25.mjs +0 -22
- package/dist/chunk-J3IXKUJK.js +0 -61
- package/dist/chunk-J5ZX7PK3.js +0 -34
- package/dist/chunk-L7PFM742.mjs +0 -49
- package/dist/chunk-LBQLRQOQ.js +0 -28
- package/dist/chunk-LJKI4ZZ5.mjs +0 -43
- package/dist/chunk-M2J3MAM7.mjs +0 -52
- package/dist/chunk-NEE5QKPY.mjs +0 -40
- package/dist/chunk-OLSCXZ3D.mjs +0 -98
- 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-TX7HRLKE.mjs +0 -19
- 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-XG6RUZSI.mjs +0 -16
- package/dist/chunk-XL5V4E3Z.js +0 -16
- 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-YY2TF7WC.mjs +0 -25
- package/dist/chunk-ZPQWZLYI.js +0 -43
- package/dist/chunk-ZRQDW34U.mjs +0 -76
- package/dist/color-BmTZnKiW.d.mts +0 -61
- package/dist/color-WFinq_Y4.d.ts +0 -61
- package/dist/commerce-Ch71_dd2.d.ts +0 -40
- package/dist/commerce-IGFkOXjQ.d.mts +0 -40
- package/dist/common-CbuXAeQ-.d.mts +0 -11
- package/dist/common-Kp8LaAzK.d.ts +0 -11
- package/dist/company---O1IwYo.d.ts +0 -35
- package/dist/company-D7Cc_hsx.d.mts +0 -35
- package/dist/database-B8Wr1oXH.d.mts +0 -23
- package/dist/database-Dnsy3cQb.d.ts +0 -23
- package/dist/datatype-CAu_sc1g.d.ts +0 -13
- package/dist/datatype-gjFHrdMj.d.mts +0 -13
- package/dist/datetime-BDgsnqq_.d.mts +0 -78
- package/dist/datetime-BkidbR1O.d.ts +0 -78
- package/dist/finance-BZEmlfNQ.d.mts +0 -90
- package/dist/finance-Cn3DFbX4.d.ts +0 -90
- package/dist/food-CfxZX81O.d.mts +0 -35
- package/dist/food-tr11e_Qp.d.ts +0 -35
- package/dist/git-DoCI9ZYT.d.ts +0 -31
- package/dist/git-Feo1ntKa.d.mts +0 -31
- package/dist/hacker-X3zBTMoE.d.ts +0 -26
- package/dist/hacker-mGVIO_wL.d.mts +0 -26
- package/dist/image-BeZbZlyo.d.ts +0 -56
- package/dist/image-govZ7HjA.d.mts +0 -56
- package/dist/index.d.mts +0 -57
- package/dist/index.d.ts +0 -57
- package/dist/index.js +0 -162
- package/dist/index.mjs +0 -162
- package/dist/internet-CJEETk0v.d.mts +0 -101
- package/dist/internet-jHHnqVJG.d.ts +0 -101
- package/dist/location-CTA_Bq7w.d.mts +0 -80
- package/dist/location-CsVekxIU.d.ts +0 -80
- package/dist/lorem-BE4n3dVs.d.mts +0 -62
- package/dist/lorem-Btv0fltY.d.ts +0 -62
- package/dist/music-CQ3lnDvg.d.mts +0 -20
- package/dist/music-D3zj5REe.d.ts +0 -20
- package/dist/number-Bj9ydAOH.d.ts +0 -47
- package/dist/number-D9Wn_qjS.d.mts +0 -47
- package/dist/person-LLleVozS.d.ts +0 -58
- package/dist/person-OKRyYmeX.d.mts +0 -58
- package/dist/phone-Bc8UXPF3.d.ts +0 -16
- package/dist/phone-QbHXAqVF.d.mts +0 -16
- package/dist/science-BgXAZ3YR.d.ts +0 -15
- package/dist/science-CSN41yUZ.d.mts +0 -15
- package/dist/string-9w976kVk.d.mts +0 -87
- package/dist/string-Cm9TczI6.d.ts +0 -87
- package/dist/system-DOyHjHxs.d.mts +0 -55
- package/dist/system-DipW6DYb.d.ts +0 -55
- package/dist/type-C8Ny1fB6.d.mts +0 -33
- package/dist/type-C8Ny1fB6.d.ts +0 -33
- package/dist/utils/airline.d.mts +0 -3
- package/dist/utils/airline.d.ts +0 -3
- package/dist/utils/airline.js +0 -12
- package/dist/utils/airline.mjs +0 -12
- package/dist/utils/animal.d.mts +0 -2
- package/dist/utils/animal.d.ts +0 -2
- package/dist/utils/animal.js +0 -36
- package/dist/utils/animal.mjs +0 -36
- package/dist/utils/color.d.mts +0 -3
- package/dist/utils/color.d.ts +0 -3
- package/dist/utils/color.js +0 -28
- package/dist/utils/color.mjs +0 -28
- package/dist/utils/commerce.d.mts +0 -2
- package/dist/utils/commerce.d.ts +0 -2
- package/dist/utils/commerce.js +0 -22
- package/dist/utils/commerce.mjs +0 -22
- package/dist/utils/common.d.mts +0 -2
- package/dist/utils/common.d.ts +0 -2
- package/dist/utils/common.js +0 -7
- package/dist/utils/common.mjs +0 -7
- package/dist/utils/company.d.mts +0 -2
- package/dist/utils/company.d.ts +0 -2
- package/dist/utils/company.js +0 -24
- package/dist/utils/company.mjs +0 -24
- package/dist/utils/database.d.mts +0 -2
- package/dist/utils/database.d.ts +0 -2
- package/dist/utils/database.js +0 -16
- package/dist/utils/database.mjs +0 -16
- package/dist/utils/datatype.d.mts +0 -2
- package/dist/utils/datatype.d.ts +0 -2
- package/dist/utils/datatype.js +0 -8
- package/dist/utils/datatype.mjs +0 -8
- package/dist/utils/datetime.d.mts +0 -2
- package/dist/utils/datetime.d.ts +0 -2
- package/dist/utils/datetime.js +0 -28
- package/dist/utils/datetime.mjs +0 -28
- package/dist/utils/finance.d.mts +0 -3
- package/dist/utils/finance.d.ts +0 -3
- package/dist/utils/finance.js +0 -44
- package/dist/utils/finance.mjs +0 -44
- package/dist/utils/food.d.mts +0 -2
- package/dist/utils/food.d.ts +0 -2
- package/dist/utils/food.js +0 -24
- package/dist/utils/food.mjs +0 -24
- package/dist/utils/git.d.mts +0 -2
- package/dist/utils/git.d.ts +0 -2
- package/dist/utils/git.js +0 -16
- package/dist/utils/git.mjs +0 -16
- package/dist/utils/hacker.d.mts +0 -2
- package/dist/utils/hacker.d.ts +0 -2
- package/dist/utils/hacker.js +0 -18
- package/dist/utils/hacker.mjs +0 -18
- package/dist/utils/image.d.mts +0 -2
- package/dist/utils/image.d.ts +0 -2
- package/dist/utils/image.js +0 -22
- package/dist/utils/image.mjs +0 -22
- package/dist/utils/index.d.mts +0 -27
- package/dist/utils/index.d.ts +0 -27
- package/dist/utils/index.js +0 -104
- package/dist/utils/index.mjs +0 -104
- package/dist/utils/internet.d.mts +0 -2
- package/dist/utils/internet.d.ts +0 -2
- package/dist/utils/internet.js +0 -46
- package/dist/utils/internet.mjs +0 -46
- package/dist/utils/location.d.mts +0 -2
- package/dist/utils/location.d.ts +0 -2
- package/dist/utils/location.js +0 -38
- package/dist/utils/location.mjs +0 -38
- package/dist/utils/lorem.d.mts +0 -2
- package/dist/utils/lorem.d.ts +0 -2
- package/dist/utils/lorem.js +0 -24
- package/dist/utils/lorem.mjs +0 -24
- package/dist/utils/music.d.mts +0 -2
- package/dist/utils/music.d.ts +0 -2
- package/dist/utils/music.js +0 -14
- package/dist/utils/music.mjs +0 -14
- package/dist/utils/number.d.mts +0 -2
- package/dist/utils/number.d.ts +0 -2
- package/dist/utils/number.js +0 -18
- package/dist/utils/number.mjs +0 -18
- package/dist/utils/person.d.mts +0 -3
- package/dist/utils/person.d.ts +0 -3
- package/dist/utils/person.js +0 -36
- package/dist/utils/person.mjs +0 -36
- package/dist/utils/phone.d.mts +0 -2
- package/dist/utils/phone.d.ts +0 -2
- package/dist/utils/phone.js +0 -10
- package/dist/utils/phone.mjs +0 -10
- package/dist/utils/science.d.mts +0 -3
- package/dist/utils/science.d.ts +0 -3
- package/dist/utils/science.js +0 -10
- package/dist/utils/science.mjs +0 -10
- package/dist/utils/string.d.mts +0 -2
- package/dist/utils/string.d.ts +0 -2
- package/dist/utils/string.js +0 -26
- package/dist/utils/string.mjs +0 -26
- package/dist/utils/system.d.mts +0 -2
- package/dist/utils/system.d.ts +0 -2
- package/dist/utils/system.js +0 -30
- package/dist/utils/system.mjs +0 -30
- package/dist/utils/vehicle.d.mts +0 -2
- package/dist/utils/vehicle.d.ts +0 -2
- package/dist/utils/vehicle.js +0 -24
- package/dist/utils/vehicle.mjs +0 -24
- package/dist/utils/word.d.mts +0 -75
- package/dist/utils/word.d.ts +0 -75
- package/dist/utils/word.js +0 -28
- package/dist/utils/word.mjs +0 -28
- package/dist/vehicle-DmBDda98.d.mts +0 -35
- package/dist/vehicle-rnBz1Za2.d.ts +0 -35
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);
|
package/src/utils/person.ts
CHANGED
|
@@ -1,69 +1,47 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Person [bio](https://fakerjs.dev/api/person.html#bio) */
|
|
5
|
-
export const bio = (
|
|
6
|
-
createValueConfig(() => faker.person.bio(...options));
|
|
5
|
+
export const bio = makeValueConfigFn(faker.person.bio);
|
|
7
6
|
|
|
8
7
|
/** 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));
|
|
8
|
+
export const firstName = makeValueConfigFn(faker.person.firstName);
|
|
12
9
|
|
|
13
10
|
/** 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));
|
|
11
|
+
export const fullName = makeValueConfigFn(faker.person.fullName);
|
|
17
12
|
|
|
18
13
|
/** Person [gender](https://fakerjs.dev/api/person.html#gender) */
|
|
19
|
-
export const gender = (
|
|
20
|
-
createValueConfig(() => faker.person.gender(...options));
|
|
14
|
+
export const gender = makeValueConfigFn(faker.person.gender);
|
|
21
15
|
|
|
22
16
|
/** Person [jobArea](https://fakerjs.dev/api/person.html#jobArea) */
|
|
23
|
-
export const jobArea = (
|
|
24
|
-
createValueConfig(() => faker.person.jobArea(...options));
|
|
17
|
+
export const jobArea = makeValueConfigFn(faker.person.jobArea);
|
|
25
18
|
|
|
26
19
|
/** 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));
|
|
20
|
+
export const jobDescriptor = makeValueConfigFn(faker.person.jobDescriptor);
|
|
30
21
|
|
|
31
22
|
/** 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));
|
|
23
|
+
export const jobTitle = makeValueConfigFn(faker.person.jobTitle);
|
|
35
24
|
|
|
36
25
|
/** Person [jobType](https://fakerjs.dev/api/person.html#jobType) */
|
|
37
|
-
export const jobType = (
|
|
38
|
-
createValueConfig(() => faker.person.jobType(...options));
|
|
26
|
+
export const jobType = makeValueConfigFn(faker.person.jobType);
|
|
39
27
|
|
|
40
28
|
/** 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));
|
|
29
|
+
export const lastName = makeValueConfigFn(faker.person.lastName);
|
|
44
30
|
|
|
45
31
|
/** 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));
|
|
32
|
+
export const middleName = makeValueConfigFn(faker.person.middleName);
|
|
49
33
|
|
|
50
34
|
/** Person [prefix](https://fakerjs.dev/api/person.html#prefix) */
|
|
51
|
-
export const prefix = (
|
|
52
|
-
createValueConfig(() => faker.person.prefix(...options));
|
|
35
|
+
export const prefix = makeValueConfigFn(faker.person.prefix);
|
|
53
36
|
|
|
54
37
|
/** Person [sex](https://fakerjs.dev/api/person.html#sex) */
|
|
55
|
-
export const sex = (
|
|
56
|
-
createValueConfig(() => faker.person.sex(...options));
|
|
38
|
+
export const sex = makeValueConfigFn(faker.person.sex);
|
|
57
39
|
|
|
58
40
|
/** Person [sexType](https://fakerjs.dev/api/person.html#sexType) */
|
|
59
|
-
export const sexType = (
|
|
60
|
-
createValueConfig(() => faker.person.sexType(...options));
|
|
41
|
+
export const sexType = makeValueConfigFn(faker.person.sexType);
|
|
61
42
|
|
|
62
43
|
/** Person [suffix](https://fakerjs.dev/api/person.html#suffix) */
|
|
63
|
-
export const suffix = (
|
|
64
|
-
createValueConfig(() => faker.person.suffix(...options));
|
|
44
|
+
export const suffix = makeValueConfigFn(faker.person.suffix);
|
|
65
45
|
|
|
66
46
|
/** 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));
|
|
47
|
+
export const zodiacSign = makeValueConfigFn(faker.person.zodiacSign);
|
package/src/utils/phone.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Phone [imei](https://fakerjs.dev/api/phone.html#imei) */
|
|
5
|
-
export const imei = (
|
|
6
|
-
createValueConfig(() => faker.phone.imei(...options));
|
|
5
|
+
export const imei = makeValueConfigFn(faker.phone.imei);
|
|
7
6
|
|
|
8
7
|
/** Phone [number](https://fakerjs.dev/api/phone.html#number) */
|
|
9
|
-
export const number = (
|
|
10
|
-
createValueConfig(() => faker.phone.number(...options));
|
|
8
|
+
export const number = makeValueConfigFn(faker.phone.number);
|
package/src/utils/science.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { faker } from "@faker-js/faker";
|
|
2
|
-
import {
|
|
2
|
+
import { makeValueConfigFn } from "./utils";
|
|
3
3
|
|
|
4
4
|
/** Science [chemicalElement](https://fakerjs.dev/api/science.html#chemicalElement) */
|
|
5
|
-
export const chemicalElement = (
|
|
6
|
-
...options: Parameters<typeof faker.science.chemicalElement>
|
|
7
|
-
) => createValueConfig(() => faker.science.chemicalElement(...options));
|
|
5
|
+
export const chemicalElement = makeValueConfigFn(faker.science.chemicalElement);
|
|
8
6
|
|
|
9
7
|
/** Science [unit](https://fakerjs.dev/api/science.html#unit) */
|
|
10
|
-
export const unit = (
|
|
11
|
-
createValueConfig(() => faker.science.unit(...options));
|
|
8
|
+
export const unit = makeValueConfigFn(faker.science.unit);
|