@adviser/cement 0.2.34 → 0.2.35
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs +84 -23
- package/index.cjs.map +1 -1
- package/index.d.cts +9 -6
- package/index.d.ts +9 -6
- package/index.js +89 -27
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/jsr.json +1 -1
- package/src/logger-impl.ts +51 -4
- package/src/logger.ts +47 -16
- package/src/uri.ts +29 -20
- package/src/utils/stripper.ts +11 -4
- package/ts/logger-impl.d.ts +2 -0
- package/ts/logger-impl.d.ts.map +1 -1
- package/ts/logger-impl.js +49 -4
- package/ts/logger-impl.js.map +1 -1
- package/ts/logger.d.ts +2 -1
- package/ts/logger.d.ts.map +1 -1
- package/ts/logger.js +23 -15
- package/ts/logger.js.map +1 -1
- package/ts/logger.test.js +175 -0
- package/ts/logger.test.js.map +1 -1
- package/ts/uri.d.ts +4 -4
- package/ts/uri.d.ts.map +1 -1
- package/ts/uri.js +12 -4
- package/ts/uri.js.map +1 -1
- package/ts/uri.test.js +15 -0
- package/ts/uri.test.js.map +1 -1
- package/ts/utils/stripper.d.ts +1 -1
- package/ts/utils/stripper.d.ts.map +1 -1
- package/ts/utils/stripper.js +3 -0
- package/ts/utils/stripper.js.map +1 -1
- package/ts/utils/stripper.test.js +31 -0
- package/ts/utils/stripper.test.js.map +1 -1
@@ -94,4 +94,35 @@ it("array dotted concrete stripper", () => {
|
|
94
94
|
],
|
95
95
|
});
|
96
96
|
});
|
97
|
+
it("return type unknown|unknown[]", () => {
|
98
|
+
const plain = stripper(["main"], { main: "main" });
|
99
|
+
expectTypeOf(plain).toEqualTypeOf();
|
100
|
+
const aplain = stripper(["main"], [{ main: "main" }]);
|
101
|
+
expectTypeOf(aplain).toEqualTypeOf();
|
102
|
+
});
|
103
|
+
it("array top level stripper", () => {
|
104
|
+
expect(stripper(["main"], [
|
105
|
+
{ o: 1, main: "main" },
|
106
|
+
{ o: 2, main: "main" },
|
107
|
+
[
|
108
|
+
{ o: 3, main: "main" },
|
109
|
+
{ o: 4, main: "main" },
|
110
|
+
],
|
111
|
+
])).toEqual([
|
112
|
+
{
|
113
|
+
o: 1,
|
114
|
+
},
|
115
|
+
{
|
116
|
+
o: 2,
|
117
|
+
},
|
118
|
+
[
|
119
|
+
{
|
120
|
+
o: 3,
|
121
|
+
},
|
122
|
+
{
|
123
|
+
o: 4,
|
124
|
+
},
|
125
|
+
],
|
126
|
+
]);
|
127
|
+
});
|
97
128
|
//# sourceMappingURL=stripper.test.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stripper.test.js","sourceRoot":"","sources":["../../../src/utils/stripper.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;SACb;KACF;IACD,MAAM,EAAE;QACN,MAAM;QACN,MAAM;QACN;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,MAAM;aACb;SACF;KACF;CACF,CAAC;AACF,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;IACxB,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACjC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;QAC1D,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;SACX;QACD,MAAM,EAAE;Y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