@koine/utils 1.1.11 → 1.1.14
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 +9 -8
- package/without.d.ts +0 -0
- package/without.js +56 -0
- package/without.mjs +56 -0
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koine/utils",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"
|
|
5
|
-
"types": "./index.d.ts",
|
|
6
|
-
"dependencies": {},
|
|
7
|
-
"peerDependencies": {
|
|
4
|
+
"dependencies": {
|
|
8
5
|
"clsx": "1.2.1",
|
|
9
|
-
"ts-debounce": "4.0.0",
|
|
10
|
-
"type-fest": "3.5.
|
|
11
|
-
"tslib": "2.5.0"
|
|
6
|
+
"ts-debounce": "^4.0.0",
|
|
7
|
+
"type-fest": "^3.5.7"
|
|
12
8
|
},
|
|
13
|
-
"
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"tslib": "^2.5.0"
|
|
11
|
+
},
|
|
12
|
+
"main": "./index.js",
|
|
13
|
+
"types": "./index.d.ts",
|
|
14
|
+
"version": "1.1.14",
|
|
14
15
|
"module": "./index.mjs"
|
|
15
16
|
}
|
package/without.d.ts
ADDED
|
File without changes
|
package/without.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
// TODO: finish this up, this is not exported yet
|
|
4
|
+
// ready to copy-paste to https://www.typescriptlang.org/play
|
|
5
|
+
// type EmptyObject = Record<string, never>;
|
|
6
|
+
// type EmptyArray = never[];
|
|
7
|
+
// type EmptyString = "";
|
|
8
|
+
// type WithoutEmptyObject<T> = T extends EmptyObject ? never : T;
|
|
9
|
+
// type WithoutEmptyArray<T> = T extends EmptyArray ? never : T;
|
|
10
|
+
// type WithoutEmptyString<T> = T extends EmptyString ? never : T;
|
|
11
|
+
// type WithoutEmpty<T> = T extends EmptyObject | EmptyArray | EmptyString | null | undefined ? never : T;
|
|
12
|
+
// function withoutEmptyObject<T>(arg: WithoutEmptyObject<T>) {
|
|
13
|
+
// return arg;
|
|
14
|
+
// }
|
|
15
|
+
// function withoutEmptyArray<T>(arg: WithoutEmptyArray<T>) {
|
|
16
|
+
// return arg;
|
|
17
|
+
// }
|
|
18
|
+
// function withoutEmptyString<T>(arg: WithoutEmptyString<T>) {
|
|
19
|
+
// return arg;
|
|
20
|
+
// }
|
|
21
|
+
// function withoutEmpty<T>(arg: WithoutEmpty<T>) {
|
|
22
|
+
// return arg;
|
|
23
|
+
// }
|
|
24
|
+
// // @ts-expect-error
|
|
25
|
+
// const o1 = withoutEmptyObject({});
|
|
26
|
+
// // ^?
|
|
27
|
+
// const o2 = withoutEmptyObject({ accepted: 1 });
|
|
28
|
+
// // @ts-expect-error
|
|
29
|
+
// const a1 = withoutEmptyArray([]);
|
|
30
|
+
// // ^?
|
|
31
|
+
// const a2 = withoutEmptyArray(["accepted"]);
|
|
32
|
+
// // ^?
|
|
33
|
+
// const a3 = withoutEmptyArray("accepted");
|
|
34
|
+
// // ^?
|
|
35
|
+
// const a4 = withoutEmptyArray("accepted" === "accepted");
|
|
36
|
+
// // ^?
|
|
37
|
+
// // @ts-expect-error
|
|
38
|
+
// const s1 = withoutEmptyString("");
|
|
39
|
+
// // ^?
|
|
40
|
+
// const s2 = withoutEmptyString("accepted");
|
|
41
|
+
// // ^?
|
|
42
|
+
// // @ts-expect-error
|
|
43
|
+
// const w1 = withoutEmpty("");
|
|
44
|
+
// // ^?
|
|
45
|
+
// // @ts-expect-error
|
|
46
|
+
// const w2 = withoutEmpty(undefined);
|
|
47
|
+
// // ^?
|
|
48
|
+
// // @ts-expect-error
|
|
49
|
+
// const w3 = withoutEmpty(null);
|
|
50
|
+
// // ^?
|
|
51
|
+
// // @ts-expect-error
|
|
52
|
+
// const w4 = withoutEmpty({});
|
|
53
|
+
// // ^?
|
|
54
|
+
// // @ts-expect-error
|
|
55
|
+
// const w5 = withoutEmpty([]);
|
|
56
|
+
// // ^?
|
package/without.mjs
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
// TODO: finish this up, this is not exported yet
|
|
4
|
+
// ready to copy-paste to https://www.typescriptlang.org/play
|
|
5
|
+
// type EmptyObject = Record<string, never>;
|
|
6
|
+
// type EmptyArray = never[];
|
|
7
|
+
// type EmptyString = "";
|
|
8
|
+
// type WithoutEmptyObject<T> = T extends EmptyObject ? never : T;
|
|
9
|
+
// type WithoutEmptyArray<T> = T extends EmptyArray ? never : T;
|
|
10
|
+
// type WithoutEmptyString<T> = T extends EmptyString ? never : T;
|
|
11
|
+
// type WithoutEmpty<T> = T extends EmptyObject | EmptyArray | EmptyString | null | undefined ? never : T;
|
|
12
|
+
// function withoutEmptyObject<T>(arg: WithoutEmptyObject<T>) {
|
|
13
|
+
// return arg;
|
|
14
|
+
// }
|
|
15
|
+
// function withoutEmptyArray<T>(arg: WithoutEmptyArray<T>) {
|
|
16
|
+
// return arg;
|
|
17
|
+
// }
|
|
18
|
+
// function withoutEmptyString<T>(arg: WithoutEmptyString<T>) {
|
|
19
|
+
// return arg;
|
|
20
|
+
// }
|
|
21
|
+
// function withoutEmpty<T>(arg: WithoutEmpty<T>) {
|
|
22
|
+
// return arg;
|
|
23
|
+
// }
|
|
24
|
+
// // @ts-expect-error
|
|
25
|
+
// const o1 = withoutEmptyObject({});
|
|
26
|
+
// // ^?
|
|
27
|
+
// const o2 = withoutEmptyObject({ accepted: 1 });
|
|
28
|
+
// // @ts-expect-error
|
|
29
|
+
// const a1 = withoutEmptyArray([]);
|
|
30
|
+
// // ^?
|
|
31
|
+
// const a2 = withoutEmptyArray(["accepted"]);
|
|
32
|
+
// // ^?
|
|
33
|
+
// const a3 = withoutEmptyArray("accepted");
|
|
34
|
+
// // ^?
|
|
35
|
+
// const a4 = withoutEmptyArray("accepted" === "accepted");
|
|
36
|
+
// // ^?
|
|
37
|
+
// // @ts-expect-error
|
|
38
|
+
// const s1 = withoutEmptyString("");
|
|
39
|
+
// // ^?
|
|
40
|
+
// const s2 = withoutEmptyString("accepted");
|
|
41
|
+
// // ^?
|
|
42
|
+
// // @ts-expect-error
|
|
43
|
+
// const w1 = withoutEmpty("");
|
|
44
|
+
// // ^?
|
|
45
|
+
// // @ts-expect-error
|
|
46
|
+
// const w2 = withoutEmpty(undefined);
|
|
47
|
+
// // ^?
|
|
48
|
+
// // @ts-expect-error
|
|
49
|
+
// const w3 = withoutEmpty(null);
|
|
50
|
+
// // ^?
|
|
51
|
+
// // @ts-expect-error
|
|
52
|
+
// const w4 = withoutEmpty({});
|
|
53
|
+
// // ^?
|
|
54
|
+
// // @ts-expect-error
|
|
55
|
+
// const w5 = withoutEmpty([]);
|
|
56
|
+
// // ^?
|