@adviser/cement 0.2.30 → 0.2.31
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs +27 -11
- package/index.cjs.map +1 -1
- package/index.d.cts +17 -2
- package/index.d.ts +17 -2
- package/index.js +31 -15
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/jsr.json +1 -1
- package/src/uri.ts +43 -9
- package/src/utils/stripper.ts +59 -0
- package/ts/uri.d.ts +16 -1
- package/ts/uri.d.ts.map +1 -1
- package/ts/uri.js +21 -9
- package/ts/uri.js.map +1 -1
- package/ts/uri.test.js +28 -0
- package/ts/uri.test.js.map +1 -1
- package/ts/utils/stripper.d.ts +3 -0
- package/ts/utils/stripper.d.ts.map +1 -0
- package/ts/utils/stripper.js +56 -0
- package/ts/utils/stripper.js.map +1 -0
- package/ts/utils/stripper.test.d.ts +2 -0
- package/ts/utils/stripper.test.d.ts.map +1 -0
- package/ts/utils/stripper.test.js +97 -0
- package/ts/utils/stripper.test.js.map +1 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
export type StripCommand = string | RegExp;
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
3
|
+
export function stripper<T>(strip: StripCommand | StripCommand[], obj: T): Record<string, any> {
|
4
|
+
const strips = Array.isArray(strip) ? strip : [strip];
|
5
|
+
const restrips = strips.map((s) => {
|
6
|
+
if (typeof s === "string") {
|
7
|
+
const escaped = s.replace(/[-\\[\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\^\\$\\|]/g, "\\$&");
|
8
|
+
return new RegExp(`^${escaped}$`);
|
9
|
+
}
|
10
|
+
return s;
|
11
|
+
});
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
13
|
+
return localStripper(undefined, restrips, obj) as Record<string, any>;
|
14
|
+
}
|
15
|
+
|
16
|
+
function localStripper<T>(path: string | undefined, restrips: RegExp[], obj: T): unknown {
|
17
|
+
if (typeof obj !== "object" || obj === null) {
|
18
|
+
return obj;
|
19
|
+
}
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
21
|
+
const ret = { ...obj } as Record<string, any>;
|
22
|
+
const matcher = (key: string, nextPath: string): boolean => {
|
23
|
+
for (const re of restrips) {
|
24
|
+
if (re.test(key) || re.test(nextPath)) {
|
25
|
+
return true;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
return false;
|
29
|
+
};
|
30
|
+
for (const key in ret) {
|
31
|
+
if (Object.prototype.hasOwnProperty.call(ret, key)) {
|
32
|
+
let nextPath: string;
|
33
|
+
if (path) {
|
34
|
+
nextPath = [path, key].join(".");
|
35
|
+
} else {
|
36
|
+
nextPath = key;
|
37
|
+
}
|
38
|
+
if (matcher(key, nextPath)) {
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
40
|
+
delete ret[key];
|
41
|
+
continue;
|
42
|
+
}
|
43
|
+
if (typeof ret[key] === "object") {
|
44
|
+
if (Array.isArray(ret[key])) {
|
45
|
+
ret[key] = ret[key].reduce((acc, v, i) => {
|
46
|
+
const toDelete = matcher(key, `${nextPath}[${i}]`);
|
47
|
+
if (!toDelete) {
|
48
|
+
acc.push(localStripper(`${nextPath}[${i}]`, restrips, v));
|
49
|
+
}
|
50
|
+
return acc;
|
51
|
+
}, []);
|
52
|
+
} else {
|
53
|
+
ret[key] = localStripper(nextPath, restrips, ret[key]);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
return ret;
|
59
|
+
}
|
package/ts/uri.d.ts
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
import { Result } from "./result.js";
|
2
2
|
type NullOrUndef = null | undefined;
|
3
|
+
export interface URIObject {
|
4
|
+
readonly style: "host" | "path";
|
5
|
+
readonly protocol: string;
|
6
|
+
readonly pathname: string;
|
7
|
+
readonly searchParams: Record<string, string>;
|
8
|
+
}
|
9
|
+
export interface PathURIObject extends URIObject {
|
10
|
+
readonly style: "path";
|
11
|
+
}
|
12
|
+
export interface HostURIObject extends URIObject {
|
13
|
+
readonly style: "host";
|
14
|
+
readonly hostname: string;
|
15
|
+
readonly port: string;
|
16
|
+
}
|
3
17
|
export declare function isURL(value: unknown): value is URL;
|
4
18
|
export declare class MutableURL extends URL {
|
5
19
|
private readonly _sysURL;
|
@@ -40,7 +54,7 @@ export declare class BuildURI {
|
|
40
54
|
URI(): URI;
|
41
55
|
}
|
42
56
|
export type CoerceURI = string | URI | MutableURL | URL | BuildURI | NullOrUndef;
|
43
|
-
export declare const
|
57
|
+
export declare const hasHostPartProtocols: Set<string>;
|
44
58
|
export declare class URI {
|
45
59
|
static protocolHasHostpart(protocol: string): () => void;
|
46
60
|
static merge(into: CoerceURI, from: CoerceURI, defaultProtocol?: string): URI;
|
@@ -62,6 +76,7 @@ export declare class URI {
|
|
62
76
|
asURL(): URL;
|
63
77
|
toString(): string;
|
64
78
|
toJSON(): string;
|
79
|
+
asObj(): HostURIObject | PathURIObject;
|
65
80
|
}
|
66
81
|
export {};
|
67
82
|
//# sourceMappingURL=uri.d.ts.map
|
package/ts/uri.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../src/uri.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,MAAM,aAAa,CAAC;AAEvD,KAAK,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../src/uri.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,MAAM,aAAa,CAAC;AAEvD,KAAK,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;AAEpC,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC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AC,SAAS,CAAC,EAAE,SAAS,EAAE,eAAe,SAAU,GAAG,MAAM,CAAC,GAAG,CAAC;IAIhF,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,OAAO;IAIP,KAAK,IAAI,QAAQ;IAIjB,IAAI,QAAQ,IAAI,MAAM,CAErB;IAMD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAUD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,QAAQ,IAAI,MAAM,CAMrB;IAUD,IAAI,SAAS,IAAI,QAAQ,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAE1C;IAED,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAG9B,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIzC,KAAK,IAAI,GAAG;IAIZ,KAAK,IAAI,GAAG;IAMZ,QAAQ,IAAI,MAAM;IAIlB,MAAM,IAAI,MAAM;IAGhB,KAAK,IAAI,aAAa,GAAG,aAAa;CAiBvC"}
|
package/ts/uri.js
CHANGED
@@ -29,7 +29,7 @@ export class MutableURL extends URL {
|
|
29
29
|
constructor(urlStr) {
|
30
30
|
super("defect://does.not.exist");
|
31
31
|
const partedURL = urlStr.split(":");
|
32
|
-
this._hasHostpart =
|
32
|
+
this._hasHostpart = hasHostPartProtocols.has(partedURL[0]);
|
33
33
|
let hostPartUrl = ["http", ...partedURL.slice(1)].join(":");
|
34
34
|
if (!this._hasHostpart) {
|
35
35
|
const pathname = hostPartUrl.replace(/http:\/\/[/]*/, "").replace(/[#?].*$/, "");
|
@@ -57,31 +57,31 @@ export class MutableURL extends URL {
|
|
57
57
|
}
|
58
58
|
get host() {
|
59
59
|
if (!this._hasHostpart) {
|
60
|
-
throw new Error(`you can use hostname only if protocol is ${this.toString()} ${JSON.stringify(Array.from(
|
60
|
+
throw new Error(`you can use hostname only if protocol is ${this.toString()} ${JSON.stringify(Array.from(hasHostPartProtocols.keys()))}`);
|
61
61
|
}
|
62
62
|
return this._sysURL.host;
|
63
63
|
}
|
64
64
|
get port() {
|
65
65
|
if (!this._hasHostpart) {
|
66
|
-
throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(
|
66
|
+
throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(hasHostPartProtocols.keys()))}`);
|
67
67
|
}
|
68
68
|
return this._sysURL.port;
|
69
69
|
}
|
70
70
|
set port(p) {
|
71
71
|
if (!this._hasHostpart) {
|
72
|
-
throw new Error(`you can use port only if protocol is ${JSON.stringify(Array.from(
|
72
|
+
throw new Error(`you can use port only if protocol is ${JSON.stringify(Array.from(hasHostPartProtocols.keys()))}`);
|
73
73
|
}
|
74
74
|
this._sysURL.port = p;
|
75
75
|
}
|
76
76
|
get hostname() {
|
77
77
|
if (!this._hasHostpart) {
|
78
|
-
throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(
|
78
|
+
throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(hasHostPartProtocols.keys()))}`);
|
79
79
|
}
|
80
80
|
return this._sysURL.hostname;
|
81
81
|
}
|
82
82
|
set hostname(h) {
|
83
83
|
if (!this._hasHostpart) {
|
84
|
-
throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(
|
84
|
+
throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(hasHostPartProtocols.keys()))}`);
|
85
85
|
}
|
86
86
|
this._sysURL.hostname = h;
|
87
87
|
}
|
@@ -202,13 +202,13 @@ export class BuildURI {
|
|
202
202
|
return URI.from(this._url);
|
203
203
|
}
|
204
204
|
}
|
205
|
-
export const
|
205
|
+
export const hasHostPartProtocols = new Set(["http", "https", "ws", "wss"]);
|
206
206
|
export class URI {
|
207
207
|
static protocolHasHostpart(protocol) {
|
208
208
|
protocol = protocol.replace(/:$/, "");
|
209
|
-
|
209
|
+
hasHostPartProtocols.add(protocol);
|
210
210
|
return () => {
|
211
|
-
|
211
|
+
hasHostPartProtocols.delete(protocol);
|
212
212
|
};
|
213
213
|
}
|
214
214
|
static merge(into, from, defaultProtocol = "file:") {
|
@@ -279,5 +279,17 @@ export class URI {
|
|
279
279
|
toJSON() {
|
280
280
|
return this.toString();
|
281
281
|
}
|
282
|
+
asObj() {
|
283
|
+
const pathURI = {
|
284
|
+
style: "path",
|
285
|
+
protocol: this.protocol,
|
286
|
+
pathname: this.pathname,
|
287
|
+
searchParams: Object.fromEntries(this.getParams),
|
288
|
+
};
|
289
|
+
if (hasHostPartProtocols.has(this.protocol.replace(/:$/, ""))) {
|
290
|
+
return Object.assign(Object.assign({}, pathURI), { style: "host", hostname: this.hostname, port: this.port });
|
291
|
+
}
|
292
|
+
return pathURI;
|
293
|
+
}
|
282
294
|
}
|
283
295
|
//# sourceMappingURL=uri.js.map
|
package/ts/uri.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../src/uri.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAU,MAAM,aAAa,CAAC;AAIvD,SAAS,WAAW,CAAI,KAAsB;IAC5C,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AACnE,CAAC;AAED,SAAS,yBAAyB,CAAC,GAAiB,EAAE,eAAuB;IAC3E,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,UAAU,CAAC,GAAG,eAAe,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC;YACH,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;QAE7B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,IAAI,UAAU,CAAC,GAAG,eAAe,KAAK,GAAG,EAAE,CAAC,CAAC;QACtD,C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
});
|
118
|
+
it("host uri as json with omit", () => {
|
119
|
+
const uri = URI.from("http://example.com:8000/bla/blub?name=test&store=meta&key=%40bla");
|
120
|
+
expect(uri.asObj()).toEqual({
|
121
|
+
style: "host",
|
122
|
+
protocol: "http:",
|
123
|
+
hostname: "example.com",
|
124
|
+
port: "8000",
|
125
|
+
pathname: "/bla/blub",
|
126
|
+
searchParams: {
|
127
|
+
store: "meta",
|
128
|
+
name: "test",
|
129
|
+
key: "@bla",
|
130
|
+
},
|
131
|
+
});
|
132
|
+
});
|
133
|
+
it("path uri as json with omit", () => {
|
134
|
+
const uri = URI.from("blix://bla/blub?name=test&store=meta&key=%40bla");
|
135
|
+
expect(uri.asObj()).toEqual({
|
136
|
+
style: "path",
|
137
|
+
protocol: "blix:",
|
138
|
+
pathname: "bla/blub",
|
139
|
+
searchParams: {
|
140
|
+
store: "meta",
|
141
|
+
name: "test",
|
142
|
+
key: "@bla",
|
143
|
+
},
|
144
|
+
});
|
145
|
+
});
|
118
146
|
});
|
119
147
|
//# sourceMappingURL=uri.test.js.map
|
package/ts/uri.test.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"uri.test.js","sourceRoot":"","sources":["../../src/uri.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
1
|
+
{"version":3,"file":"uri.test.js","sourceRoot":"","sources":["../../src/uri.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,UAAU,EAAiB,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE1F,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,IAAI,GAAa,CAAC;IAClB,UAAU,CAAC,GAAG,EAAE;QACd,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC;QAC1D,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACxB,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE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tB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stripper.d.ts","sourceRoot":"","sources":["../../../src/utils/stripper.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,GAAG,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAW7F"}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
export function stripper(strip, obj) {
|
2
|
+
const strips = Array.isArray(strip) ? strip : [strip];
|
3
|
+
const restrips = strips.map((s) => {
|
4
|
+
if (typeof s === "string") {
|
5
|
+
const escaped = s.replace(/[-\\[\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\^\\$\\|]/g, "\\$&");
|
6
|
+
return new RegExp(`^${escaped}$`);
|
7
|
+
}
|
8
|
+
return s;
|
9
|
+
});
|
10
|
+
return localStripper(undefined, restrips, obj);
|
11
|
+
}
|
12
|
+
function localStripper(path, restrips, obj) {
|
13
|
+
if (typeof obj !== "object" || obj === null) {
|
14
|
+
return obj;
|
15
|
+
}
|
16
|
+
const ret = Object.assign({}, obj);
|
17
|
+
const matcher = (key, nextPath) => {
|
18
|
+
for (const re of restrips) {
|
19
|
+
if (re.test(key) || re.test(nextPath)) {
|
20
|
+
return true;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
return false;
|
24
|
+
};
|
25
|
+
for (const key in ret) {
|
26
|
+
if (Object.prototype.hasOwnProperty.call(ret, key)) {
|
27
|
+
let nextPath;
|
28
|
+
if (path) {
|
29
|
+
nextPath = [path, key].join(".");
|
30
|
+
}
|
31
|
+
else {
|
32
|
+
nextPath = key;
|
33
|
+
}
|
34
|
+
if (matcher(key, nextPath)) {
|
35
|
+
delete ret[key];
|
36
|
+
continue;
|
37
|
+
}
|
38
|
+
if (typeof ret[key] === "object") {
|
39
|
+
if (Array.isArray(ret[key])) {
|
40
|
+
ret[key] = ret[key].reduce((acc, v, i) => {
|
41
|
+
const toDelete = matcher(key, `${nextPath}[${i}]`);
|
42
|
+
if (!toDelete) {
|
43
|
+
acc.push(localStripper(`${nextPath}[${i}]`, restrips, v));
|
44
|
+
}
|
45
|
+
return acc;
|
46
|
+
}, []);
|
47
|
+
}
|
48
|
+
else {
|
49
|
+
ret[key] = localStripper(nextPath, restrips, ret[key]);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
return ret;
|
55
|
+
}
|
56
|
+
//# sourceMappingURL=stripper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stripper.js","sourceRoot":"","sources":["../../../src/utils/stripper.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ,CAAI,KAAoC,EAAE,GAAM;IACtE,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QAChC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC1B,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,iDAAiD,EAAE,MAAM,CAAC,CAAC;YACrF,OAAO,IAAI,MAAM,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;IAEH,OAAO,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAwB,CAAC;AACxE,CAAC;AAED,SAAS,aAAa,CAAI,IAAwB,EAAE,QAAkB,EAAE,GAAM;IAC5E,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CA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AC,CAAC;wBACnD,IAAI,CAAC,QAAQ,EAAE,CAAC;4BACd,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,QAAQ,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;wBAC5D,CAAC;wBACD,OAAO,GAAG,CAAC;oBACb,CAAC,EAAE,EAAE,CAAC,CAAC;gBACT,CAAC;qBAAM,CAAC;oBACN,GAAG,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;gBACzD,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stripper.test.d.ts","sourceRoot":"","sources":["../../../src/utils/stripper.test.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
import { stripper } from "./stripper.js";
|
2
|
+
const toStrip = {
|
3
|
+
main: "main",
|
4
|
+
Main: "main",
|
5
|
+
nested: {
|
6
|
+
main: "main",
|
7
|
+
Main: "main",
|
8
|
+
nested: {
|
9
|
+
main: "main",
|
10
|
+
Main: "main",
|
11
|
+
},
|
12
|
+
},
|
13
|
+
arrays: [
|
14
|
+
"main",
|
15
|
+
"Main",
|
16
|
+
{
|
17
|
+
main: "main",
|
18
|
+
Main: "main",
|
19
|
+
nested: {
|
20
|
+
main: "main",
|
21
|
+
Main: "main",
|
22
|
+
},
|
23
|
+
},
|
24
|
+
],
|
25
|
+
};
|
26
|
+
it("empty stripper", () => {
|
27
|
+
expect(stripper("", toStrip)).toEqual(toStrip);
|
28
|
+
});
|
29
|
+
it("array concrete stripper", () => {
|
30
|
+
expect(stripper(["main", "Main", "blub"], toStrip)).toEqual({
|
31
|
+
nested: {
|
32
|
+
nested: {},
|
33
|
+
},
|
34
|
+
arrays: [
|
35
|
+
"main",
|
36
|
+
"Main",
|
37
|
+
{
|
38
|
+
nested: {},
|
39
|
+
},
|
40
|
+
],
|
41
|
+
});
|
42
|
+
});
|
43
|
+
it("array simple regex concrete stripper", () => {
|
44
|
+
expect(stripper([/ain$/, "blub"], toStrip)).toEqual({
|
45
|
+
nested: {
|
46
|
+
nested: {},
|
47
|
+
},
|
48
|
+
arrays: [
|
49
|
+
"main",
|
50
|
+
"Main",
|
51
|
+
{
|
52
|
+
nested: {},
|
53
|
+
},
|
54
|
+
],
|
55
|
+
});
|
56
|
+
});
|
57
|
+
it("array regex concrete stripper", () => {
|
58
|
+
expect(stripper([/Main/, "blub"], toStrip)).toEqual({
|
59
|
+
main: "main",
|
60
|
+
nested: {
|
61
|
+
main: "main",
|
62
|
+
nested: {
|
63
|
+
main: "main",
|
64
|
+
},
|
65
|
+
},
|
66
|
+
arrays: [
|
67
|
+
"main",
|
68
|
+
"Main",
|
69
|
+
{
|
70
|
+
main: "main",
|
71
|
+
nested: {
|
72
|
+
main: "main",
|
73
|
+
},
|
74
|
+
},
|
75
|
+
],
|
76
|
+
});
|
77
|
+
});
|
78
|
+
it("array dotted concrete stripper", () => {
|
79
|
+
expect(stripper(["nested.main", "blub", "nested.nested.Main", "arrays[1]", "arrays[2].main", /arrays.2..nested..ain/], toStrip)).toEqual({
|
80
|
+
main: "main",
|
81
|
+
Main: "main",
|
82
|
+
nested: {
|
83
|
+
Main: "main",
|
84
|
+
nested: {
|
85
|
+
main: "main",
|
86
|
+
},
|
87
|
+
},
|
88
|
+
arrays: [
|
89
|
+
"main",
|
90
|
+
{
|
91
|
+
Main: "main",
|
92
|
+
nested: {},
|
93
|
+
},
|
94
|
+
],
|
95
|
+
});
|
96
|
+
});
|
97
|
+
//# sourceMappingURL=stripper.test.js.map
|
@@ -0,0 +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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