es-toolkit 1.13.1-dev.314 → 1.13.1-dev.316
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/array/index.mjs +19 -19
- package/dist/browser.js +15 -0
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +19 -18
- package/dist/browser.mjs.map +1 -1
- package/dist/{chunk-PYFT73RZ.mjs → chunk-HKO7DEJK.mjs} +42 -38
- package/dist/{chunk-PYFT73RZ.mjs.map → chunk-HKO7DEJK.mjs.map} +1 -1
- package/dist/chunk-OGZMEWPR.mjs +18 -0
- package/dist/chunk-OGZMEWPR.mjs.map +1 -0
- package/dist/chunk-ZA2XI3OV.mjs +1 -0
- package/dist/compat/index.d.mts +1 -0
- package/dist/compat/index.d.ts +1 -0
- package/dist/compat/index.js +16 -0
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +45 -41
- package/dist/function/after.d.mts +31 -0
- package/dist/function/after.d.ts +31 -0
- package/dist/function/after.js +42 -0
- package/dist/function/after.js.map +1 -0
- package/dist/function/after.mjs +8 -0
- package/dist/function/after.mjs.map +1 -0
- package/dist/function/index.d.mts +1 -0
- package/dist/function/index.d.ts +1 -0
- package/dist/function/index.js +16 -0
- package/dist/function/index.js.map +1 -1
- package/dist/function/index.mjs +5 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -41
- package/dist/math/index.mjs +3 -3
- package/dist/object/index.mjs +3 -3
- package/dist/predicate/index.mjs +3 -3
- package/dist/string/index.mjs +3 -3
- package/package.json +1 -1
- package/umd/browser.global.js +1 -1
- package/dist/chunk-236H5JZJ.mjs +0 -1
- /package/dist/{chunk-236H5JZJ.mjs.map → chunk-ZA2XI3OV.mjs.map} +0 -0
package/dist/array/index.mjs
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import "../chunk-DDH7K4QM.mjs";
|
|
2
|
+
import {
|
|
3
|
+
zipWith
|
|
4
|
+
} from "../chunk-4KYXHZ4R.mjs";
|
|
5
|
+
import {
|
|
6
|
+
unzip
|
|
7
|
+
} from "../chunk-UYZKMBDO.mjs";
|
|
2
8
|
import {
|
|
3
9
|
unzipWith
|
|
4
10
|
} from "../chunk-IFNXROZR.mjs";
|
|
@@ -21,8 +27,8 @@ import {
|
|
|
21
27
|
zipObject
|
|
22
28
|
} from "../chunk-6GWEY5EL.mjs";
|
|
23
29
|
import {
|
|
24
|
-
|
|
25
|
-
} from "../chunk-
|
|
30
|
+
takeWhile
|
|
31
|
+
} from "../chunk-2IXFGSUA.mjs";
|
|
26
32
|
import {
|
|
27
33
|
toFilled
|
|
28
34
|
} from "../chunk-OP4OAKQJ.mjs";
|
|
@@ -45,8 +51,8 @@ import {
|
|
|
45
51
|
uniqWith
|
|
46
52
|
} from "../chunk-237HGSZS.mjs";
|
|
47
53
|
import {
|
|
48
|
-
|
|
49
|
-
} from "../chunk-
|
|
54
|
+
partition
|
|
55
|
+
} from "../chunk-DN3NOZ3H.mjs";
|
|
50
56
|
import {
|
|
51
57
|
sample
|
|
52
58
|
} from "../chunk-2KNLZB7V.mjs";
|
|
@@ -71,8 +77,8 @@ import {
|
|
|
71
77
|
takeRightWhile
|
|
72
78
|
} from "../chunk-NTLX2MPV.mjs";
|
|
73
79
|
import {
|
|
74
|
-
|
|
75
|
-
} from "../chunk-
|
|
80
|
+
intersection
|
|
81
|
+
} from "../chunk-FVVSE2F2.mjs";
|
|
76
82
|
import {
|
|
77
83
|
intersectionBy
|
|
78
84
|
} from "../chunk-O6UXZR3U.mjs";
|
|
@@ -95,11 +101,14 @@ import {
|
|
|
95
101
|
orderBy
|
|
96
102
|
} from "../chunk-7B7W36UP.mjs";
|
|
97
103
|
import {
|
|
98
|
-
|
|
99
|
-
} from "../chunk-
|
|
104
|
+
flatMap
|
|
105
|
+
} from "../chunk-UY76KTPE.mjs";
|
|
100
106
|
import {
|
|
101
107
|
flattenDeep
|
|
102
108
|
} from "../chunk-ML727RRJ.mjs";
|
|
109
|
+
import {
|
|
110
|
+
flatten
|
|
111
|
+
} from "../chunk-33MSBDC6.mjs";
|
|
103
112
|
import {
|
|
104
113
|
forEachRight
|
|
105
114
|
} from "../chunk-IEA53J7P.mjs";
|
|
@@ -113,8 +122,8 @@ import {
|
|
|
113
122
|
initial
|
|
114
123
|
} from "../chunk-XPSOKBRZ.mjs";
|
|
115
124
|
import {
|
|
116
|
-
|
|
117
|
-
} from "../chunk-
|
|
125
|
+
difference
|
|
126
|
+
} from "../chunk-JPUKH67K.mjs";
|
|
118
127
|
import {
|
|
119
128
|
differenceBy
|
|
120
129
|
} from "../chunk-LVWX5B43.mjs";
|
|
@@ -136,12 +145,6 @@ import {
|
|
|
136
145
|
import {
|
|
137
146
|
fill
|
|
138
147
|
} from "../chunk-YFN6KOC4.mjs";
|
|
139
|
-
import {
|
|
140
|
-
flatMap
|
|
141
|
-
} from "../chunk-UY76KTPE.mjs";
|
|
142
|
-
import {
|
|
143
|
-
flatten
|
|
144
|
-
} from "../chunk-33MSBDC6.mjs";
|
|
145
148
|
import {
|
|
146
149
|
chunk
|
|
147
150
|
} from "../chunk-E6C5EZQA.mjs";
|
|
@@ -151,9 +154,6 @@ import {
|
|
|
151
154
|
import {
|
|
152
155
|
countBy
|
|
153
156
|
} from "../chunk-CRSKT4WW.mjs";
|
|
154
|
-
import {
|
|
155
|
-
difference
|
|
156
|
-
} from "../chunk-JPUKH67K.mjs";
|
|
157
157
|
import "../chunk-24FKGR6U.mjs";
|
|
158
158
|
export {
|
|
159
159
|
chunk,
|
package/dist/browser.js
CHANGED
|
@@ -45,6 +45,7 @@ var compat_exports = {};
|
|
|
45
45
|
__export(compat_exports, {
|
|
46
46
|
AbortError: () => AbortError,
|
|
47
47
|
TimeoutError: () => TimeoutError,
|
|
48
|
+
after: () => after,
|
|
48
49
|
camelCase: () => camelCase,
|
|
49
50
|
capitalize: () => capitalize,
|
|
50
51
|
chunk: () => chunk2,
|
|
@@ -689,6 +690,20 @@ var TimeoutError = class extends Error {
|
|
|
689
690
|
}
|
|
690
691
|
};
|
|
691
692
|
|
|
693
|
+
// src/function/after.ts
|
|
694
|
+
var after = (n, func) => {
|
|
695
|
+
if (!Number.isInteger(n) || n < 0) {
|
|
696
|
+
throw new Error(`n must be a non-negative integer.`);
|
|
697
|
+
}
|
|
698
|
+
let counter = 0;
|
|
699
|
+
return (...args) => {
|
|
700
|
+
if (++counter >= n) {
|
|
701
|
+
return func(...args);
|
|
702
|
+
}
|
|
703
|
+
return void 0;
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
|
|
692
707
|
// src/function/debounce.ts
|
|
693
708
|
function debounce(func, debounceMs, { signal } = {}) {
|
|
694
709
|
let timeoutId = null;
|