@lssm/lib.utils-typescript 0.0.0-canary-20251207012602 → 0.0.0-canary-20251207043720
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/README.md +1 -0
- package/package.json +64 -46
- package/dist/index.d.mts +0 -31
- package/dist/lib/AwaitedResult.d.mts +0 -4
- package/dist/lib/BrowserNativeObject.d.mts +0 -4
- package/dist/lib/DeepInfiniteArray.d.mts +0 -4
- package/dist/lib/DeepKeepOnly.d.mts +0 -6
- package/dist/lib/DeepKey.d.mts +0 -4
- package/dist/lib/DeepMap.d.mts +0 -9
- package/dist/lib/DeepNullable.d.mts +0 -6
- package/dist/lib/DeepOr.d.mts +0 -4
- package/dist/lib/DeepPartial.d.mts +0 -7
- package/dist/lib/DeepReplace.d.mts +0 -4
- package/dist/lib/DeepReplaceNullByUndefined.d.mts +0 -6
- package/dist/lib/DeepValue.d.mts +0 -6
- package/dist/lib/DictionaryFromEnum.d.mts +0 -4
- package/dist/lib/DictionaryFromEnumMapping.d.mts +0 -4
- package/dist/lib/EmptyRecord.d.mts +0 -6
- package/dist/lib/Identified.d.mts +0 -6
- package/dist/lib/IdentifiedLabel.d.mts +0 -8
- package/dist/lib/IsAny.d.mts +0 -4
- package/dist/lib/Json.d.mts +0 -15
- package/dist/lib/KeepOnly.d.mts +0 -4
- package/dist/lib/Maybe.d.mts +0 -4
- package/dist/lib/MaybeArray.d.mts +0 -4
- package/dist/lib/NestedValue.d.mts +0 -7
- package/dist/lib/NonUndefined.d.mts +0 -4
- package/dist/lib/Primitive.d.mts +0 -6
- package/dist/lib/Replaced.d.mts +0 -6
- package/dist/lib/ReverseMap.d.mts +0 -4
- package/dist/lib/Satisfies.d.mts +0 -4
- package/dist/lib/StringKey.d.mts +0 -4
- package/dist/lib/StringKeysOnly.d.mts +0 -6
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.utils-typescript",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251207043720",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"clean": "rm -rf dist",
|
|
6
6
|
"lint": "bun run lint:fix",
|
|
@@ -23,55 +23,73 @@
|
|
|
23
23
|
"module": "./dist/index.mjs",
|
|
24
24
|
"types": "./dist/index.d.mts",
|
|
25
25
|
"exports": {
|
|
26
|
-
".": "./
|
|
27
|
-
"./lib/AwaitedResult": "./
|
|
28
|
-
"./lib/BrowserNativeObject": "./
|
|
29
|
-
"./lib/DeepInfiniteArray": "./
|
|
30
|
-
"./lib/DeepKeepOnly": "./
|
|
31
|
-
"./lib/DeepKey": "./
|
|
32
|
-
"./lib/DeepMap": "./
|
|
33
|
-
"./lib/DeepNullable": "./
|
|
34
|
-
"./lib/DeepOr": "./
|
|
35
|
-
"./lib/DeepPartial": "./
|
|
36
|
-
"./lib/DeepReplace": "./
|
|
37
|
-
"./lib/DeepReplaceNullByUndefined": "./
|
|
38
|
-
"./lib/DeepValue": "./
|
|
39
|
-
"./lib/DictionaryFromEnum": "./
|
|
40
|
-
"./lib/DictionaryFromEnumMapping": "./
|
|
41
|
-
"./lib/EmptyRecord": "./
|
|
42
|
-
"./lib/Identified": "./
|
|
43
|
-
"./lib/IdentifiedLabel": "./
|
|
44
|
-
"./lib/IsAny": "./
|
|
45
|
-
"./lib/Json": "./
|
|
46
|
-
"./lib/KeepOnly": "./
|
|
47
|
-
"./lib/Maybe": "./
|
|
48
|
-
"./lib/MaybeArray": "./
|
|
49
|
-
"./lib/NestedValue": "./
|
|
50
|
-
"./lib/NonUndefined": "./
|
|
51
|
-
"./lib/Primitive": "./
|
|
52
|
-
"./lib/Replaced": "./
|
|
53
|
-
"./lib/ReverseMap": "./
|
|
54
|
-
"./lib/Satisfies": "./
|
|
55
|
-
"./lib/StringKey": "./
|
|
56
|
-
"./lib/StringKeysOnly": "./
|
|
26
|
+
".": "./src/index.ts",
|
|
27
|
+
"./lib/AwaitedResult": "./src/lib/AwaitedResult.ts",
|
|
28
|
+
"./lib/BrowserNativeObject": "./src/lib/BrowserNativeObject.ts",
|
|
29
|
+
"./lib/DeepInfiniteArray": "./src/lib/DeepInfiniteArray.ts",
|
|
30
|
+
"./lib/DeepKeepOnly": "./src/lib/DeepKeepOnly.ts",
|
|
31
|
+
"./lib/DeepKey": "./src/lib/DeepKey.ts",
|
|
32
|
+
"./lib/DeepMap": "./src/lib/DeepMap.ts",
|
|
33
|
+
"./lib/DeepNullable": "./src/lib/DeepNullable.ts",
|
|
34
|
+
"./lib/DeepOr": "./src/lib/DeepOr.ts",
|
|
35
|
+
"./lib/DeepPartial": "./src/lib/DeepPartial.ts",
|
|
36
|
+
"./lib/DeepReplace": "./src/lib/DeepReplace.ts",
|
|
37
|
+
"./lib/DeepReplaceNullByUndefined": "./src/lib/DeepReplaceNullByUndefined.ts",
|
|
38
|
+
"./lib/DeepValue": "./src/lib/DeepValue.ts",
|
|
39
|
+
"./lib/DictionaryFromEnum": "./src/lib/DictionaryFromEnum.ts",
|
|
40
|
+
"./lib/DictionaryFromEnumMapping": "./src/lib/DictionaryFromEnumMapping.ts",
|
|
41
|
+
"./lib/EmptyRecord": "./src/lib/EmptyRecord.ts",
|
|
42
|
+
"./lib/Identified": "./src/lib/Identified.ts",
|
|
43
|
+
"./lib/IdentifiedLabel": "./src/lib/IdentifiedLabel.ts",
|
|
44
|
+
"./lib/IsAny": "./src/lib/IsAny.ts",
|
|
45
|
+
"./lib/Json": "./src/lib/Json.ts",
|
|
46
|
+
"./lib/KeepOnly": "./src/lib/KeepOnly.ts",
|
|
47
|
+
"./lib/Maybe": "./src/lib/Maybe.ts",
|
|
48
|
+
"./lib/MaybeArray": "./src/lib/MaybeArray.ts",
|
|
49
|
+
"./lib/NestedValue": "./src/lib/NestedValue.ts",
|
|
50
|
+
"./lib/NonUndefined": "./src/lib/NonUndefined.ts",
|
|
51
|
+
"./lib/Primitive": "./src/lib/Primitive.ts",
|
|
52
|
+
"./lib/Replaced": "./src/lib/Replaced.ts",
|
|
53
|
+
"./lib/ReverseMap": "./src/lib/ReverseMap.ts",
|
|
54
|
+
"./lib/Satisfies": "./src/lib/Satisfies.ts",
|
|
55
|
+
"./lib/StringKey": "./src/lib/StringKey.ts",
|
|
56
|
+
"./lib/StringKeysOnly": "./src/lib/StringKeysOnly.ts",
|
|
57
57
|
"./*": "./*"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"exports": {
|
|
61
|
-
".":
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"
|
|
74
|
-
"./
|
|
61
|
+
".": "./dist/index.mjs",
|
|
62
|
+
"./lib/AwaitedResult": "./dist/lib/AwaitedResult.mjs",
|
|
63
|
+
"./lib/BrowserNativeObject": "./dist/lib/BrowserNativeObject.mjs",
|
|
64
|
+
"./lib/DeepInfiniteArray": "./dist/lib/DeepInfiniteArray.mjs",
|
|
65
|
+
"./lib/DeepKeepOnly": "./dist/lib/DeepKeepOnly.mjs",
|
|
66
|
+
"./lib/DeepKey": "./dist/lib/DeepKey.mjs",
|
|
67
|
+
"./lib/DeepMap": "./dist/lib/DeepMap.mjs",
|
|
68
|
+
"./lib/DeepNullable": "./dist/lib/DeepNullable.mjs",
|
|
69
|
+
"./lib/DeepOr": "./dist/lib/DeepOr.mjs",
|
|
70
|
+
"./lib/DeepPartial": "./dist/lib/DeepPartial.mjs",
|
|
71
|
+
"./lib/DeepReplace": "./dist/lib/DeepReplace.mjs",
|
|
72
|
+
"./lib/DeepReplaceNullByUndefined": "./dist/lib/DeepReplaceNullByUndefined.mjs",
|
|
73
|
+
"./lib/DeepValue": "./dist/lib/DeepValue.mjs",
|
|
74
|
+
"./lib/DictionaryFromEnum": "./dist/lib/DictionaryFromEnum.mjs",
|
|
75
|
+
"./lib/DictionaryFromEnumMapping": "./dist/lib/DictionaryFromEnumMapping.mjs",
|
|
76
|
+
"./lib/EmptyRecord": "./dist/lib/EmptyRecord.mjs",
|
|
77
|
+
"./lib/Identified": "./dist/lib/Identified.mjs",
|
|
78
|
+
"./lib/IdentifiedLabel": "./dist/lib/IdentifiedLabel.mjs",
|
|
79
|
+
"./lib/IsAny": "./dist/lib/IsAny.mjs",
|
|
80
|
+
"./lib/Json": "./dist/lib/Json.mjs",
|
|
81
|
+
"./lib/KeepOnly": "./dist/lib/KeepOnly.mjs",
|
|
82
|
+
"./lib/Maybe": "./dist/lib/Maybe.mjs",
|
|
83
|
+
"./lib/MaybeArray": "./dist/lib/MaybeArray.mjs",
|
|
84
|
+
"./lib/NestedValue": "./dist/lib/NestedValue.mjs",
|
|
85
|
+
"./lib/NonUndefined": "./dist/lib/NonUndefined.mjs",
|
|
86
|
+
"./lib/Primitive": "./dist/lib/Primitive.mjs",
|
|
87
|
+
"./lib/Replaced": "./dist/lib/Replaced.mjs",
|
|
88
|
+
"./lib/ReverseMap": "./dist/lib/ReverseMap.mjs",
|
|
89
|
+
"./lib/Satisfies": "./dist/lib/Satisfies.mjs",
|
|
90
|
+
"./lib/StringKey": "./dist/lib/StringKey.mjs",
|
|
91
|
+
"./lib/StringKeysOnly": "./dist/lib/StringKeysOnly.mjs",
|
|
92
|
+
"./*": "./*"
|
|
75
93
|
},
|
|
76
94
|
"access": "public"
|
|
77
95
|
},
|
package/dist/index.d.mts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { AwaitedResult } from "./lib/AwaitedResult.mjs";
|
|
2
|
-
import { BrowserNativeObject } from "./lib/BrowserNativeObject.mjs";
|
|
3
|
-
import { DeepInfiniteArray } from "./lib/DeepInfiniteArray.mjs";
|
|
4
|
-
import { KeepOnly } from "./lib/KeepOnly.mjs";
|
|
5
|
-
import { DeepKeepOnly } from "./lib/DeepKeepOnly.mjs";
|
|
6
|
-
import { DeepKey } from "./lib/DeepKey.mjs";
|
|
7
|
-
import { IsAny } from "./lib/IsAny.mjs";
|
|
8
|
-
import { NestedValue } from "./lib/NestedValue.mjs";
|
|
9
|
-
import { NonUndefined } from "./lib/NonUndefined.mjs";
|
|
10
|
-
import { DeepMap } from "./lib/DeepMap.mjs";
|
|
11
|
-
import { DeepOr } from "./lib/DeepOr.mjs";
|
|
12
|
-
import { DeepNullable } from "./lib/DeepNullable.mjs";
|
|
13
|
-
import { DeepPartial } from "./lib/DeepPartial.mjs";
|
|
14
|
-
import { DeepReplace } from "./lib/DeepReplace.mjs";
|
|
15
|
-
import { DeepReplaceNullByUndefined } from "./lib/DeepReplaceNullByUndefined.mjs";
|
|
16
|
-
import { DeepValue } from "./lib/DeepValue.mjs";
|
|
17
|
-
import { DictionaryFromEnum } from "./lib/DictionaryFromEnum.mjs";
|
|
18
|
-
import { DictionaryFromEnumMapping } from "./lib/DictionaryFromEnumMapping.mjs";
|
|
19
|
-
import { AnyRecord, EmptyRecord, UnknownRecord } from "./lib/EmptyRecord.mjs";
|
|
20
|
-
import { Identified } from "./lib/Identified.mjs";
|
|
21
|
-
import { IdentifiedLabel } from "./lib/IdentifiedLabel.mjs";
|
|
22
|
-
import { ExtendedJsonObject, JSONArray, JSONObject, JSONValue, NonJsonArray, NonJsonObject, NonJsonValue, PrimitiveJSONValue } from "./lib/Json.mjs";
|
|
23
|
-
import { Maybe } from "./lib/Maybe.mjs";
|
|
24
|
-
import { MaybeArray } from "./lib/MaybeArray.mjs";
|
|
25
|
-
import { Primitive } from "./lib/Primitive.mjs";
|
|
26
|
-
import { Replaced } from "./lib/Replaced.mjs";
|
|
27
|
-
import { ReverseMap } from "./lib/ReverseMap.mjs";
|
|
28
|
-
import { Satisfies } from "./lib/Satisfies.mjs";
|
|
29
|
-
import { StringKey } from "./lib/StringKey.mjs";
|
|
30
|
-
import { StringKeysOnly } from "./lib/StringKeysOnly.mjs";
|
|
31
|
-
export { AnyRecord, AwaitedResult, BrowserNativeObject, DeepInfiniteArray, DeepKeepOnly, DeepKey, DeepMap, DeepNullable, DeepOr, DeepPartial, DeepReplace, DeepReplaceNullByUndefined, DeepValue, DictionaryFromEnum, DictionaryFromEnumMapping, EmptyRecord, ExtendedJsonObject, Identified, IdentifiedLabel, IsAny, JSONArray, JSONObject, JSONValue, KeepOnly, Maybe, MaybeArray, NestedValue, NonJsonArray, NonJsonObject, NonJsonValue, NonUndefined, Primitive, PrimitiveJSONValue, Replaced, ReverseMap, Satisfies, StringKey, StringKeysOnly, UnknownRecord };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { KeepOnly } from "./KeepOnly.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/DeepKeepOnly.d.ts
|
|
4
|
-
type DeepKeepOnly<T, KeepType> = T | (T extends (infer U)[] ? KeepOnly<U, KeepType>[] : T extends Map<infer K, infer V> ? Map<KeepOnly<K, KeepType>, KeepOnly<V, KeepType>> : T extends Set<infer M> ? Set<KeepOnly<M, KeepType>> : KeepOnly<T, KeepType>);
|
|
5
|
-
//#endregion
|
|
6
|
-
export { DeepKeepOnly };
|
package/dist/lib/DeepKey.d.mts
DELETED
package/dist/lib/DeepMap.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BrowserNativeObject } from "./BrowserNativeObject.mjs";
|
|
2
|
-
import { IsAny } from "./IsAny.mjs";
|
|
3
|
-
import { NestedValue } from "./NestedValue.mjs";
|
|
4
|
-
import { NonUndefined } from "./NonUndefined.mjs";
|
|
5
|
-
|
|
6
|
-
//#region src/lib/DeepMap.d.ts
|
|
7
|
-
declare type DeepMap<T, TValue> = IsAny<T> extends true ? any : T extends BrowserNativeObject | NestedValue ? TValue : T extends object ? { [K in keyof T]: DeepMap<NonUndefined<T[K]>, TValue> } : TValue;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { DeepMap };
|
package/dist/lib/DeepOr.d.mts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region src/lib/DeepOr.d.ts
|
|
2
|
-
type DeepOr<T, OrValue> = T | (T extends (infer U)[] ? DeepOr<U, OrValue>[] : T extends Map<infer K, infer V> ? Map<DeepOr<K, OrValue>, DeepOr<V, OrValue>> : T extends Set<infer M> ? Set<DeepOr<M, OrValue>> : T extends object ? { [K in keyof T]: DeepOr<T[K], OrValue> | OrValue } : T);
|
|
3
|
-
//#endregion
|
|
4
|
-
export { DeepOr };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region src/lib/DeepPartial.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Same as Partial<T> but goes deeper and makes Partial<T> all its properties and sub-properties.
|
|
4
|
-
*/
|
|
5
|
-
type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P] };
|
|
6
|
-
//#endregion
|
|
7
|
-
export { DeepPartial };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region src/lib/DeepReplace.d.ts
|
|
2
|
-
type DeepReplace<T, Search, Replace> = T extends (infer ArrayItemT)[] ? DeepReplace<ArrayItemT, Search, Replace>[] : T extends Map<infer MapKey, infer MapT> ? Map<DeepReplace<MapKey, Search, Replace>, DeepReplace<MapT, Search, Replace>> : T extends Set<infer SetT> ? Set<DeepReplace<SetT, Search, Replace>> : T extends object ? { [ObjKey in keyof T]: DeepReplace<T[ObjKey], Search, Replace> } : T extends Search ? Replace : T;
|
|
3
|
-
//#endregion
|
|
4
|
-
export { DeepReplace };
|
package/dist/lib/DeepValue.d.mts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DeepKey } from "./DeepKey.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/DeepValue.d.ts
|
|
4
|
-
type DeepValue<T, P extends DeepKey<T>> = P extends `${infer K}.${infer Rest}` ? T[(K extends `${infer R extends number}` ? R : K) & keyof T] extends infer S ? S extends never ? never : Rest extends DeepKey<S> ? DeepValue<S, Rest> : never : never : T[(P extends `${infer R extends number}` ? R : P) & keyof T];
|
|
5
|
-
//#endregion
|
|
6
|
-
export { DeepValue };
|
package/dist/lib/IsAny.d.mts
DELETED
package/dist/lib/Json.d.mts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/lib/Json.d.ts
|
|
2
|
-
declare type PrimitiveJSONValue = string | number | boolean | undefined | null;
|
|
3
|
-
declare type JSONValue = PrimitiveJSONValue | JSONArray | JSONObject;
|
|
4
|
-
interface JSONArray extends Array<JSONValue> {}
|
|
5
|
-
interface JSONObject {
|
|
6
|
-
[key: string]: JSONValue;
|
|
7
|
-
}
|
|
8
|
-
declare type NonJsonValue<ExtraTypes> = PrimitiveJSONValue | NonJsonArray<ExtraTypes> | NonJsonObject<ExtraTypes> | ExtraTypes;
|
|
9
|
-
interface NonJsonArray<ExtraTypes> extends Array<NonJsonValue<ExtraTypes>> {}
|
|
10
|
-
interface NonJsonObject<ExtraTypes> {
|
|
11
|
-
[key: string]: NonJsonValue<ExtraTypes>;
|
|
12
|
-
}
|
|
13
|
-
type ExtendedJsonObject = NonJsonObject<bigint | Date>;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { ExtendedJsonObject, JSONArray, JSONObject, JSONValue, NonJsonArray, NonJsonObject, NonJsonValue, PrimitiveJSONValue };
|
package/dist/lib/KeepOnly.d.mts
DELETED
package/dist/lib/Maybe.d.mts
DELETED
package/dist/lib/Primitive.d.mts
DELETED
package/dist/lib/Replaced.d.mts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Primitive } from "./Primitive.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/Replaced.d.ts
|
|
4
|
-
type Replaced<T, TReplace, TWith, TKeep = Primitive> = T extends TReplace | TKeep ? T extends TReplace ? TWith | Exclude<T, TReplace> : T : { [P in keyof T]: Replaced<T[P], TReplace, TWith, TKeep> };
|
|
5
|
-
//#endregion
|
|
6
|
-
export { Replaced };
|
package/dist/lib/Satisfies.d.mts
DELETED
package/dist/lib/StringKey.d.mts
DELETED