@valkyriestudios/utils 12.35.0 → 12.36.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/LICENSE.md +6 -6
- package/README.md +9 -9
- package/array/index.d.ts +14 -14
- package/array/index.js +18 -20
- package/array/sort.js +76 -46
- package/boolean/index.d.ts +1 -2
- package/boolean/index.js +2 -3
- package/caching/index.d.ts +3 -3
- package/caching/index.js +6 -5
- package/date/index.d.ts +15 -15
- package/date/index.js +19 -19
- package/deep/index.d.ts +8 -5
- package/deep/index.js +12 -8
- package/formdata/index.d.ts +2 -3
- package/formdata/index.js +4 -5
- package/function/index.d.ts +9 -8
- package/function/index.js +14 -14
- package/hash/index.d.ts +2 -3
- package/hash/index.js +2 -2
- package/index.d.ts +136 -112
- package/modules/index.d.ts +2 -0
- package/modules/index.js +7 -0
- package/number/index.d.ts +37 -18
- package/number/index.js +58 -38
- package/object/index.d.ts +7 -7
- package/object/index.js +11 -13
- package/object/omit.js +14 -16
- package/object/pick.js +7 -12
- package/package.json +18 -6
- package/regexp/index.d.ts +3 -3
- package/regexp/index.js +5 -5
- package/string/index.d.ts +7 -7
- package/string/index.js +10 -13
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017
|
|
3
|
+
Copyright (c) 2017 - present, Peter Vermeulen and @valkyriestudios/utils contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
copies or substantial portions of the Software.
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
SOFTWARE.
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @valkyriestudios/utils
|
|
2
2
|
|
|
3
|
+
[](LICENSE)
|
|
3
4
|
[](https://codecov.io/gh/ValkyrieStudios/utils)
|
|
4
|
-
[](https://github.com/ValkyrieStudios/utils/actions/workflows/lint.yml)
|
|
5
|
+
[](https://github.com/ValkyrieStudios/utils/actions/workflows/ci.yml)
|
|
6
6
|
[](https://github.com/ValkyrieStudios/utils/actions/workflows/github-code-scanning/codeql)
|
|
7
7
|
[](https://www.npmjs.com/package/@valkyriestudios/utils)
|
|
8
8
|
[](https://www.npmjs.com/package/@valkyriestudios/utils)
|
|
@@ -1138,7 +1138,7 @@ A Lightweight scheduler module that works with a cron-like syntax and can be eas
|
|
|
1138
1138
|
##### Usage
|
|
1139
1139
|
Supports baseline operation:
|
|
1140
1140
|
```typescript
|
|
1141
|
-
import { Scheduler } from '@valkyriestudios/utils/modules/
|
|
1141
|
+
import { Scheduler } from '@valkyriestudios/utils/modules/Scheduler';
|
|
1142
1142
|
import * as Handlers from "..."; /* Example methods */
|
|
1143
1143
|
|
|
1144
1144
|
const mySchedule = new Scheduler({name: 'MyScheduler'});
|
|
@@ -1151,7 +1151,7 @@ await mySchedule.run();
|
|
|
1151
1151
|
|
|
1152
1152
|
Let's say you need to send something out in different timezones:
|
|
1153
1153
|
```typescript
|
|
1154
|
-
import { Scheduler } from '@valkyriestudios/utils/modules/
|
|
1154
|
+
import { Scheduler } from '@valkyriestudios/utils/modules/Scheduler';
|
|
1155
1155
|
import * as Handlers from "..."; /* Example methods */
|
|
1156
1156
|
|
|
1157
1157
|
...
|
|
@@ -1173,7 +1173,7 @@ await mySchedule.run();
|
|
|
1173
1173
|
|
|
1174
1174
|
Too much flooding! let's turn off parallelization and have it run them in linear fashion:
|
|
1175
1175
|
```typescript
|
|
1176
|
-
import { Scheduler } from '@valkyriestudios/utils/modules/
|
|
1176
|
+
import { Scheduler } from '@valkyriestudios/utils/modules/Scheduler';
|
|
1177
1177
|
import * as Handlers from "..."; /* Example methods */
|
|
1178
1178
|
|
|
1179
1179
|
...
|
|
@@ -1198,7 +1198,7 @@ await mySchedule.run();
|
|
|
1198
1198
|
|
|
1199
1199
|
Okay we can actually send 3 at a time, let's set that up:
|
|
1200
1200
|
```typescript
|
|
1201
|
-
import { Scheduler } from '@valkyriestudios/utils/modules/
|
|
1201
|
+
import { Scheduler } from '@valkyriestudios/utils/modules/Scheduler';
|
|
1202
1202
|
import * as Handlers from "..."; /* Example methods */
|
|
1203
1203
|
|
|
1204
1204
|
...
|
|
@@ -1223,7 +1223,7 @@ await mySchedule.run();
|
|
|
1223
1223
|
|
|
1224
1224
|
Oh no the emails aren't going out to the right user because we didn't pass our data:
|
|
1225
1225
|
```typescript
|
|
1226
|
-
import { Scheduler } from '@valkyriestudios/utils/modules/
|
|
1226
|
+
import { Scheduler } from '@valkyriestudios/utils/modules/Scheduler';
|
|
1227
1227
|
import * as Handlers from "..."; /* Example methods */
|
|
1228
1228
|
|
|
1229
1229
|
...
|
|
@@ -1249,7 +1249,7 @@ await mySchedule.run();
|
|
|
1249
1249
|
|
|
1250
1250
|
I want this to run continuously so that I can just leave it running on a server:
|
|
1251
1251
|
```typescript
|
|
1252
|
-
import { Scheduler } from '@valkyriestudios/utils/modules/
|
|
1252
|
+
import { Scheduler } from '@valkyriestudios/utils/modules/Scheduler';
|
|
1253
1253
|
import * as Handlers from "..."; /* Example methods */
|
|
1254
1254
|
|
|
1255
1255
|
...
|
|
@@ -1281,7 +1281,7 @@ Creates a new Scheduler instance.
|
|
|
1281
1281
|
-- **name (optional)**: A non‑empty string to name the instance.
|
|
1282
1282
|
-- **timeZone (optional)**: (default=local timezone) The default timeZone the scheduler is run in
|
|
1283
1283
|
-- **parallel (optional)**: (default=true) Scheduler will run jobs that need to run in parallel, set to false to run linear, set to a number to run X jobs in parallel
|
|
1284
|
-
-- **auto (optional)**: (default=false) Set to true to automatically run the schedule every 60 seconds
|
|
1284
|
+
-- **auto (optional)**: (default=false) Set to true to automatically run the schedule every 60 seconds
|
|
1285
1285
|
- **add(job: {name:string; schedule:string; fn: Function; timeZone?: string | null; data?: unknown}): boolean**
|
|
1286
1286
|
Add a job to the schedule
|
|
1287
1287
|
-- If a timeZone is passed we will automatically check against local time in that timeZone on whether or not the job needs to run.
|
package/array/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export {
|
|
1
|
+
export { dedupe } from './dedupe';
|
|
2
|
+
export { join } from './join';
|
|
3
|
+
export { mapFn } from './mapFn';
|
|
4
|
+
export { mapFnAsMap } from './mapFnAsMap';
|
|
5
|
+
export { mapKey } from './mapKey';
|
|
6
|
+
export { mapKeyAsMap } from './mapKeyAsMap';
|
|
7
|
+
export { mapPrimitive } from './mapPrimitive';
|
|
8
|
+
export { groupBy } from './groupBy';
|
|
9
|
+
export { shuffle } from './shuffle';
|
|
10
|
+
export { split } from './split';
|
|
11
|
+
export { sort } from './sort';
|
|
12
|
+
export { isArray } from './is';
|
|
13
|
+
export { isNotEmptyArray } from './isNotEmpty';
|
|
14
|
+
export { isNotEmptyArray as isNeArray } from './isNotEmpty';
|
package/array/index.js
CHANGED
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.isNeArray = exports.isNotEmptyArray = exports.isArray = exports.sort = exports.split = exports.shuffle = exports.groupBy = exports.mapPrimitive = exports.mapKeyAsMap = exports.mapKey = exports.mapFnAsMap = exports.mapFn = exports.join = exports.dedupe = void 0;
|
|
4
|
+
var dedupe_1 = require("./dedupe");
|
|
5
5
|
Object.defineProperty(exports, "dedupe", { enumerable: true, get: function () { return dedupe_1.dedupe; } });
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "isArray", { enumerable: true, get: function () { return is_1.isArray; } });
|
|
8
|
-
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isArray; } });
|
|
9
|
-
const isNotEmpty_1 = require("./isNotEmpty");
|
|
10
|
-
Object.defineProperty(exports, "isNotEmptyArray", { enumerable: true, get: function () { return isNotEmpty_1.isNotEmptyArray; } });
|
|
11
|
-
Object.defineProperty(exports, "isNotEmpty", { enumerable: true, get: function () { return isNotEmpty_1.isNotEmptyArray; } });
|
|
12
|
-
Object.defineProperty(exports, "isNeArray", { enumerable: true, get: function () { return isNotEmpty_1.isNotEmptyArray; } });
|
|
13
|
-
Object.defineProperty(exports, "isNe", { enumerable: true, get: function () { return isNotEmpty_1.isNotEmptyArray; } });
|
|
14
|
-
const join_1 = require("./join");
|
|
6
|
+
var join_1 = require("./join");
|
|
15
7
|
Object.defineProperty(exports, "join", { enumerable: true, get: function () { return join_1.join; } });
|
|
16
|
-
|
|
8
|
+
var mapFn_1 = require("./mapFn");
|
|
17
9
|
Object.defineProperty(exports, "mapFn", { enumerable: true, get: function () { return mapFn_1.mapFn; } });
|
|
18
|
-
|
|
10
|
+
var mapFnAsMap_1 = require("./mapFnAsMap");
|
|
19
11
|
Object.defineProperty(exports, "mapFnAsMap", { enumerable: true, get: function () { return mapFnAsMap_1.mapFnAsMap; } });
|
|
20
|
-
|
|
12
|
+
var mapKey_1 = require("./mapKey");
|
|
21
13
|
Object.defineProperty(exports, "mapKey", { enumerable: true, get: function () { return mapKey_1.mapKey; } });
|
|
22
|
-
|
|
14
|
+
var mapKeyAsMap_1 = require("./mapKeyAsMap");
|
|
23
15
|
Object.defineProperty(exports, "mapKeyAsMap", { enumerable: true, get: function () { return mapKeyAsMap_1.mapKeyAsMap; } });
|
|
24
|
-
|
|
16
|
+
var mapPrimitive_1 = require("./mapPrimitive");
|
|
25
17
|
Object.defineProperty(exports, "mapPrimitive", { enumerable: true, get: function () { return mapPrimitive_1.mapPrimitive; } });
|
|
26
|
-
|
|
18
|
+
var groupBy_1 = require("./groupBy");
|
|
27
19
|
Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_1.groupBy; } });
|
|
28
|
-
|
|
20
|
+
var shuffle_1 = require("./shuffle");
|
|
29
21
|
Object.defineProperty(exports, "shuffle", { enumerable: true, get: function () { return shuffle_1.shuffle; } });
|
|
30
|
-
|
|
22
|
+
var split_1 = require("./split");
|
|
31
23
|
Object.defineProperty(exports, "split", { enumerable: true, get: function () { return split_1.split; } });
|
|
32
|
-
|
|
24
|
+
var sort_1 = require("./sort");
|
|
33
25
|
Object.defineProperty(exports, "sort", { enumerable: true, get: function () { return sort_1.sort; } });
|
|
26
|
+
var is_1 = require("./is");
|
|
27
|
+
Object.defineProperty(exports, "isArray", { enumerable: true, get: function () { return is_1.isArray; } });
|
|
28
|
+
var isNotEmpty_1 = require("./isNotEmpty");
|
|
29
|
+
Object.defineProperty(exports, "isNotEmptyArray", { enumerable: true, get: function () { return isNotEmpty_1.isNotEmptyArray; } });
|
|
30
|
+
var isNotEmpty_2 = require("./isNotEmpty");
|
|
31
|
+
Object.defineProperty(exports, "isNeArray", { enumerable: true, get: function () { return isNotEmpty_2.isNotEmptyArray; } });
|
package/array/sort.js
CHANGED
|
@@ -4,17 +4,15 @@ exports.sort = sort;
|
|
|
4
4
|
exports.default = sort;
|
|
5
5
|
const is_1 = require("../object/is");
|
|
6
6
|
const INSERTION_SORT_THRESHOLD = 10;
|
|
7
|
-
function
|
|
7
|
+
function partitionAsc(arr, low, high) {
|
|
8
8
|
const pivot = arr[(low + high) >> 1][0];
|
|
9
9
|
let i = low;
|
|
10
10
|
let j = high;
|
|
11
11
|
while (i <= j) {
|
|
12
|
-
while (arr[i][0] < pivot)
|
|
12
|
+
while (arr[i][0] < pivot)
|
|
13
13
|
i++;
|
|
14
|
-
|
|
15
|
-
while (arr[j][0] > pivot) {
|
|
14
|
+
while (arr[j][0] > pivot)
|
|
16
15
|
j--;
|
|
17
|
-
}
|
|
18
16
|
if (i <= j) {
|
|
19
17
|
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
20
18
|
i++;
|
|
@@ -23,7 +21,7 @@ function partition(arr, low, high) {
|
|
|
23
21
|
}
|
|
24
22
|
return i;
|
|
25
23
|
}
|
|
26
|
-
function
|
|
24
|
+
function quickSortAsc(arr) {
|
|
27
25
|
const stack = [[0, arr.length - 1]];
|
|
28
26
|
while (stack.length) {
|
|
29
27
|
const [low, high] = stack.pop();
|
|
@@ -39,7 +37,48 @@ function quickSort(arr) {
|
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
39
|
else {
|
|
42
|
-
const p =
|
|
40
|
+
const p = partitionAsc(arr, low, high);
|
|
41
|
+
if (p - 1 > low)
|
|
42
|
+
stack.push([low, p - 1]);
|
|
43
|
+
if (p < high)
|
|
44
|
+
stack.push([p, high]);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function partitionDesc(arr, low, high) {
|
|
49
|
+
const pivot = arr[(low + high) >> 1][0];
|
|
50
|
+
let i = low;
|
|
51
|
+
let j = high;
|
|
52
|
+
while (i <= j) {
|
|
53
|
+
while (arr[i][0] > pivot)
|
|
54
|
+
i++;
|
|
55
|
+
while (arr[j][0] < pivot)
|
|
56
|
+
j--;
|
|
57
|
+
if (i <= j) {
|
|
58
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
59
|
+
i++;
|
|
60
|
+
j--;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return i;
|
|
64
|
+
}
|
|
65
|
+
function quickSortDesc(arr) {
|
|
66
|
+
const stack = [[0, arr.length - 1]];
|
|
67
|
+
while (stack.length) {
|
|
68
|
+
const [low, high] = stack.pop();
|
|
69
|
+
if (high - low <= INSERTION_SORT_THRESHOLD) {
|
|
70
|
+
for (let i = low + 1; i <= high; i++) {
|
|
71
|
+
const key = arr[i];
|
|
72
|
+
let j = i - 1;
|
|
73
|
+
while (j >= low && arr[j][0] < key[0]) {
|
|
74
|
+
arr[j + 1] = arr[j];
|
|
75
|
+
j--;
|
|
76
|
+
}
|
|
77
|
+
arr[j + 1] = key;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
const p = partitionDesc(arr, low, high);
|
|
43
82
|
if (p - 1 > low)
|
|
44
83
|
stack.push([low, p - 1]);
|
|
45
84
|
if (p < high)
|
|
@@ -60,51 +99,42 @@ function sort(arr, by, dir = 'asc', opts) {
|
|
|
60
99
|
const fn = opts.filter_fn;
|
|
61
100
|
FILTER_FN = (el => (0, is_1.isObject)(el) && fn(el));
|
|
62
101
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
prepared_arr.push([key, el]);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
102
|
+
const by_type = typeof by;
|
|
103
|
+
let BY_FN;
|
|
104
|
+
switch (by_type) {
|
|
105
|
+
case 'function':
|
|
106
|
+
BY_FN = by;
|
|
107
|
+
break;
|
|
108
|
+
case 'string':
|
|
109
|
+
if (!by.length)
|
|
110
|
+
throw new Error('Sort by as string should contain content');
|
|
111
|
+
BY_FN = ((val) => val?.[by]);
|
|
112
|
+
break;
|
|
113
|
+
default:
|
|
114
|
+
throw new Error('Sort by should either be a string with content or a function');
|
|
81
115
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
prepared_arr.push([key, el]);
|
|
93
|
-
}
|
|
116
|
+
const tosort_arr = [];
|
|
117
|
+
const noval_arr = [];
|
|
118
|
+
for (let i = 0; i < len; i++) {
|
|
119
|
+
const el = arr[i];
|
|
120
|
+
if (FILTER_FN(el)) {
|
|
121
|
+
const val = BY_FN(el);
|
|
122
|
+
if (val === undefined)
|
|
123
|
+
noval_arr.push(el);
|
|
124
|
+
else
|
|
125
|
+
tosort_arr.push([val, el]);
|
|
94
126
|
}
|
|
95
127
|
}
|
|
96
|
-
else {
|
|
97
|
-
throw new Error('Sort by should either be a string with content or a function');
|
|
98
|
-
}
|
|
99
|
-
quickSort(prepared_arr);
|
|
100
128
|
if (dir === 'desc')
|
|
101
|
-
|
|
129
|
+
quickSortDesc(tosort_arr);
|
|
130
|
+
else
|
|
131
|
+
quickSortAsc(tosort_arr);
|
|
102
132
|
const rslt = [];
|
|
103
133
|
if (!NOKEY_HIDE && !NOKEY_AT_END)
|
|
104
|
-
rslt.push(...
|
|
105
|
-
for (let i = 0; i <
|
|
106
|
-
rslt.push(
|
|
134
|
+
rslt.push(...noval_arr);
|
|
135
|
+
for (let i = 0; i < tosort_arr.length; i++)
|
|
136
|
+
rslt.push(tosort_arr[i][1]);
|
|
107
137
|
if (!NOKEY_HIDE && NOKEY_AT_END)
|
|
108
|
-
rslt.push(...
|
|
138
|
+
rslt.push(...noval_arr);
|
|
109
139
|
return rslt;
|
|
110
140
|
}
|
package/boolean/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { isBoolean, isBoolean as is };
|
|
1
|
+
export { isBoolean } from './is';
|
package/boolean/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.isBoolean = void 0;
|
|
4
|
+
var is_1 = require("./is");
|
|
5
5
|
Object.defineProperty(exports, "isBoolean", { enumerable: true, get: function () { return is_1.isBoolean; } });
|
|
6
|
-
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isBoolean; } });
|
package/caching/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { LRUCache
|
|
1
|
+
export { memoize } from './memoize';
|
|
2
|
+
export { LRUCache } from './LRU';
|
|
3
|
+
export { LRUCache as LRU } from './LRU';
|
package/caching/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "LRUCache", { enumerable: true, get: function () { return LRU_1.LRUCache; } });
|
|
6
|
-
Object.defineProperty(exports, "LRU", { enumerable: true, get: function () { return LRU_1.LRUCache; } });
|
|
7
|
-
const memoize_1 = require("./memoize");
|
|
3
|
+
exports.LRU = exports.LRUCache = exports.memoize = void 0;
|
|
4
|
+
var memoize_1 = require("./memoize");
|
|
8
5
|
Object.defineProperty(exports, "memoize", { enumerable: true, get: function () { return memoize_1.memoize; } });
|
|
6
|
+
var LRU_1 = require("./LRU");
|
|
7
|
+
Object.defineProperty(exports, "LRUCache", { enumerable: true, get: function () { return LRU_1.LRUCache; } });
|
|
8
|
+
var LRU_2 = require("./LRU");
|
|
9
|
+
Object.defineProperty(exports, "LRU", { enumerable: true, get: function () { return LRU_2.LRUCache; } });
|
package/date/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export {
|
|
1
|
+
export { addUTC } from './addUTC';
|
|
2
|
+
export { convertToDate } from './convertToDate';
|
|
3
|
+
export { diff } from './diff';
|
|
4
|
+
export { endOfUTC } from './endOfUTC';
|
|
5
|
+
export { format } from './format';
|
|
6
|
+
export { isLeap } from './isLeap';
|
|
7
|
+
export { nowUnix } from './nowUnix';
|
|
8
|
+
export { nowUnixMs } from './nowUnixMs';
|
|
9
|
+
export { setTimeUTC } from './setTimeUTC';
|
|
10
|
+
export { startOfUTC } from './startOfUTC';
|
|
11
|
+
export { toUnix } from './toUnix';
|
|
12
|
+
export { toUTC } from './toUTC';
|
|
13
|
+
export { isDateFormat as isFormat } from './isFormat';
|
|
14
|
+
export { isDateFormat } from './isFormat';
|
|
15
|
+
export { isDate } from './is';
|
package/date/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.isDate = exports.isDateFormat = exports.isFormat = exports.toUTC = exports.toUnix = exports.startOfUTC = exports.setTimeUTC = exports.nowUnixMs = exports.nowUnix = exports.isLeap = exports.format = exports.endOfUTC = exports.diff = exports.convertToDate = exports.addUTC = void 0;
|
|
4
|
+
var addUTC_1 = require("./addUTC");
|
|
5
5
|
Object.defineProperty(exports, "addUTC", { enumerable: true, get: function () { return addUTC_1.addUTC; } });
|
|
6
|
-
|
|
6
|
+
var convertToDate_1 = require("./convertToDate");
|
|
7
7
|
Object.defineProperty(exports, "convertToDate", { enumerable: true, get: function () { return convertToDate_1.convertToDate; } });
|
|
8
|
-
|
|
8
|
+
var diff_1 = require("./diff");
|
|
9
9
|
Object.defineProperty(exports, "diff", { enumerable: true, get: function () { return diff_1.diff; } });
|
|
10
|
-
|
|
10
|
+
var endOfUTC_1 = require("./endOfUTC");
|
|
11
11
|
Object.defineProperty(exports, "endOfUTC", { enumerable: true, get: function () { return endOfUTC_1.endOfUTC; } });
|
|
12
|
-
|
|
12
|
+
var format_1 = require("./format");
|
|
13
13
|
Object.defineProperty(exports, "format", { enumerable: true, get: function () { return format_1.format; } });
|
|
14
|
-
|
|
15
|
-
Object.defineProperty(exports, "isFormat", { enumerable: true, get: function () { return isFormat_1.isDateFormat; } });
|
|
16
|
-
Object.defineProperty(exports, "isDateFormat", { enumerable: true, get: function () { return isFormat_1.isDateFormat; } });
|
|
17
|
-
const is_1 = require("./is");
|
|
18
|
-
Object.defineProperty(exports, "isDate", { enumerable: true, get: function () { return is_1.isDate; } });
|
|
19
|
-
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isDate; } });
|
|
20
|
-
const isLeap_1 = require("./isLeap");
|
|
14
|
+
var isLeap_1 = require("./isLeap");
|
|
21
15
|
Object.defineProperty(exports, "isLeap", { enumerable: true, get: function () { return isLeap_1.isLeap; } });
|
|
22
|
-
|
|
16
|
+
var nowUnix_1 = require("./nowUnix");
|
|
23
17
|
Object.defineProperty(exports, "nowUnix", { enumerable: true, get: function () { return nowUnix_1.nowUnix; } });
|
|
24
|
-
|
|
18
|
+
var nowUnixMs_1 = require("./nowUnixMs");
|
|
25
19
|
Object.defineProperty(exports, "nowUnixMs", { enumerable: true, get: function () { return nowUnixMs_1.nowUnixMs; } });
|
|
26
|
-
|
|
20
|
+
var setTimeUTC_1 = require("./setTimeUTC");
|
|
27
21
|
Object.defineProperty(exports, "setTimeUTC", { enumerable: true, get: function () { return setTimeUTC_1.setTimeUTC; } });
|
|
28
|
-
|
|
22
|
+
var startOfUTC_1 = require("./startOfUTC");
|
|
29
23
|
Object.defineProperty(exports, "startOfUTC", { enumerable: true, get: function () { return startOfUTC_1.startOfUTC; } });
|
|
30
|
-
|
|
24
|
+
var toUnix_1 = require("./toUnix");
|
|
31
25
|
Object.defineProperty(exports, "toUnix", { enumerable: true, get: function () { return toUnix_1.toUnix; } });
|
|
32
|
-
|
|
26
|
+
var toUTC_1 = require("./toUTC");
|
|
33
27
|
Object.defineProperty(exports, "toUTC", { enumerable: true, get: function () { return toUTC_1.toUTC; } });
|
|
28
|
+
var isFormat_1 = require("./isFormat");
|
|
29
|
+
Object.defineProperty(exports, "isFormat", { enumerable: true, get: function () { return isFormat_1.isDateFormat; } });
|
|
30
|
+
var isFormat_2 = require("./isFormat");
|
|
31
|
+
Object.defineProperty(exports, "isDateFormat", { enumerable: true, get: function () { return isFormat_2.isDateFormat; } });
|
|
32
|
+
var is_1 = require("./is");
|
|
33
|
+
Object.defineProperty(exports, "isDate", { enumerable: true, get: function () { return is_1.isDate; } });
|
package/deep/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
1
|
+
export { deepFreeze as freeze } from './freeze';
|
|
2
|
+
export { deepFreeze } from './freeze';
|
|
3
|
+
export { deepGet as get } from './get';
|
|
4
|
+
export { deepGet } from './get';
|
|
5
|
+
export { deepSeal as seal } from './seal';
|
|
6
|
+
export { deepSeal } from './seal';
|
|
7
|
+
export { deepSet as set } from './set';
|
|
8
|
+
export { deepSet } from './set';
|
package/deep/index.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deepSet = exports.set = exports.deepSeal = exports.seal = exports.deepGet = exports.get = exports.deepFreeze = exports.freeze = void 0;
|
|
4
|
-
|
|
4
|
+
var freeze_1 = require("./freeze");
|
|
5
5
|
Object.defineProperty(exports, "freeze", { enumerable: true, get: function () { return freeze_1.deepFreeze; } });
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var freeze_2 = require("./freeze");
|
|
7
|
+
Object.defineProperty(exports, "deepFreeze", { enumerable: true, get: function () { return freeze_2.deepFreeze; } });
|
|
8
|
+
var get_1 = require("./get");
|
|
8
9
|
Object.defineProperty(exports, "get", { enumerable: true, get: function () { return get_1.deepGet; } });
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
var get_2 = require("./get");
|
|
11
|
+
Object.defineProperty(exports, "deepGet", { enumerable: true, get: function () { return get_2.deepGet; } });
|
|
12
|
+
var seal_1 = require("./seal");
|
|
11
13
|
Object.defineProperty(exports, "seal", { enumerable: true, get: function () { return seal_1.deepSeal; } });
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
var seal_2 = require("./seal");
|
|
15
|
+
Object.defineProperty(exports, "deepSeal", { enumerable: true, get: function () { return seal_2.deepSeal; } });
|
|
16
|
+
var set_1 = require("./set");
|
|
14
17
|
Object.defineProperty(exports, "set", { enumerable: true, get: function () { return set_1.deepSet; } });
|
|
15
|
-
|
|
18
|
+
var set_2 = require("./set");
|
|
19
|
+
Object.defineProperty(exports, "deepSet", { enumerable: true, get: function () { return set_2.deepSet; } });
|
package/formdata/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { isFormData, isFormData as is, toObject };
|
|
1
|
+
export { toObject } from './toObject';
|
|
2
|
+
export { isFormData } from './is';
|
package/formdata/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "isFormData", { enumerable: true, get: function () { return is_1.isFormData; } });
|
|
6
|
-
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isFormData; } });
|
|
7
|
-
const toObject_1 = require("./toObject");
|
|
3
|
+
exports.isFormData = exports.toObject = void 0;
|
|
4
|
+
var toObject_1 = require("./toObject");
|
|
8
5
|
Object.defineProperty(exports, "toObject", { enumerable: true, get: function () { return toObject_1.toObject; } });
|
|
6
|
+
var is_1 = require("./is");
|
|
7
|
+
Object.defineProperty(exports, "isFormData", { enumerable: true, get: function () { return is_1.isFormData; } });
|
package/function/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export {
|
|
1
|
+
export { debounce } from './debounce';
|
|
2
|
+
export { noop } from './noop';
|
|
3
|
+
export { noopresolve } from './noopresolve';
|
|
4
|
+
export { noopreturn } from './noopreturn';
|
|
5
|
+
export { sleep } from './sleep';
|
|
6
|
+
export { isFunction } from './is';
|
|
7
|
+
export { isFunction as isFn } from './is';
|
|
8
|
+
export { isAsyncFunction } from './isAsync';
|
|
9
|
+
export { isAsyncFunction as isAsyncFn } from './isAsync';
|
package/function/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.isAsyncFn = exports.isAsyncFunction = exports.isFn = exports.isFunction = exports.sleep = exports.noopreturn = exports.noopresolve = exports.noop = exports.debounce = void 0;
|
|
4
|
+
var debounce_1 = require("./debounce");
|
|
5
5
|
Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return debounce_1.debounce; } });
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "isFunction", { enumerable: true, get: function () { return is_1.isFunction; } });
|
|
8
|
-
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isFunction; } });
|
|
9
|
-
Object.defineProperty(exports, "isFn", { enumerable: true, get: function () { return is_1.isFunction; } });
|
|
10
|
-
const isAsync_1 = require("./isAsync");
|
|
11
|
-
Object.defineProperty(exports, "isAsyncFunction", { enumerable: true, get: function () { return isAsync_1.isAsyncFunction; } });
|
|
12
|
-
Object.defineProperty(exports, "isAsync", { enumerable: true, get: function () { return isAsync_1.isAsyncFunction; } });
|
|
13
|
-
Object.defineProperty(exports, "isAsyncFn", { enumerable: true, get: function () { return isAsync_1.isAsyncFunction; } });
|
|
14
|
-
const noop_1 = require("./noop");
|
|
6
|
+
var noop_1 = require("./noop");
|
|
15
7
|
Object.defineProperty(exports, "noop", { enumerable: true, get: function () { return noop_1.noop; } });
|
|
16
|
-
|
|
8
|
+
var noopresolve_1 = require("./noopresolve");
|
|
17
9
|
Object.defineProperty(exports, "noopresolve", { enumerable: true, get: function () { return noopresolve_1.noopresolve; } });
|
|
18
|
-
|
|
10
|
+
var noopreturn_1 = require("./noopreturn");
|
|
19
11
|
Object.defineProperty(exports, "noopreturn", { enumerable: true, get: function () { return noopreturn_1.noopreturn; } });
|
|
20
|
-
|
|
12
|
+
var sleep_1 = require("./sleep");
|
|
21
13
|
Object.defineProperty(exports, "sleep", { enumerable: true, get: function () { return sleep_1.sleep; } });
|
|
14
|
+
var is_1 = require("./is");
|
|
15
|
+
Object.defineProperty(exports, "isFunction", { enumerable: true, get: function () { return is_1.isFunction; } });
|
|
16
|
+
var is_2 = require("./is");
|
|
17
|
+
Object.defineProperty(exports, "isFn", { enumerable: true, get: function () { return is_2.isFunction; } });
|
|
18
|
+
var isAsync_1 = require("./isAsync");
|
|
19
|
+
Object.defineProperty(exports, "isAsyncFunction", { enumerable: true, get: function () { return isAsync_1.isAsyncFunction; } });
|
|
20
|
+
var isAsync_2 = require("./isAsync");
|
|
21
|
+
Object.defineProperty(exports, "isAsyncFn", { enumerable: true, get: function () { return isAsync_2.isAsyncFunction; } });
|
package/hash/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { fnv1A, guid };
|
|
1
|
+
export { fnv1A } from './fnv1A';
|
|
2
|
+
export { guid } from './guid';
|
package/hash/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.guid = exports.fnv1A = void 0;
|
|
4
|
-
|
|
4
|
+
var fnv1A_1 = require("./fnv1A");
|
|
5
5
|
Object.defineProperty(exports, "fnv1A", { enumerable: true, get: function () { return fnv1A_1.fnv1A; } });
|
|
6
|
-
|
|
6
|
+
var guid_1 = require("./guid");
|
|
7
7
|
Object.defineProperty(exports, "guid", { enumerable: true, get: function () { return guid_1.guid; } });
|