@ls-stack/utils 3.34.0 → 3.35.0
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-QQS7I7ZL.js +16 -0
- package/dist/keepPrevIfUnchanged.cjs +102 -0
- package/dist/keepPrevIfUnchanged.d.cts +7 -0
- package/dist/keepPrevIfUnchanged.d.ts +7 -0
- package/dist/keepPrevIfUnchanged.js +7 -0
- package/dist/mutationUtils.cjs +118 -0
- package/dist/mutationUtils.d.cts +10 -0
- package/dist/mutationUtils.d.ts +10 -0
- package/dist/mutationUtils.js +23 -0
- package/docs/_media/modules.md +2 -0
- package/docs/keepPrevIfUnchanged.md +43 -0
- package/docs/modules.md +2 -0
- package/docs/mutationUtils.md +44 -0
- package/package.json +108 -100
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deepEqual
|
|
3
|
+
} from "./chunk-JQFUKJU5.js";
|
|
4
|
+
|
|
5
|
+
// src/keepPrevIfUnchanged.ts
|
|
6
|
+
function keepPrevIfUnchanged({
|
|
7
|
+
prev,
|
|
8
|
+
newValue,
|
|
9
|
+
equalityFn = deepEqual
|
|
10
|
+
}) {
|
|
11
|
+
return equalityFn(prev, newValue) ? prev : newValue;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
keepPrevIfUnchanged
|
|
16
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/keepPrevIfUnchanged.ts
|
|
21
|
+
var keepPrevIfUnchanged_exports = {};
|
|
22
|
+
__export(keepPrevIfUnchanged_exports, {
|
|
23
|
+
keepPrevIfUnchanged: () => keepPrevIfUnchanged
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(keepPrevIfUnchanged_exports);
|
|
26
|
+
|
|
27
|
+
// src/deepEqual.ts
|
|
28
|
+
var has = Object.prototype.hasOwnProperty;
|
|
29
|
+
function find(iter, tar, maxDepth) {
|
|
30
|
+
for (const key of iter.keys()) {
|
|
31
|
+
if (deepEqual(key, tar, maxDepth)) return key;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function deepEqual(foo, bar, maxDepth = 20) {
|
|
35
|
+
let ctor, len, tmp;
|
|
36
|
+
if (foo === bar) return true;
|
|
37
|
+
if (maxDepth && maxDepth <= 0) return false;
|
|
38
|
+
if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
|
|
39
|
+
if (ctor === Date)
|
|
40
|
+
return deepEqual(foo.getTime(), bar.getTime(), maxDepth - 1);
|
|
41
|
+
if (ctor === RegExp) return foo.toString() === bar.toString();
|
|
42
|
+
if (ctor === Array) {
|
|
43
|
+
if ((len = foo.length) === bar.length) {
|
|
44
|
+
while (len-- && deepEqual(foo[len], bar[len], maxDepth - 1)) ;
|
|
45
|
+
}
|
|
46
|
+
return len === -1;
|
|
47
|
+
}
|
|
48
|
+
if (ctor === Set) {
|
|
49
|
+
if (foo.size !== bar.size) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
for (len of foo) {
|
|
53
|
+
tmp = len;
|
|
54
|
+
if (tmp && typeof tmp === "object") {
|
|
55
|
+
tmp = find(bar, tmp, maxDepth - 1);
|
|
56
|
+
if (!tmp) return false;
|
|
57
|
+
}
|
|
58
|
+
if (!bar.has(tmp)) return false;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
if (ctor === Map) {
|
|
63
|
+
if (foo.size !== bar.size) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
for (len of foo) {
|
|
67
|
+
tmp = len[0];
|
|
68
|
+
if (tmp && typeof tmp === "object") {
|
|
69
|
+
tmp = find(bar, tmp, maxDepth - 1);
|
|
70
|
+
if (!tmp) return false;
|
|
71
|
+
}
|
|
72
|
+
if (!deepEqual(len[1], bar.get(tmp), maxDepth - 1)) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
if (!ctor || typeof foo === "object") {
|
|
79
|
+
len = 0;
|
|
80
|
+
for (ctor in foo) {
|
|
81
|
+
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
|
|
82
|
+
if (!(ctor in bar) || !deepEqual(foo[ctor], bar[ctor], maxDepth - 1))
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
return Object.keys(bar).length === len;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return foo !== foo && bar !== bar;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// src/keepPrevIfUnchanged.ts
|
|
92
|
+
function keepPrevIfUnchanged({
|
|
93
|
+
prev,
|
|
94
|
+
newValue,
|
|
95
|
+
equalityFn = deepEqual
|
|
96
|
+
}) {
|
|
97
|
+
return equalityFn(prev, newValue) ? prev : newValue;
|
|
98
|
+
}
|
|
99
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
100
|
+
0 && (module.exports = {
|
|
101
|
+
keepPrevIfUnchanged
|
|
102
|
+
});
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/mutationUtils.ts
|
|
21
|
+
var mutationUtils_exports = {};
|
|
22
|
+
__export(mutationUtils_exports, {
|
|
23
|
+
updateObject: () => updateObject
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(mutationUtils_exports);
|
|
26
|
+
|
|
27
|
+
// src/deepEqual.ts
|
|
28
|
+
var has = Object.prototype.hasOwnProperty;
|
|
29
|
+
function find(iter, tar, maxDepth) {
|
|
30
|
+
for (const key of iter.keys()) {
|
|
31
|
+
if (deepEqual(key, tar, maxDepth)) return key;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function deepEqual(foo, bar, maxDepth = 20) {
|
|
35
|
+
let ctor, len, tmp;
|
|
36
|
+
if (foo === bar) return true;
|
|
37
|
+
if (maxDepth && maxDepth <= 0) return false;
|
|
38
|
+
if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
|
|
39
|
+
if (ctor === Date)
|
|
40
|
+
return deepEqual(foo.getTime(), bar.getTime(), maxDepth - 1);
|
|
41
|
+
if (ctor === RegExp) return foo.toString() === bar.toString();
|
|
42
|
+
if (ctor === Array) {
|
|
43
|
+
if ((len = foo.length) === bar.length) {
|
|
44
|
+
while (len-- && deepEqual(foo[len], bar[len], maxDepth - 1)) ;
|
|
45
|
+
}
|
|
46
|
+
return len === -1;
|
|
47
|
+
}
|
|
48
|
+
if (ctor === Set) {
|
|
49
|
+
if (foo.size !== bar.size) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
for (len of foo) {
|
|
53
|
+
tmp = len;
|
|
54
|
+
if (tmp && typeof tmp === "object") {
|
|
55
|
+
tmp = find(bar, tmp, maxDepth - 1);
|
|
56
|
+
if (!tmp) return false;
|
|
57
|
+
}
|
|
58
|
+
if (!bar.has(tmp)) return false;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
if (ctor === Map) {
|
|
63
|
+
if (foo.size !== bar.size) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
for (len of foo) {
|
|
67
|
+
tmp = len[0];
|
|
68
|
+
if (tmp && typeof tmp === "object") {
|
|
69
|
+
tmp = find(bar, tmp, maxDepth - 1);
|
|
70
|
+
if (!tmp) return false;
|
|
71
|
+
}
|
|
72
|
+
if (!deepEqual(len[1], bar.get(tmp), maxDepth - 1)) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
if (!ctor || typeof foo === "object") {
|
|
79
|
+
len = 0;
|
|
80
|
+
for (ctor in foo) {
|
|
81
|
+
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
|
|
82
|
+
if (!(ctor in bar) || !deepEqual(foo[ctor], bar[ctor], maxDepth - 1))
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
return Object.keys(bar).length === len;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return foo !== foo && bar !== bar;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// src/keepPrevIfUnchanged.ts
|
|
92
|
+
function keepPrevIfUnchanged({
|
|
93
|
+
prev,
|
|
94
|
+
newValue,
|
|
95
|
+
equalityFn = deepEqual
|
|
96
|
+
}) {
|
|
97
|
+
return equalityFn(prev, newValue) ? prev : newValue;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// src/mutationUtils.ts
|
|
101
|
+
function updateObject(object, updates) {
|
|
102
|
+
if (!object || typeof object !== "object") {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
for (const key of Object.keys(updates)) {
|
|
106
|
+
const value = updates[key];
|
|
107
|
+
if (value !== void 0) {
|
|
108
|
+
object[key] = keepPrevIfUnchanged({
|
|
109
|
+
prev: object[key],
|
|
110
|
+
newValue: value
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
116
|
+
0 && (module.exports = {
|
|
117
|
+
updateObject
|
|
118
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Updates an object with a new set of values. undefined values are ignored in the updates object
|
|
3
|
+
* and deep equal values are not updated.
|
|
4
|
+
*
|
|
5
|
+
* @param object - The object to update.
|
|
6
|
+
* @param updates - The new values to update the object with.
|
|
7
|
+
*/
|
|
8
|
+
declare function updateObject<T extends Record<string, unknown>>(object: T | undefined | null, updates: Partial<T>): void;
|
|
9
|
+
|
|
10
|
+
export { updateObject };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Updates an object with a new set of values. undefined values are ignored in the updates object
|
|
3
|
+
* and deep equal values are not updated.
|
|
4
|
+
*
|
|
5
|
+
* @param object - The object to update.
|
|
6
|
+
* @param updates - The new values to update the object with.
|
|
7
|
+
*/
|
|
8
|
+
declare function updateObject<T extends Record<string, unknown>>(object: T | undefined | null, updates: Partial<T>): void;
|
|
9
|
+
|
|
10
|
+
export { updateObject };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
keepPrevIfUnchanged
|
|
3
|
+
} from "./chunk-QQS7I7ZL.js";
|
|
4
|
+
import "./chunk-JQFUKJU5.js";
|
|
5
|
+
|
|
6
|
+
// src/mutationUtils.ts
|
|
7
|
+
function updateObject(object, updates) {
|
|
8
|
+
if (!object || typeof object !== "object") {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
for (const key of Object.keys(updates)) {
|
|
12
|
+
const value = updates[key];
|
|
13
|
+
if (value !== void 0) {
|
|
14
|
+
object[key] = keepPrevIfUnchanged({
|
|
15
|
+
prev: object[key],
|
|
16
|
+
newValue: value
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
updateObject
|
|
23
|
+
};
|
package/docs/_media/modules.md
CHANGED
|
@@ -27,9 +27,11 @@
|
|
|
27
27
|
- [getValueStableKey](getValueStableKey.md)
|
|
28
28
|
- [hash](hash.md)
|
|
29
29
|
- [interpolate](interpolate/README.md)
|
|
30
|
+
- [keepPrevIfUnchanged](keepPrevIfUnchanged.md)
|
|
30
31
|
- [levenshtein](levenshtein.md)
|
|
31
32
|
- [main](main.md)
|
|
32
33
|
- [mathUtils](mathUtils.md)
|
|
34
|
+
- [mutationUtils](mutationUtils.md)
|
|
33
35
|
- [objUtils](objUtils.md)
|
|
34
36
|
- [parallelAsyncCalls](parallelAsyncCalls/README.md)
|
|
35
37
|
- [promiseUtils](promiseUtils/README.md)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[**@ls-stack/utils**](README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@ls-stack/utils](modules.md) / keepPrevIfUnchanged
|
|
6
|
+
|
|
7
|
+
# keepPrevIfUnchanged
|
|
8
|
+
|
|
9
|
+
## Functions
|
|
10
|
+
|
|
11
|
+
### keepPrevIfUnchanged()
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
function keepPrevIfUnchanged<T>(__namedParameters): T;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Defined in: [packages/utils/src/keepPrevIfUnchanged.ts:3](https://github.com/lucasols/utils/blob/main/packages/utils/src/keepPrevIfUnchanged.ts#L3)
|
|
18
|
+
|
|
19
|
+
#### Type Parameters
|
|
20
|
+
|
|
21
|
+
##### T
|
|
22
|
+
|
|
23
|
+
`T`
|
|
24
|
+
|
|
25
|
+
#### Parameters
|
|
26
|
+
|
|
27
|
+
##### \_\_namedParameters
|
|
28
|
+
|
|
29
|
+
###### equalityFn?
|
|
30
|
+
|
|
31
|
+
(`foo`, `bar`) => `boolean` = `deepEqual`
|
|
32
|
+
|
|
33
|
+
###### newValue
|
|
34
|
+
|
|
35
|
+
`T`
|
|
36
|
+
|
|
37
|
+
###### prev
|
|
38
|
+
|
|
39
|
+
`T`
|
|
40
|
+
|
|
41
|
+
#### Returns
|
|
42
|
+
|
|
43
|
+
`T`
|
package/docs/modules.md
CHANGED
|
@@ -27,9 +27,11 @@
|
|
|
27
27
|
- [getValueStableKey](getValueStableKey.md)
|
|
28
28
|
- [hash](hash.md)
|
|
29
29
|
- [interpolate](interpolate/README.md)
|
|
30
|
+
- [keepPrevIfUnchanged](keepPrevIfUnchanged.md)
|
|
30
31
|
- [levenshtein](levenshtein.md)
|
|
31
32
|
- [main](main.md)
|
|
32
33
|
- [mathUtils](mathUtils.md)
|
|
34
|
+
- [mutationUtils](mutationUtils.md)
|
|
33
35
|
- [objUtils](objUtils.md)
|
|
34
36
|
- [parallelAsyncCalls](parallelAsyncCalls/README.md)
|
|
35
37
|
- [promiseUtils](promiseUtils/README.md)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[**@ls-stack/utils**](README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@ls-stack/utils](modules.md) / mutationUtils
|
|
6
|
+
|
|
7
|
+
# mutationUtils
|
|
8
|
+
|
|
9
|
+
## Functions
|
|
10
|
+
|
|
11
|
+
### updateObject()
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
function updateObject<T>(object, updates): void;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Defined in: [packages/utils/src/mutationUtils.ts:10](https://github.com/lucasols/utils/blob/main/packages/utils/src/mutationUtils.ts#L10)
|
|
18
|
+
|
|
19
|
+
Updates an object with a new set of values. undefined values are ignored in the updates object
|
|
20
|
+
and deep equal values are not updated.
|
|
21
|
+
|
|
22
|
+
#### Type Parameters
|
|
23
|
+
|
|
24
|
+
##### T
|
|
25
|
+
|
|
26
|
+
`T` *extends* `Record`\<`string`, `unknown`\>
|
|
27
|
+
|
|
28
|
+
#### Parameters
|
|
29
|
+
|
|
30
|
+
##### object
|
|
31
|
+
|
|
32
|
+
The object to update.
|
|
33
|
+
|
|
34
|
+
`undefined` | `null` | `T`
|
|
35
|
+
|
|
36
|
+
##### updates
|
|
37
|
+
|
|
38
|
+
`Partial`\<`T`\>
|
|
39
|
+
|
|
40
|
+
The new values to update the object with.
|
|
41
|
+
|
|
42
|
+
#### Returns
|
|
43
|
+
|
|
44
|
+
`void`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ls-stack/utils",
|
|
3
3
|
"description": "Universal TypeScript utilities for browser and Node.js",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.35.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -12,201 +12,209 @@
|
|
|
12
12
|
"author": "Lucas Santos",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"sideEffects": false,
|
|
15
|
-
"main": "./
|
|
16
|
-
"module": "./
|
|
17
|
-
"types": "./
|
|
15
|
+
"main": "./dist/main.cjs",
|
|
16
|
+
"module": "./dist/main.js",
|
|
17
|
+
"types": "./dist/main.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
|
-
"import": "./
|
|
21
|
-
"require": "./
|
|
20
|
+
"import": "./dist/main.js",
|
|
21
|
+
"require": "./dist/main.cjs"
|
|
22
22
|
},
|
|
23
23
|
"./__snapshots__": {
|
|
24
|
-
"import": "./
|
|
25
|
-
"require": "./
|
|
24
|
+
"import": "./dist/__snapshots__.js",
|
|
25
|
+
"require": "./dist/__snapshots__.cjs"
|
|
26
26
|
},
|
|
27
27
|
"./arrayUtils": {
|
|
28
|
-
"import": "./
|
|
29
|
-
"require": "./
|
|
28
|
+
"import": "./dist/arrayUtils.js",
|
|
29
|
+
"require": "./dist/arrayUtils.cjs"
|
|
30
30
|
},
|
|
31
31
|
"./assertions": {
|
|
32
|
-
"import": "./
|
|
33
|
-
"require": "./
|
|
32
|
+
"import": "./dist/assertions.js",
|
|
33
|
+
"require": "./dist/assertions.cjs"
|
|
34
34
|
},
|
|
35
35
|
"./asyncQueue": {
|
|
36
|
-
"import": "./
|
|
37
|
-
"require": "./
|
|
36
|
+
"import": "./dist/asyncQueue.js",
|
|
37
|
+
"require": "./dist/asyncQueue.cjs"
|
|
38
38
|
},
|
|
39
39
|
"./awaitDebounce": {
|
|
40
|
-
"import": "./
|
|
41
|
-
"require": "./
|
|
40
|
+
"import": "./dist/awaitDebounce.js",
|
|
41
|
+
"require": "./dist/awaitDebounce.cjs"
|
|
42
42
|
},
|
|
43
43
|
"./cache": {
|
|
44
|
-
"import": "./
|
|
45
|
-
"require": "./
|
|
44
|
+
"import": "./dist/cache.js",
|
|
45
|
+
"require": "./dist/cache.cjs"
|
|
46
46
|
},
|
|
47
47
|
"./castValues": {
|
|
48
|
-
"import": "./
|
|
49
|
-
"require": "./
|
|
48
|
+
"import": "./dist/castValues.js",
|
|
49
|
+
"require": "./dist/castValues.cjs"
|
|
50
50
|
},
|
|
51
51
|
"./concurrentCalls": {
|
|
52
|
-
"import": "./
|
|
53
|
-
"require": "./
|
|
52
|
+
"import": "./dist/concurrentCalls.js",
|
|
53
|
+
"require": "./dist/concurrentCalls.cjs"
|
|
54
54
|
},
|
|
55
55
|
"./consoleFmt": {
|
|
56
|
-
"import": "./
|
|
57
|
-
"require": "./
|
|
56
|
+
"import": "./dist/consoleFmt.js",
|
|
57
|
+
"require": "./dist/consoleFmt.cjs"
|
|
58
58
|
},
|
|
59
59
|
"./conversions": {
|
|
60
|
-
"import": "./
|
|
61
|
-
"require": "./
|
|
60
|
+
"import": "./dist/conversions.js",
|
|
61
|
+
"require": "./dist/conversions.cjs"
|
|
62
62
|
},
|
|
63
63
|
"./createThrottleController": {
|
|
64
|
-
"import": "./
|
|
65
|
-
"require": "./
|
|
64
|
+
"import": "./dist/createThrottleController.js",
|
|
65
|
+
"require": "./dist/createThrottleController.cjs"
|
|
66
66
|
},
|
|
67
67
|
"./debounce": {
|
|
68
|
-
"import": "./
|
|
69
|
-
"require": "./
|
|
68
|
+
"import": "./dist/debounce.js",
|
|
69
|
+
"require": "./dist/debounce.cjs"
|
|
70
70
|
},
|
|
71
71
|
"./dedent": {
|
|
72
|
-
"import": "./
|
|
73
|
-
"require": "./
|
|
72
|
+
"import": "./dist/dedent.js",
|
|
73
|
+
"require": "./dist/dedent.cjs"
|
|
74
74
|
},
|
|
75
75
|
"./deepEqual": {
|
|
76
|
-
"import": "./
|
|
77
|
-
"require": "./
|
|
76
|
+
"import": "./dist/deepEqual.js",
|
|
77
|
+
"require": "./dist/deepEqual.cjs"
|
|
78
78
|
},
|
|
79
79
|
"./enhancedMap": {
|
|
80
|
-
"import": "./
|
|
81
|
-
"require": "./
|
|
80
|
+
"import": "./dist/enhancedMap.js",
|
|
81
|
+
"require": "./dist/enhancedMap.cjs"
|
|
82
82
|
},
|
|
83
83
|
"./exhaustiveMatch": {
|
|
84
|
-
"import": "./
|
|
85
|
-
"require": "./
|
|
84
|
+
"import": "./dist/exhaustiveMatch.js",
|
|
85
|
+
"require": "./dist/exhaustiveMatch.cjs"
|
|
86
86
|
},
|
|
87
87
|
"./filterObjectOrArrayKeys": {
|
|
88
|
-
"import": "./
|
|
89
|
-
"require": "./
|
|
88
|
+
"import": "./dist/filterObjectOrArrayKeys.js",
|
|
89
|
+
"require": "./dist/filterObjectOrArrayKeys.cjs"
|
|
90
90
|
},
|
|
91
91
|
"./getAutoIncrementId": {
|
|
92
|
-
"import": "./
|
|
93
|
-
"require": "./
|
|
92
|
+
"import": "./dist/getAutoIncrementId.js",
|
|
93
|
+
"require": "./dist/getAutoIncrementId.cjs"
|
|
94
94
|
},
|
|
95
95
|
"./getCompositeKey": {
|
|
96
|
-
"import": "./
|
|
97
|
-
"require": "./
|
|
96
|
+
"import": "./dist/getCompositeKey.js",
|
|
97
|
+
"require": "./dist/getCompositeKey.cjs"
|
|
98
98
|
},
|
|
99
99
|
"./getValueStableKey": {
|
|
100
|
-
"import": "./
|
|
101
|
-
"require": "./
|
|
100
|
+
"import": "./dist/getValueStableKey.js",
|
|
101
|
+
"require": "./dist/getValueStableKey.cjs"
|
|
102
102
|
},
|
|
103
103
|
"./hash": {
|
|
104
|
-
"import": "./
|
|
105
|
-
"require": "./
|
|
104
|
+
"import": "./dist/hash.js",
|
|
105
|
+
"require": "./dist/hash.cjs"
|
|
106
106
|
},
|
|
107
107
|
"./interpolate": {
|
|
108
|
-
"import": "./
|
|
109
|
-
"require": "./
|
|
108
|
+
"import": "./dist/interpolate.js",
|
|
109
|
+
"require": "./dist/interpolate.cjs"
|
|
110
|
+
},
|
|
111
|
+
"./keepPrevIfUnchanged": {
|
|
112
|
+
"import": "./dist/keepPrevIfUnchanged.js",
|
|
113
|
+
"require": "./dist/keepPrevIfUnchanged.cjs"
|
|
110
114
|
},
|
|
111
115
|
"./levenshtein": {
|
|
112
|
-
"import": "./
|
|
113
|
-
"require": "./
|
|
116
|
+
"import": "./dist/levenshtein.js",
|
|
117
|
+
"require": "./dist/levenshtein.cjs"
|
|
114
118
|
},
|
|
115
119
|
"./mathUtils": {
|
|
116
|
-
"import": "./
|
|
117
|
-
"require": "./
|
|
120
|
+
"import": "./dist/mathUtils.js",
|
|
121
|
+
"require": "./dist/mathUtils.cjs"
|
|
122
|
+
},
|
|
123
|
+
"./mutationUtils": {
|
|
124
|
+
"import": "./dist/mutationUtils.js",
|
|
125
|
+
"require": "./dist/mutationUtils.cjs"
|
|
118
126
|
},
|
|
119
127
|
"./objUtils": {
|
|
120
|
-
"import": "./
|
|
121
|
-
"require": "./
|
|
128
|
+
"import": "./dist/objUtils.js",
|
|
129
|
+
"require": "./dist/objUtils.cjs"
|
|
122
130
|
},
|
|
123
131
|
"./parallelAsyncCalls": {
|
|
124
|
-
"import": "./
|
|
125
|
-
"require": "./
|
|
132
|
+
"import": "./dist/parallelAsyncCalls.js",
|
|
133
|
+
"require": "./dist/parallelAsyncCalls.cjs"
|
|
126
134
|
},
|
|
127
135
|
"./promiseUtils": {
|
|
128
|
-
"import": "./
|
|
129
|
-
"require": "./
|
|
136
|
+
"import": "./dist/promiseUtils.js",
|
|
137
|
+
"require": "./dist/promiseUtils.cjs"
|
|
130
138
|
},
|
|
131
139
|
"./retryOnError": {
|
|
132
|
-
"import": "./
|
|
133
|
-
"require": "./
|
|
140
|
+
"import": "./dist/retryOnError.js",
|
|
141
|
+
"require": "./dist/retryOnError.cjs"
|
|
134
142
|
},
|
|
135
143
|
"./runShellCmd": {
|
|
136
|
-
"import": "./
|
|
137
|
-
"require": "./
|
|
144
|
+
"import": "./dist/runShellCmd.js",
|
|
145
|
+
"require": "./dist/runShellCmd.cjs"
|
|
138
146
|
},
|
|
139
147
|
"./safeJson": {
|
|
140
|
-
"import": "./
|
|
141
|
-
"require": "./
|
|
148
|
+
"import": "./dist/safeJson.js",
|
|
149
|
+
"require": "./dist/safeJson.cjs"
|
|
142
150
|
},
|
|
143
151
|
"./saferTyping": {
|
|
144
|
-
"import": "./
|
|
145
|
-
"require": "./
|
|
152
|
+
"import": "./dist/saferTyping.js",
|
|
153
|
+
"require": "./dist/saferTyping.cjs"
|
|
146
154
|
},
|
|
147
155
|
"./serializeXML": {
|
|
148
|
-
"import": "./
|
|
149
|
-
"require": "./
|
|
156
|
+
"import": "./dist/serializeXML.js",
|
|
157
|
+
"require": "./dist/serializeXML.cjs"
|
|
150
158
|
},
|
|
151
159
|
"./shallowEqual": {
|
|
152
|
-
"import": "./
|
|
153
|
-
"require": "./
|
|
160
|
+
"import": "./dist/shallowEqual.js",
|
|
161
|
+
"require": "./dist/shallowEqual.cjs"
|
|
154
162
|
},
|
|
155
163
|
"./sleep": {
|
|
156
|
-
"import": "./
|
|
157
|
-
"require": "./
|
|
164
|
+
"import": "./dist/sleep.js",
|
|
165
|
+
"require": "./dist/sleep.cjs"
|
|
158
166
|
},
|
|
159
167
|
"./stringUtils": {
|
|
160
|
-
"import": "./
|
|
161
|
-
"require": "./
|
|
168
|
+
"import": "./dist/stringUtils.js",
|
|
169
|
+
"require": "./dist/stringUtils.cjs"
|
|
162
170
|
},
|
|
163
171
|
"./testUtils": {
|
|
164
|
-
"import": "./
|
|
165
|
-
"require": "./
|
|
172
|
+
"import": "./dist/testUtils.js",
|
|
173
|
+
"require": "./dist/testUtils.cjs"
|
|
166
174
|
},
|
|
167
175
|
"./throttle": {
|
|
168
|
-
"import": "./
|
|
169
|
-
"require": "./
|
|
176
|
+
"import": "./dist/throttle.js",
|
|
177
|
+
"require": "./dist/throttle.cjs"
|
|
170
178
|
},
|
|
171
179
|
"./time": {
|
|
172
|
-
"import": "./
|
|
173
|
-
"require": "./
|
|
180
|
+
"import": "./dist/time.js",
|
|
181
|
+
"require": "./dist/time.cjs"
|
|
174
182
|
},
|
|
175
183
|
"./timers": {
|
|
176
|
-
"import": "./
|
|
177
|
-
"require": "./
|
|
184
|
+
"import": "./dist/timers.js",
|
|
185
|
+
"require": "./dist/timers.cjs"
|
|
178
186
|
},
|
|
179
187
|
"./tsResult": {
|
|
180
|
-
"import": "./
|
|
181
|
-
"require": "./
|
|
188
|
+
"import": "./dist/tsResult.js",
|
|
189
|
+
"require": "./dist/tsResult.cjs"
|
|
182
190
|
},
|
|
183
191
|
"./typeGuards": {
|
|
184
|
-
"import": "./
|
|
185
|
-
"require": "./
|
|
192
|
+
"import": "./dist/typeGuards.js",
|
|
193
|
+
"require": "./dist/typeGuards.cjs"
|
|
186
194
|
},
|
|
187
195
|
"./typeUtils": {
|
|
188
|
-
"import": "./
|
|
189
|
-
"require": "./
|
|
196
|
+
"import": "./dist/typeUtils.js",
|
|
197
|
+
"require": "./dist/typeUtils.cjs"
|
|
190
198
|
},
|
|
191
199
|
"./typeUtils.typesTest": {
|
|
192
|
-
"import": "./
|
|
193
|
-
"require": "./
|
|
200
|
+
"import": "./dist/typeUtils.typesTest.js",
|
|
201
|
+
"require": "./dist/typeUtils.typesTest.cjs"
|
|
194
202
|
},
|
|
195
203
|
"./typingFnUtils": {
|
|
196
|
-
"import": "./
|
|
197
|
-
"require": "./
|
|
204
|
+
"import": "./dist/typingFnUtils.js",
|
|
205
|
+
"require": "./dist/typingFnUtils.cjs"
|
|
198
206
|
},
|
|
199
207
|
"./typingTestUtils": {
|
|
200
|
-
"import": "./
|
|
201
|
-
"require": "./
|
|
208
|
+
"import": "./dist/typingTestUtils.js",
|
|
209
|
+
"require": "./dist/typingTestUtils.cjs"
|
|
202
210
|
},
|
|
203
211
|
"./typingUtils": {
|
|
204
|
-
"import": "./
|
|
205
|
-
"require": "./
|
|
212
|
+
"import": "./dist/typingUtils.js",
|
|
213
|
+
"require": "./dist/typingUtils.cjs"
|
|
206
214
|
},
|
|
207
215
|
"./yamlStringify": {
|
|
208
|
-
"import": "./
|
|
209
|
-
"require": "./
|
|
216
|
+
"import": "./dist/yamlStringify.js",
|
|
217
|
+
"require": "./dist/yamlStringify.cjs"
|
|
210
218
|
}
|
|
211
219
|
},
|
|
212
220
|
"engines": {
|