struct-fakerator 2.5.6 → 2.6.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-25HDDMTE.js +45 -0
- package/dist/chunk-266JLHQ7.mjs +27 -0
- package/dist/chunk-266W7TLD.mjs +45 -0
- package/dist/chunk-2HHTDZ5W.mjs +27 -0
- package/dist/chunk-2SF54GZN.mjs +24 -0
- package/dist/chunk-2VTSGFBK.mjs +56 -0
- package/dist/chunk-3APOILUV.js +81 -0
- package/dist/chunk-3PSJD6BF.js +67 -0
- package/dist/chunk-3U6BNHWG.mjs +2040 -0
- package/dist/chunk-44Q7WXPL.mjs +30 -0
- package/dist/chunk-474WFN7X.js +33 -0
- package/dist/chunk-4XEKUGKR.js +35 -0
- package/dist/chunk-52ZOIHJM.js +26 -0
- package/dist/chunk-5A3HJWPX.mjs +33 -0
- package/dist/chunk-5KKLW4SD.js +26 -0
- package/dist/chunk-5NC3JFHS.mjs +63 -0
- package/dist/chunk-5TG43IWT.js +36 -0
- package/dist/chunk-5UFZ4NET.mjs +26 -0
- package/dist/chunk-5VTJIH2Q.mjs +63 -0
- package/dist/chunk-6LNIYJMV.mjs +21 -0
- package/dist/chunk-6OOU3BX5.mjs +35 -0
- package/dist/chunk-6TGTIMX2.mjs +151 -0
- package/dist/chunk-6UVWD65N.mjs +63 -0
- package/dist/chunk-7LDYF5VW.js +78 -0
- package/dist/chunk-7RP7F74O.js +49 -0
- package/dist/chunk-7ZAVU2DI.mjs +81 -0
- package/dist/chunk-ABZZ2Y2O.mjs +45 -0
- package/dist/chunk-AH3KD37M.js +45 -0
- package/dist/chunk-C6FQYK5T.js +81 -0
- package/dist/chunk-CRW5Q4VB.js +30 -0
- package/dist/chunk-D74AUXZW.mjs +35 -0
- package/dist/chunk-DM5VFX6B.js +17008 -0
- package/dist/chunk-DN6VWFMI.js +56 -0
- package/dist/chunk-DQBTHPWE.js +24 -0
- package/dist/chunk-DX6NQK6H.js +49 -0
- package/dist/chunk-DXVB5THL.js +36 -0
- package/dist/chunk-E7JW4TGQ.mjs +49 -0
- package/dist/chunk-EPWKT75L.js +63 -0
- package/dist/chunk-ETS5PP3N.js +42 -0
- package/dist/chunk-EXLV2IRM.mjs +26 -0
- package/dist/chunk-F4WSUHUB.js +27 -0
- package/dist/chunk-F54WJZPR.mjs +48 -0
- package/dist/chunk-FT5QWXEO.mjs +21 -0
- package/dist/chunk-FXTLAJTY.mjs +74 -0
- package/dist/chunk-G73JPAKW.mjs +16831 -0
- package/dist/chunk-GMOMLI4W.js +56 -0
- package/dist/chunk-GNLLMLQX.js +48 -0
- package/dist/chunk-GNPP2GGZ.js +16831 -0
- package/dist/chunk-GUIYTTMP.mjs +24 -0
- package/dist/chunk-HMDAKHLF.js +151 -0
- package/dist/chunk-HVWSAC7Q.js +74 -0
- package/dist/chunk-IN3R3ABZ.mjs +45 -0
- package/dist/chunk-IOLQKV4S.js +51 -0
- package/dist/chunk-JIPBMHNL.mjs +63 -0
- package/dist/chunk-JIWCYW33.js +35 -0
- package/dist/chunk-JSZXNY5A.js +33 -0
- package/dist/chunk-JTURHVCR.mjs +67 -0
- package/dist/chunk-JY2DLJQ7.js +74 -0
- package/dist/chunk-KDRX2A7A.mjs +45 -0
- package/dist/chunk-KMAT3MEQ.mjs +24 -0
- package/dist/chunk-KMGBR4B7.mjs +49 -0
- package/dist/chunk-KO4BOJXG.mjs +18 -0
- package/dist/chunk-KSBJZ7PZ.mjs +48 -0
- package/dist/chunk-KUNWO6DB.js +20 -0
- package/dist/chunk-L5EOJC4C.mjs +78 -0
- package/dist/chunk-LDVSCWU7.mjs +51 -0
- package/dist/chunk-LSP4VVPM.mjs +45 -0
- package/dist/chunk-MCHBNMZ7.js +48 -0
- package/dist/chunk-MHBVLDC4.js +30 -0
- package/dist/chunk-MLJAHDYX.mjs +167 -0
- package/dist/chunk-NBUVTD24.js +24 -0
- package/dist/chunk-NEFBZJ7G.mjs +42 -0
- package/dist/chunk-NGJNM6BX.mjs +48 -0
- package/dist/chunk-NP7ZKTAA.js +36 -0
- package/dist/chunk-OAPPDES4.js +51 -0
- package/dist/chunk-OCKZOACK.js +24 -0
- package/dist/chunk-OKDN5R6M.mjs +78 -0
- package/dist/chunk-OZ5VJVBQ.js +21 -0
- package/dist/chunk-OZU24BQP.mjs +81 -0
- package/dist/chunk-PFTS7XQK.js +27 -0
- package/dist/chunk-PLNNO4GL.js +36 -0
- package/dist/chunk-PPQIZT6A.mjs +48 -0
- package/dist/chunk-QH2RT36U.js +57 -0
- package/dist/chunk-QHW2YYKY.js +45 -0
- package/dist/chunk-QZQ32UPU.mjs +28 -0
- package/dist/chunk-RA35MXTT.mjs +51 -0
- package/dist/chunk-RFTRP37B.mjs +74 -0
- package/dist/chunk-RIOEYYMH.mjs +30 -0
- package/dist/chunk-RTENULN5.mjs +36 -0
- package/dist/chunk-S2AEEWWW.mjs +36 -0
- package/dist/chunk-SN2ALAEI.mjs +36 -0
- package/dist/chunk-SSZ5GGDT.js +45 -0
- package/dist/chunk-STKSA23M.mjs +33 -0
- package/dist/chunk-TLH73HQN.js +63 -0
- package/dist/chunk-TQIJQZBP.js +57 -0
- package/dist/chunk-TZ2RKEBF.js +2040 -0
- package/dist/chunk-U3TS432W.js +48 -0
- package/dist/chunk-U7MLTDS4.js +167 -0
- package/dist/chunk-UIYW7U2O.js +28 -0
- package/dist/chunk-UJ5Q7MZB.js +78 -0
- package/dist/chunk-UOY5QUAW.js +63 -0
- package/dist/chunk-URX5VRVB.js +24 -0
- package/dist/chunk-USLYTOPD.mjs +41 -0
- package/dist/chunk-VTSJ33HJ.js +18 -0
- package/dist/chunk-VX2IFBCP.mjs +17008 -0
- package/dist/chunk-VYV7BUJR.js +42 -0
- package/dist/chunk-W4CBCFMS.mjs +36 -0
- package/dist/chunk-WDFGFSCS.js +63 -0
- package/dist/chunk-WJ6C635R.mjs +45 -0
- package/dist/chunk-X7YFEBIL.mjs +28 -0
- package/dist/chunk-XB5AI72P.mjs +24 -0
- package/dist/chunk-XI5L2ENL.js +28 -0
- package/dist/chunk-XUZOVQYC.mjs +42 -0
- package/dist/chunk-XVQOUXV6.js +48 -0
- package/dist/chunk-YUFVOYYX.mjs +57 -0
- package/dist/chunk-YV3HYBCX.js +45 -0
- package/dist/chunk-YYSJWYK3.js +21 -0
- package/dist/chunk-ZADIRLZW.mjs +56 -0
- package/dist/chunk-ZDV7FI2F.js +45 -0
- package/dist/chunk-ZN3MHVES.mjs +57 -0
- package/dist/chunk-ZPQ6LVKQ.mjs +20 -0
- package/dist/chunk-ZWLHVT5O.js +41 -0
- package/dist/config-BTjogu5M.d.ts +7 -0
- package/dist/config-C1N2Brw-.d.mts +7 -0
- package/dist/config.d.mts +2 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +19 -0
- package/dist/config.mjs +19 -0
- package/dist/config_scheme.d.mts +14 -82
- package/dist/config_scheme.d.ts +14 -82
- package/dist/config_scheme.js +2 -2
- package/dist/config_scheme.mjs +1 -1
- package/dist/create_config.d.mts +10 -2
- package/dist/create_config.d.ts +10 -2
- package/dist/create_config.js +3 -3
- package/dist/create_config.mjs +2 -2
- package/dist/create_config.test.js +35 -35
- package/dist/create_config.test.mjs +3 -3
- package/dist/create_generator_fn.d.mts +2 -2
- package/dist/create_generator_fn.d.ts +2 -2
- package/dist/create_generator_fn.js +4 -4
- package/dist/create_generator_fn.mjs +3 -3
- package/dist/create_generator_fn.test.js +71 -58
- package/dist/create_generator_fn.test.mjs +23 -10
- package/dist/generator_fn-CJDbnCZl.d.mts +7 -0
- package/dist/generator_fn-D-npAfnC.d.ts +7 -0
- package/dist/generator_fn.d.mts +2 -0
- package/dist/generator_fn.d.ts +2 -0
- package/dist/generator_fn.js +22 -0
- package/dist/generator_fn.mjs +22 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +15 -7
- package/dist/index.mjs +20 -12
- package/dist/number-BfwwKvTJ.d.mts +48 -0
- package/dist/number-D5QmTRsK.d.ts +48 -0
- package/dist/test.d.mts +2 -0
- package/dist/test.d.ts +2 -0
- package/dist/test.js +15 -0
- package/dist/test.mjs +15 -0
- package/dist/type.d.mts +65 -5
- package/dist/type.d.ts +65 -5
- package/dist/utils/airline.js +6 -6
- package/dist/utils/airline.mjs +5 -5
- package/dist/utils/animal.js +6 -6
- package/dist/utils/animal.mjs +5 -5
- package/dist/utils/color.js +6 -6
- package/dist/utils/color.mjs +5 -5
- package/dist/utils/commerce.js +6 -6
- package/dist/utils/commerce.mjs +5 -5
- package/dist/utils/common.js +4 -4
- package/dist/utils/common.mjs +3 -3
- package/dist/utils/company.js +6 -6
- package/dist/utils/company.mjs +5 -5
- package/dist/utils/database.js +6 -6
- package/dist/utils/database.mjs +5 -5
- package/dist/utils/datatype.js +6 -6
- package/dist/utils/datatype.mjs +5 -5
- package/dist/utils/datetime.js +6 -6
- package/dist/utils/datetime.mjs +5 -5
- package/dist/utils/finance.js +6 -6
- package/dist/utils/finance.mjs +5 -5
- package/dist/utils/food.js +6 -6
- package/dist/utils/food.mjs +5 -5
- package/dist/utils/git.js +6 -6
- package/dist/utils/git.mjs +5 -5
- package/dist/utils/hacker.js +6 -6
- package/dist/utils/hacker.mjs +5 -5
- package/dist/utils/image.js +6 -6
- package/dist/utils/image.mjs +5 -5
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +30 -30
- package/dist/utils/index.mjs +43 -43
- package/dist/utils/internet.js +6 -6
- package/dist/utils/internet.mjs +5 -5
- package/dist/utils/location.js +6 -6
- package/dist/utils/location.mjs +5 -5
- package/dist/utils/lorem.js +6 -6
- package/dist/utils/lorem.mjs +5 -5
- package/dist/utils/music.js +6 -6
- package/dist/utils/music.mjs +5 -5
- package/dist/utils/number.d.mts +1 -1
- package/dist/utils/number.d.ts +1 -1
- package/dist/utils/number.js +6 -6
- package/dist/utils/number.mjs +5 -5
- package/dist/utils/person.js +6 -6
- package/dist/utils/person.mjs +5 -5
- package/dist/utils/phone.js +6 -6
- package/dist/utils/phone.mjs +5 -5
- package/dist/utils/science.js +6 -6
- package/dist/utils/science.mjs +5 -5
- package/dist/utils/string.js +6 -6
- package/dist/utils/string.mjs +5 -5
- package/dist/utils/system.js +6 -6
- package/dist/utils/system.mjs +5 -5
- package/dist/utils/utils.js +4 -4
- package/dist/utils/utils.mjs +3 -3
- package/dist/utils/vehicle.js +6 -6
- package/dist/utils/vehicle.mjs +5 -5
- package/dist/utils/word.js +13 -13
- package/dist/utils/word.mjs +4 -4
- package/package.json +6 -6
- package/src/config.ts +8 -0
- package/src/config_scheme.ts +3 -7
- package/src/create_config.ts +50 -17
- package/src/create_generator_fn.test.ts +15 -0
- package/src/create_generator_fn.ts +63 -1
- package/src/generator_fn.ts +9 -0
- package/src/index.ts +2 -0
- package/src/test.ts +10 -0
- package/src/type.ts +120 -22
|
@@ -2,63 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkDM5VFX6Bjs = require('./chunk-DM5VFX6B.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
var _chunk3PSJD6BFjs = require('./chunk-3PSJD6BF.js');
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
var _chunkZ46HCVNZjs = require('./chunk-Z46HCVNZ.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
require('./chunk-
|
|
22
|
-
require('./chunk-
|
|
20
|
+
var _chunkU7MLTDS4js = require('./chunk-U7MLTDS4.js');
|
|
21
|
+
require('./chunk-TZ2RKEBF.js');
|
|
22
|
+
require('./chunk-ZWLHVT5O.js');
|
|
23
23
|
require('./chunk-4VNS5WPM.js');
|
|
24
24
|
|
|
25
25
|
// src/create_generator_fn.test.ts
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const value =
|
|
26
|
+
_chunkDM5VFX6Bjs.describe.call(void 0, "createValueGenerator", () => {
|
|
27
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "normal", () => {
|
|
28
|
+
const value = _chunkU7MLTDS4js.createValueGenerator.call(void 0, {
|
|
29
29
|
type: "value",
|
|
30
30
|
generateFn: () => 50
|
|
31
31
|
})();
|
|
32
|
-
|
|
33
|
-
const value2 =
|
|
32
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, value).toBe(50);
|
|
33
|
+
const value2 = _chunkU7MLTDS4js.createValueGenerator.call(void 0, {
|
|
34
34
|
type: "value",
|
|
35
35
|
generateFn: () => ({ age: 100, name: "hello" })
|
|
36
36
|
})();
|
|
37
|
-
|
|
37
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, value2).toEqual({ age: 100, name: "hello" });
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const value =
|
|
40
|
+
_chunkDM5VFX6Bjs.describe.call(void 0, "createSelectionGenerator", () => {
|
|
41
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "normal", () => {
|
|
42
|
+
const value = _chunkU7MLTDS4js.createSelectionGenerator.call(void 0, {
|
|
43
43
|
type: "select",
|
|
44
44
|
items: [1]
|
|
45
45
|
})();
|
|
46
|
-
|
|
47
|
-
const value2 =
|
|
46
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, value).toBe(1);
|
|
47
|
+
const value2 = _chunkU7MLTDS4js.createSelectionGenerator.call(void 0, {
|
|
48
48
|
type: "select",
|
|
49
49
|
items: [30, 30, 30, 30]
|
|
50
50
|
})();
|
|
51
|
-
|
|
51
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, value2).toBe(30);
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const list =
|
|
54
|
+
_chunkDM5VFX6Bjs.describe.call(void 0, "createArrayGenerator", () => {
|
|
55
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "normal", () => {
|
|
56
|
+
const list = _chunkU7MLTDS4js.createArrayGenerator.call(void 0, {
|
|
57
57
|
type: "arr",
|
|
58
58
|
len: 5,
|
|
59
59
|
item: { type: "value", generateFn: () => ({ age: 42 }) }
|
|
60
60
|
})();
|
|
61
|
-
|
|
61
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, list).toEqual([
|
|
62
62
|
{ age: 42 },
|
|
63
63
|
{ age: 42 },
|
|
64
64
|
{ age: 42 },
|
|
@@ -67,23 +67,23 @@ _chunkRDMAE6F2js.describe.call(void 0, "createArrayGenerator", () => {
|
|
|
67
67
|
]);
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const tuple =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
_chunkDM5VFX6Bjs.describe.call(void 0, "createTupleGenerator", () => {
|
|
71
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "normal", () => {
|
|
72
|
+
const tuple = _chunkU7MLTDS4js.createTupleGenerator.call(void 0,
|
|
73
|
+
_chunk3PSJD6BFjs.createTupleConfig.call(void 0, [
|
|
74
|
+
_chunk3PSJD6BFjs.createValueConfig.call(void 0, () => 225),
|
|
75
|
+
_chunk3PSJD6BFjs.createValueConfig.call(void 0, () => "hello world")
|
|
76
76
|
])
|
|
77
77
|
)();
|
|
78
|
-
|
|
78
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, tuple.length).toBe(2);
|
|
79
79
|
const [num, str] = tuple;
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, num).toBe(225);
|
|
81
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, str).toBe("hello world");
|
|
82
82
|
});
|
|
83
83
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const obj =
|
|
84
|
+
_chunkDM5VFX6Bjs.describe.call(void 0, "createObjectGenerator", () => {
|
|
85
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "normal", () => {
|
|
86
|
+
const obj = _chunkU7MLTDS4js.createObjectGenerator.call(void 0, {
|
|
87
87
|
type: "obj",
|
|
88
88
|
content: {
|
|
89
89
|
name: { type: "value", generateFn: () => "John" },
|
|
@@ -91,16 +91,29 @@ _chunkRDMAE6F2js.describe.call(void 0, "createObjectGenerator", () => {
|
|
|
91
91
|
location: { type: "value", generateFn: () => "Taiwan" }
|
|
92
92
|
}
|
|
93
93
|
})();
|
|
94
|
-
|
|
94
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, obj).toEqual({ name: "John", age: 50, location: "Taiwan" });
|
|
95
|
+
});
|
|
96
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "transformer function", () => {
|
|
97
|
+
const obj = _chunkU7MLTDS4js.createObjectGenerator.call(void 0,
|
|
98
|
+
_chunk3PSJD6BFjs.createObjectConfig.call(void 0,
|
|
99
|
+
{
|
|
100
|
+
name: _chunk3PSJD6BFjs.createValueConfig.call(void 0, () => "John"),
|
|
101
|
+
age: _chunk3PSJD6BFjs.createValueConfig.call(void 0, () => 50),
|
|
102
|
+
location: _chunk3PSJD6BFjs.createValueConfig.call(void 0, () => "Taiwan")
|
|
103
|
+
},
|
|
104
|
+
({ age }) => age + 50
|
|
105
|
+
)
|
|
106
|
+
)();
|
|
107
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, obj).toEqual(100);
|
|
95
108
|
});
|
|
96
109
|
});
|
|
97
|
-
|
|
98
|
-
|
|
110
|
+
_chunkDM5VFX6Bjs.describe.call(void 0, "createBoundedSeriesGenerator", () => {
|
|
111
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "normal", () => {
|
|
99
112
|
const upperLimit = 1.1;
|
|
100
113
|
const lowerLimit = 0.9;
|
|
101
114
|
const initValue = 100;
|
|
102
115
|
const count = 100;
|
|
103
|
-
const list =
|
|
116
|
+
const list = _chunkU7MLTDS4js.createBoundedSeriesGenerator.call(void 0, {
|
|
104
117
|
type: "bounded_series",
|
|
105
118
|
upperLimit,
|
|
106
119
|
lowerLimit,
|
|
@@ -111,35 +124,35 @@ _chunkRDMAE6F2js.describe.call(void 0, "createBoundedSeriesGenerator", () => {
|
|
|
111
124
|
const value = list[i];
|
|
112
125
|
if (i === 0) {
|
|
113
126
|
const ratio2 = value / initValue;
|
|
114
|
-
|
|
115
|
-
|
|
127
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, ratio2).toBeLessThanOrEqual(upperLimit);
|
|
128
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, ratio2).toBeGreaterThanOrEqual(lowerLimit);
|
|
116
129
|
continue;
|
|
117
130
|
}
|
|
118
131
|
const prevValue = list[i - 1];
|
|
119
132
|
const ratio = value / prevValue;
|
|
120
|
-
|
|
121
|
-
|
|
133
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, ratio).toBeLessThanOrEqual(upperLimit);
|
|
134
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, ratio).toBeGreaterThanOrEqual(lowerLimit);
|
|
122
135
|
}
|
|
123
136
|
});
|
|
124
137
|
});
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const config =
|
|
128
|
-
name:
|
|
129
|
-
age:
|
|
130
|
-
locations:
|
|
131
|
-
|
|
138
|
+
_chunkDM5VFX6Bjs.describe.call(void 0, "createGeneratorByType", () => {
|
|
139
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "normal", () => {
|
|
140
|
+
const config = _chunk3PSJD6BFjs.createObjectConfig.call(void 0, {
|
|
141
|
+
name: _chunk3PSJD6BFjs.createValueConfig.call(void 0, () => "John"),
|
|
142
|
+
age: _chunk3PSJD6BFjs.createValueConfig.call(void 0, () => 50),
|
|
143
|
+
locations: _chunk3PSJD6BFjs.createArrayConfig.call(void 0,
|
|
144
|
+
_chunk3PSJD6BFjs.createValueConfig.call(void 0, () => "Taiwan"),
|
|
132
145
|
5
|
|
133
146
|
)
|
|
134
147
|
});
|
|
135
|
-
const result =
|
|
136
|
-
|
|
148
|
+
const result = _chunkU7MLTDS4js.createGeneratorByType.call(void 0, config)();
|
|
149
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, result).toEqual({
|
|
137
150
|
name: "John",
|
|
138
151
|
age: 50,
|
|
139
152
|
locations: ["Taiwan", "Taiwan", "Taiwan", "Taiwan", "Taiwan"]
|
|
140
153
|
});
|
|
141
154
|
});
|
|
142
|
-
|
|
155
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "test error config", () => {
|
|
143
156
|
const config = {
|
|
144
157
|
type: "obj",
|
|
145
158
|
content: {
|
|
@@ -149,11 +162,11 @@ _chunkRDMAE6F2js.describe.call(void 0, "createGeneratorByType", () => {
|
|
|
149
162
|
}
|
|
150
163
|
}
|
|
151
164
|
};
|
|
152
|
-
|
|
165
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, () => _chunkU7MLTDS4js.createGeneratorByType.call(void 0, config)).toThrowError();
|
|
153
166
|
});
|
|
154
|
-
|
|
155
|
-
const createIntValueConfig = (option) =>
|
|
156
|
-
const createEmailValueConfig = (option) =>
|
|
167
|
+
_chunkDM5VFX6Bjs.test.call(void 0, "with custom type match", () => {
|
|
168
|
+
const createIntValueConfig = (option) => _chunk3PSJD6BFjs.createValueConfig.call(void 0, () => 50);
|
|
169
|
+
const createEmailValueConfig = (option) => _chunk3PSJD6BFjs.createValueConfig.call(void 0, () => "xxx@example.com");
|
|
157
170
|
const customTypeMatch = (config2) => {
|
|
158
171
|
if (config2.type === "int") {
|
|
159
172
|
return createIntValueConfig(config2.option);
|
|
@@ -163,13 +176,13 @@ _chunkRDMAE6F2js.describe.call(void 0, "createGeneratorByType", () => {
|
|
|
163
176
|
}
|
|
164
177
|
throw Error("error");
|
|
165
178
|
};
|
|
166
|
-
const config =
|
|
179
|
+
const config = _chunk3PSJD6BFjs.createObjectConfig.call(void 0, {
|
|
167
180
|
name: { type: "value", generateFn: () => "John" },
|
|
168
181
|
age: { type: "int" },
|
|
169
182
|
email: { type: "email" }
|
|
170
183
|
});
|
|
171
|
-
const result =
|
|
172
|
-
|
|
184
|
+
const result = _chunkU7MLTDS4js.createGeneratorByType.call(void 0, config, customTypeMatch)();
|
|
185
|
+
_chunkDM5VFX6Bjs.globalExpect.call(void 0, result).toEqual({
|
|
173
186
|
name: "John",
|
|
174
187
|
age: 50,
|
|
175
188
|
email: "xxx@example.com"
|
|
@@ -2,7 +2,13 @@ import {
|
|
|
2
2
|
describe,
|
|
3
3
|
globalExpect,
|
|
4
4
|
test
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VX2IFBCP.mjs";
|
|
6
|
+
import {
|
|
7
|
+
createArrayConfig,
|
|
8
|
+
createObjectConfig,
|
|
9
|
+
createTupleConfig,
|
|
10
|
+
createValueConfig
|
|
11
|
+
} from "./chunk-JTURHVCR.mjs";
|
|
6
12
|
import {
|
|
7
13
|
createArrayGenerator,
|
|
8
14
|
createBoundedSeriesGenerator,
|
|
@@ -11,15 +17,9 @@ import {
|
|
|
11
17
|
createSelectionGenerator,
|
|
12
18
|
createTupleGenerator,
|
|
13
19
|
createValueGenerator
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
createObjectConfig,
|
|
18
|
-
createTupleConfig,
|
|
19
|
-
createValueConfig
|
|
20
|
-
} from "./chunk-RDATYKAG.mjs";
|
|
21
|
-
import "./chunk-Q6CVTFPU.mjs";
|
|
22
|
-
import "./chunk-UP3FJ7EK.mjs";
|
|
20
|
+
} from "./chunk-MLJAHDYX.mjs";
|
|
21
|
+
import "./chunk-3U6BNHWG.mjs";
|
|
22
|
+
import "./chunk-USLYTOPD.mjs";
|
|
23
23
|
import "./chunk-XGB3TDIC.mjs";
|
|
24
24
|
|
|
25
25
|
// src/create_generator_fn.test.ts
|
|
@@ -93,6 +93,19 @@ describe("createObjectGenerator", () => {
|
|
|
93
93
|
})();
|
|
94
94
|
globalExpect(obj).toEqual({ name: "John", age: 50, location: "Taiwan" });
|
|
95
95
|
});
|
|
96
|
+
test("transformer function", () => {
|
|
97
|
+
const obj = createObjectGenerator(
|
|
98
|
+
createObjectConfig(
|
|
99
|
+
{
|
|
100
|
+
name: createValueConfig(() => "John"),
|
|
101
|
+
age: createValueConfig(() => 50),
|
|
102
|
+
location: createValueConfig(() => "Taiwan")
|
|
103
|
+
},
|
|
104
|
+
({ age }) => age + 50
|
|
105
|
+
)
|
|
106
|
+
)();
|
|
107
|
+
globalExpect(obj).toEqual(100);
|
|
108
|
+
});
|
|
96
109
|
});
|
|
97
110
|
describe("createBoundedSeriesGenerator", () => {
|
|
98
111
|
test("normal", () => {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createArrayGenerator, createBoundedSeriesGenerator, createGeneratorByType, createObjectGenerator, createSelectionGenerator, createTupleGenerator, createValueGenerator } from './create_generator_fn.mjs';
|
|
2
|
+
|
|
3
|
+
declare namespace generator_fn {
|
|
4
|
+
export { createArrayGenerator as genArrayFn, createBoundedSeriesGenerator as genBoundedSeriesFn, createGeneratorByType as genFn, createObjectGenerator as genObjectFn, createSelectionGenerator as genSelectFn, createTupleGenerator as genTupleFn, createValueGenerator as genValueFn };
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { generator_fn as g };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createArrayGenerator, createBoundedSeriesGenerator, createGeneratorByType, createObjectGenerator, createSelectionGenerator, createTupleGenerator, createValueGenerator } from './create_generator_fn.js';
|
|
2
|
+
|
|
3
|
+
declare namespace generator_fn {
|
|
4
|
+
export { createArrayGenerator as genArrayFn, createBoundedSeriesGenerator as genBoundedSeriesFn, createGeneratorByType as genFn, createObjectGenerator as genObjectFn, createSelectionGenerator as genSelectFn, createTupleGenerator as genTupleFn, createValueGenerator as genValueFn };
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { generator_fn as g };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { createArrayGenerator as genArrayFn, createBoundedSeriesGenerator as genBoundedSeriesFn, createGeneratorByType as genFn, createObjectGenerator as genObjectFn, createSelectionGenerator as genSelectFn, createTupleGenerator as genTupleFn, createValueGenerator as genValueFn } from './create_generator_fn.mjs';
|
|
2
|
+
import './type.mjs';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { createArrayGenerator as genArrayFn, createBoundedSeriesGenerator as genBoundedSeriesFn, createGeneratorByType as genFn, createObjectGenerator as genObjectFn, createSelectionGenerator as genSelectFn, createTupleGenerator as genTupleFn, createValueGenerator as genValueFn } from './create_generator_fn.js';
|
|
2
|
+
import './type.js';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-UIYW7U2O.js');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkU7MLTDS4js = require('./chunk-U7MLTDS4.js');
|
|
11
|
+
require('./chunk-TZ2RKEBF.js');
|
|
12
|
+
require('./chunk-ZWLHVT5O.js');
|
|
13
|
+
require('./chunk-4VNS5WPM.js');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
exports.genArrayFn = _chunkU7MLTDS4js.createArrayGenerator; exports.genBoundedSeriesFn = _chunkU7MLTDS4js.createBoundedSeriesGenerator; exports.genFn = _chunkU7MLTDS4js.createGeneratorByType; exports.genObjectFn = _chunkU7MLTDS4js.createObjectGenerator; exports.genSelectFn = _chunkU7MLTDS4js.createSelectionGenerator; exports.genTupleFn = _chunkU7MLTDS4js.createTupleGenerator; exports.genValueFn = _chunkU7MLTDS4js.createValueGenerator;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./chunk-QZQ32UPU.mjs";
|
|
2
|
+
import {
|
|
3
|
+
createArrayGenerator,
|
|
4
|
+
createBoundedSeriesGenerator,
|
|
5
|
+
createGeneratorByType,
|
|
6
|
+
createObjectGenerator,
|
|
7
|
+
createSelectionGenerator,
|
|
8
|
+
createTupleGenerator,
|
|
9
|
+
createValueGenerator
|
|
10
|
+
} from "./chunk-MLJAHDYX.mjs";
|
|
11
|
+
import "./chunk-3U6BNHWG.mjs";
|
|
12
|
+
import "./chunk-USLYTOPD.mjs";
|
|
13
|
+
import "./chunk-XGB3TDIC.mjs";
|
|
14
|
+
export {
|
|
15
|
+
createArrayGenerator as genArrayFn,
|
|
16
|
+
createBoundedSeriesGenerator as genBoundedSeriesFn,
|
|
17
|
+
createGeneratorByType as genFn,
|
|
18
|
+
createObjectGenerator as genObjectFn,
|
|
19
|
+
createSelectionGenerator as genSelectFn,
|
|
20
|
+
createTupleGenerator as genTupleFn,
|
|
21
|
+
createValueGenerator as genValueFn
|
|
22
|
+
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { createArrayConfig, createBoundedSeriesConfig, createObjectConfig, createSelectionConfig, createTupleConfig, createValueConfig } from './create_config.mjs';
|
|
2
2
|
export { createArrayGenerator, createBoundedSeriesGenerator, createGeneratorByType, createObjectGenerator, createSelectionGenerator, createTupleGenerator, createValueGenerator } from './create_generator_fn.mjs';
|
|
3
|
-
export { ArrayConfig, BoundedSeriesConfig, ObjectConfig, Result, SelectionConfig, TupleConfig, ValueConfig } from './type.mjs';
|
|
3
|
+
export { ArrayConfig, BoundedSeriesConfig, ObjectConfig, ObjectConfigWithFn, Result, SelectionConfig, TupleConfig, TupleItems, ValueConfig } from './type.mjs';
|
|
4
|
+
export { c as StructConfig } from './config-C1N2Brw-.mjs';
|
|
5
|
+
export { g as StructGenerator } from './generator_fn-CJDbnCZl.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { createArrayConfig, createBoundedSeriesConfig, createObjectConfig, createSelectionConfig, createTupleConfig, createValueConfig } from './create_config.js';
|
|
2
2
|
export { createArrayGenerator, createBoundedSeriesGenerator, createGeneratorByType, createObjectGenerator, createSelectionGenerator, createTupleGenerator, createValueGenerator } from './create_generator_fn.js';
|
|
3
|
-
export { ArrayConfig, BoundedSeriesConfig, ObjectConfig, Result, SelectionConfig, TupleConfig, ValueConfig } from './type.js';
|
|
3
|
+
export { ArrayConfig, BoundedSeriesConfig, ObjectConfig, ObjectConfigWithFn, Result, SelectionConfig, TupleConfig, TupleItems, ValueConfig } from './type.js';
|
|
4
|
+
export { c as StructConfig } from './config-BTjogu5M.js';
|
|
5
|
+
export { g as StructGenerator } from './generator_fn-D-npAfnC.js';
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-SN4QTD6R.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
var _chunk5KKLW4SDjs = require('./chunk-5KKLW4SD.js');
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
var _chunkZ46HCVNZjs = require('./chunk-Z46HCVNZ.js');
|
|
10
|
-
require('./chunk-SN4QTD6R.js');
|
|
11
10
|
|
|
12
11
|
|
|
12
|
+
var _chunk3PSJD6BFjs = require('./chunk-3PSJD6BF.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
var _chunkUIYW7U2Ojs = require('./chunk-UIYW7U2O.js');
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var _chunkU7MLTDS4js = require('./chunk-U7MLTDS4.js');
|
|
25
|
+
require('./chunk-TZ2RKEBF.js');
|
|
26
|
+
require('./chunk-ZWLHVT5O.js');
|
|
21
27
|
require('./chunk-4VNS5WPM.js');
|
|
22
28
|
|
|
23
29
|
|
|
@@ -33,4 +39,6 @@ require('./chunk-4VNS5WPM.js');
|
|
|
33
39
|
|
|
34
40
|
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
exports.StructConfig = _chunk5KKLW4SDjs.config_exports; exports.StructGenerator = _chunkUIYW7U2Ojs.generator_fn_exports; exports.createArrayConfig = _chunk3PSJD6BFjs.createArrayConfig; exports.createArrayGenerator = _chunkU7MLTDS4js.createArrayGenerator; exports.createBoundedSeriesConfig = _chunk3PSJD6BFjs.createBoundedSeriesConfig; exports.createBoundedSeriesGenerator = _chunkU7MLTDS4js.createBoundedSeriesGenerator; exports.createGeneratorByType = _chunkU7MLTDS4js.createGeneratorByType; exports.createObjectConfig = _chunk3PSJD6BFjs.createObjectConfig; exports.createObjectGenerator = _chunkU7MLTDS4js.createObjectGenerator; exports.createSelectionConfig = _chunk3PSJD6BFjs.createSelectionConfig; exports.createSelectionGenerator = _chunkU7MLTDS4js.createSelectionGenerator; exports.createTupleConfig = _chunk3PSJD6BFjs.createTupleConfig; exports.createTupleGenerator = _chunkU7MLTDS4js.createTupleGenerator; exports.createValueConfig = _chunk3PSJD6BFjs.createValueConfig; exports.createValueGenerator = _chunkU7MLTDS4js.createValueGenerator;
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createArrayGenerator,
|
|
3
|
-
createBoundedSeriesGenerator,
|
|
4
|
-
createGeneratorByType,
|
|
5
|
-
createObjectGenerator,
|
|
6
|
-
createSelectionGenerator,
|
|
7
|
-
createTupleGenerator,
|
|
8
|
-
createValueGenerator
|
|
9
|
-
} from "./chunk-4OB35J4Q.mjs";
|
|
10
1
|
import "./chunk-7UQSPUCL.mjs";
|
|
2
|
+
import {
|
|
3
|
+
config_exports
|
|
4
|
+
} from "./chunk-EXLV2IRM.mjs";
|
|
11
5
|
import {
|
|
12
6
|
createArrayConfig,
|
|
13
7
|
createBoundedSeriesConfig,
|
|
@@ -15,11 +9,25 @@ import {
|
|
|
15
9
|
createSelectionConfig,
|
|
16
10
|
createTupleConfig,
|
|
17
11
|
createValueConfig
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import
|
|
20
|
-
|
|
12
|
+
} from "./chunk-JTURHVCR.mjs";
|
|
13
|
+
import {
|
|
14
|
+
generator_fn_exports
|
|
15
|
+
} from "./chunk-QZQ32UPU.mjs";
|
|
16
|
+
import {
|
|
17
|
+
createArrayGenerator,
|
|
18
|
+
createBoundedSeriesGenerator,
|
|
19
|
+
createGeneratorByType,
|
|
20
|
+
createObjectGenerator,
|
|
21
|
+
createSelectionGenerator,
|
|
22
|
+
createTupleGenerator,
|
|
23
|
+
createValueGenerator
|
|
24
|
+
} from "./chunk-MLJAHDYX.mjs";
|
|
25
|
+
import "./chunk-3U6BNHWG.mjs";
|
|
26
|
+
import "./chunk-USLYTOPD.mjs";
|
|
21
27
|
import "./chunk-XGB3TDIC.mjs";
|
|
22
28
|
export {
|
|
29
|
+
config_exports as StructConfig,
|
|
30
|
+
generator_fn_exports as StructGenerator,
|
|
23
31
|
createArrayConfig,
|
|
24
32
|
createArrayGenerator,
|
|
25
33
|
createBoundedSeriesConfig,
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ValueConfig } from './type.mjs';
|
|
2
|
+
|
|
3
|
+
/** Number [bigInt](https://fakerjs.dev/api/number.html#bigInt) */
|
|
4
|
+
declare const bigInt: (options?: string | number | bigint | boolean | {
|
|
5
|
+
min?: bigint | number | string | boolean;
|
|
6
|
+
max?: bigint | number | string | boolean;
|
|
7
|
+
multipleOf?: bigint | number | string | boolean;
|
|
8
|
+
}) => ValueConfig<bigint>;
|
|
9
|
+
/** Number [binary](https://fakerjs.dev/api/number.html#binary) */
|
|
10
|
+
declare const binary: (options?: number | {
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
}) => ValueConfig<string>;
|
|
14
|
+
/** Number [float](https://fakerjs.dev/api/number.html#float) */
|
|
15
|
+
declare const float: (options?: number | {
|
|
16
|
+
min?: number;
|
|
17
|
+
max?: number;
|
|
18
|
+
fractionDigits?: number;
|
|
19
|
+
multipleOf?: number;
|
|
20
|
+
}) => ValueConfig<number>;
|
|
21
|
+
/** Number [hex](https://fakerjs.dev/api/number.html#hex) */
|
|
22
|
+
declare const hex: (options?: number | {
|
|
23
|
+
min?: number;
|
|
24
|
+
max?: number;
|
|
25
|
+
}) => ValueConfig<string>;
|
|
26
|
+
/** Number [int](https://fakerjs.dev/api/number.html#int) */
|
|
27
|
+
declare const int: (options?: number | {
|
|
28
|
+
min?: number;
|
|
29
|
+
max?: number;
|
|
30
|
+
multipleOf?: number;
|
|
31
|
+
}) => ValueConfig<number>;
|
|
32
|
+
/** Number [octal](https://fakerjs.dev/api/number.html#octal) */
|
|
33
|
+
declare const octal: (options?: number | {
|
|
34
|
+
min?: number;
|
|
35
|
+
max?: number;
|
|
36
|
+
}) => ValueConfig<string>;
|
|
37
|
+
|
|
38
|
+
declare const number_bigInt: typeof bigInt;
|
|
39
|
+
declare const number_binary: typeof binary;
|
|
40
|
+
declare const number_float: typeof float;
|
|
41
|
+
declare const number_hex: typeof hex;
|
|
42
|
+
declare const number_int: typeof int;
|
|
43
|
+
declare const number_octal: typeof octal;
|
|
44
|
+
declare namespace number {
|
|
45
|
+
export { number_bigInt as bigInt, number_binary as binary, number_float as float, number_hex as hex, number_int as int, number_octal as octal };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { binary as a, bigInt as b, float as f, hex as h, int as i, number as n, octal as o };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ValueConfig } from './type.js';
|
|
2
|
+
|
|
3
|
+
/** Number [bigInt](https://fakerjs.dev/api/number.html#bigInt) */
|
|
4
|
+
declare const bigInt: (options?: string | number | bigint | boolean | {
|
|
5
|
+
min?: bigint | number | string | boolean;
|
|
6
|
+
max?: bigint | number | string | boolean;
|
|
7
|
+
multipleOf?: bigint | number | string | boolean;
|
|
8
|
+
}) => ValueConfig<bigint>;
|
|
9
|
+
/** Number [binary](https://fakerjs.dev/api/number.html#binary) */
|
|
10
|
+
declare const binary: (options?: number | {
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
}) => ValueConfig<string>;
|
|
14
|
+
/** Number [float](https://fakerjs.dev/api/number.html#float) */
|
|
15
|
+
declare const float: (options?: number | {
|
|
16
|
+
min?: number;
|
|
17
|
+
max?: number;
|
|
18
|
+
fractionDigits?: number;
|
|
19
|
+
multipleOf?: number;
|
|
20
|
+
}) => ValueConfig<number>;
|
|
21
|
+
/** Number [hex](https://fakerjs.dev/api/number.html#hex) */
|
|
22
|
+
declare const hex: (options?: number | {
|
|
23
|
+
min?: number;
|
|
24
|
+
max?: number;
|
|
25
|
+
}) => ValueConfig<string>;
|
|
26
|
+
/** Number [int](https://fakerjs.dev/api/number.html#int) */
|
|
27
|
+
declare const int: (options?: number | {
|
|
28
|
+
min?: number;
|
|
29
|
+
max?: number;
|
|
30
|
+
multipleOf?: number;
|
|
31
|
+
}) => ValueConfig<number>;
|
|
32
|
+
/** Number [octal](https://fakerjs.dev/api/number.html#octal) */
|
|
33
|
+
declare const octal: (options?: number | {
|
|
34
|
+
min?: number;
|
|
35
|
+
max?: number;
|
|
36
|
+
}) => ValueConfig<string>;
|
|
37
|
+
|
|
38
|
+
declare const number_bigInt: typeof bigInt;
|
|
39
|
+
declare const number_binary: typeof binary;
|
|
40
|
+
declare const number_float: typeof float;
|
|
41
|
+
declare const number_hex: typeof hex;
|
|
42
|
+
declare const number_int: typeof int;
|
|
43
|
+
declare const number_octal: typeof octal;
|
|
44
|
+
declare namespace number {
|
|
45
|
+
export { number_bigInt as bigInt, number_binary as binary, number_float as float, number_hex as hex, number_int as int, number_octal as octal };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { binary as a, bigInt as b, float as f, hex as h, int as i, number as n, octal as o };
|
package/dist/test.d.mts
ADDED
package/dist/test.d.ts
ADDED
package/dist/test.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk3PSJD6BFjs = require('./chunk-3PSJD6BF.js');
|
|
5
|
+
require('./chunk-ZWLHVT5O.js');
|
|
6
|
+
require('./chunk-4VNS5WPM.js');
|
|
7
|
+
|
|
8
|
+
// src/test.ts
|
|
9
|
+
var a = _chunk3PSJD6BFjs.createObjectConfig.call(void 0,
|
|
10
|
+
{
|
|
11
|
+
a: _chunk3PSJD6BFjs.createValueConfig.call(void 0, () => 1),
|
|
12
|
+
b: _chunk3PSJD6BFjs.createValueConfig.call(void 0, () => 2)
|
|
13
|
+
},
|
|
14
|
+
({ a: a2 }) => a2 + 100
|
|
15
|
+
);
|
package/dist/test.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createObjectConfig,
|
|
3
|
+
createValueConfig
|
|
4
|
+
} from "./chunk-JTURHVCR.mjs";
|
|
5
|
+
import "./chunk-USLYTOPD.mjs";
|
|
6
|
+
import "./chunk-XGB3TDIC.mjs";
|
|
7
|
+
|
|
8
|
+
// src/test.ts
|
|
9
|
+
var a = createObjectConfig(
|
|
10
|
+
{
|
|
11
|
+
a: createValueConfig(() => 1),
|
|
12
|
+
b: createValueConfig(() => 2)
|
|
13
|
+
},
|
|
14
|
+
({ a: a2 }) => a2 + 100
|
|
15
|
+
);
|