es-toolkit 1.12.0-dev.276 → 1.12.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.
@@ -1,7 +1,4 @@
1
1
  import "../chunk-DDH7K4QM.mjs";
2
- import {
3
- unzipWith
4
- } from "../chunk-IFNXROZR.mjs";
5
2
  import {
6
3
  without
7
4
  } from "../chunk-PYEYV7BY.mjs";
@@ -23,9 +20,6 @@ import {
23
20
  import {
24
21
  zipWith
25
22
  } from "../chunk-4KYXHZ4R.mjs";
26
- import {
27
- toFilled
28
- } from "../chunk-OP4OAKQJ.mjs";
29
23
  import {
30
24
  union
31
25
  } from "../chunk-R6QA7PLZ.mjs";
@@ -48,8 +42,8 @@ import {
48
42
  unzip
49
43
  } from "../chunk-UYZKMBDO.mjs";
50
44
  import {
51
- sample
52
- } from "../chunk-2KNLZB7V.mjs";
45
+ unzipWith
46
+ } from "../chunk-IFNXROZR.mjs";
53
47
  import {
54
48
  sampleSize
55
49
  } from "../chunk-EHSKB6DF.mjs";
@@ -74,8 +68,8 @@ import {
74
68
  takeWhile
75
69
  } from "../chunk-2IXFGSUA.mjs";
76
70
  import {
77
- intersectionBy
78
- } from "../chunk-O6UXZR3U.mjs";
71
+ toFilled
72
+ } from "../chunk-OP4OAKQJ.mjs";
79
73
  import {
80
74
  intersectionWith
81
75
  } from "../chunk-XI7KRD2C.mjs";
@@ -97,6 +91,9 @@ import {
97
91
  import {
98
92
  partition
99
93
  } from "../chunk-DN3NOZ3H.mjs";
94
+ import {
95
+ sample
96
+ } from "../chunk-2KNLZB7V.mjs";
100
97
  import {
101
98
  flattenDeep
102
99
  } from "../chunk-ML727RRJ.mjs";
@@ -116,8 +113,8 @@ import {
116
113
  intersection
117
114
  } from "../chunk-FVVSE2F2.mjs";
118
115
  import {
119
- differenceBy
120
- } from "../chunk-LVWX5B43.mjs";
116
+ intersectionBy
117
+ } from "../chunk-O6UXZR3U.mjs";
121
118
  import {
122
119
  differenceWith
123
120
  } from "../chunk-6NVQAHXP.mjs";
@@ -154,6 +151,9 @@ import {
154
151
  import {
155
152
  difference
156
153
  } from "../chunk-JPUKH67K.mjs";
154
+ import {
155
+ differenceBy
156
+ } from "../chunk-LVWX5B43.mjs";
157
157
  import "../chunk-424M7IR7.mjs";
158
158
  export {
159
159
  chunk,
@@ -1,5 +1,6 @@
1
1
  export { compact } from '../array/compact.mjs';
2
2
  export { countBy } from '../array/countBy.mjs';
3
+ export { difference } from '../array/difference.mjs';
3
4
  export { differenceBy } from '../array/differenceBy.mjs';
4
5
  export { differenceWith } from '../array/differenceWith.mjs';
5
6
  export { drop } from '../array/drop.mjs';
@@ -109,37 +110,6 @@ export { capitalize } from '../string/capitalize.mjs';
109
110
  */
110
111
  declare function chunk<T>(arr: readonly T[], size?: number): T[][];
111
112
 
112
- /**
113
- * Concatenates multiple arrays and values into a single array.
114
- *
115
- * @template T The type of elements in the array.
116
- * @param {...(T | readonly T[])} values - The values and/or arrays to concatenate.
117
- * @returns {T[]} A new array containing all the input values.
118
- *
119
- * @example
120
- * // Concatenate individual values
121
- * concat(1, 2, 3);
122
- * // returns [1, 2, 3]
123
- *
124
- * @example
125
- * // Concatenate arrays of values
126
- * concat([1, 2], [3, 4]);
127
- * // returns [1, 2, 3, 4]
128
- *
129
- * @example
130
- * // Concatenate a mix of individual values and arrays
131
- * concat(1, [2, 3], 4);
132
- * // returns [1, 2, 3, 4]
133
- *
134
- * @example
135
- * // Concatenate nested arrays
136
- * concat([1, [2, 3]], 4);
137
- * // returns [1, [2, 3], 4]
138
- */
139
- declare function concat<T>(...values: Array<T | readonly T[]>): T[];
140
-
141
- declare function difference<T>(arr: readonly T[], ...values: Array<readonly T[]>): T[];
142
-
143
113
  /**
144
114
  * Creates a deeply nested object given arrays of paths and values.
145
115
  *
@@ -527,4 +497,4 @@ declare function max<T>(items?: readonly T[]): T;
527
497
  */
528
498
  declare function min<T>(items?: readonly T[]): T;
529
499
 
530
- export { chunk, concat, difference, endsWith, get, max, min, set, startsWith, zipObjectDeep };
500
+ export { chunk, endsWith, get, max, min, set, startsWith, zipObjectDeep };
@@ -1,5 +1,6 @@
1
1
  export { compact } from '../array/compact.js';
2
2
  export { countBy } from '../array/countBy.js';
3
+ export { difference } from '../array/difference.js';
3
4
  export { differenceBy } from '../array/differenceBy.js';
4
5
  export { differenceWith } from '../array/differenceWith.js';
5
6
  export { drop } from '../array/drop.js';
@@ -109,37 +110,6 @@ export { capitalize } from '../string/capitalize.js';
109
110
  */
110
111
  declare function chunk<T>(arr: readonly T[], size?: number): T[][];
111
112
 
112
- /**
113
- * Concatenates multiple arrays and values into a single array.
114
- *
115
- * @template T The type of elements in the array.
116
- * @param {...(T | readonly T[])} values - The values and/or arrays to concatenate.
117
- * @returns {T[]} A new array containing all the input values.
118
- *
119
- * @example
120
- * // Concatenate individual values
121
- * concat(1, 2, 3);
122
- * // returns [1, 2, 3]
123
- *
124
- * @example
125
- * // Concatenate arrays of values
126
- * concat([1, 2], [3, 4]);
127
- * // returns [1, 2, 3, 4]
128
- *
129
- * @example
130
- * // Concatenate a mix of individual values and arrays
131
- * concat(1, [2, 3], 4);
132
- * // returns [1, 2, 3, 4]
133
- *
134
- * @example
135
- * // Concatenate nested arrays
136
- * concat([1, [2, 3]], 4);
137
- * // returns [1, [2, 3], 4]
138
- */
139
- declare function concat<T>(...values: Array<T | readonly T[]>): T[];
140
-
141
- declare function difference<T>(arr: readonly T[], ...values: Array<readonly T[]>): T[];
142
-
143
113
  /**
144
114
  * Creates a deeply nested object given arrays of paths and values.
145
115
  *
@@ -527,4 +497,4 @@ declare function max<T>(items?: readonly T[]): T;
527
497
  */
528
498
  declare function min<T>(items?: readonly T[]): T;
529
499
 
530
- export { chunk, concat, difference, endsWith, get, max, min, set, startsWith, zipObjectDeep };
500
+ export { chunk, endsWith, get, max, min, set, startsWith, zipObjectDeep };
@@ -62,11 +62,10 @@ __export(compat_exports, {
62
62
  clamp: () => clamp,
63
63
  clone: () => clone,
64
64
  compact: () => compact,
65
- concat: () => concat,
66
65
  countBy: () => countBy,
67
66
  debounce: () => debounce,
68
67
  delay: () => delay,
69
- difference: () => difference2,
68
+ difference: () => difference,
70
69
  differenceBy: () => differenceBy,
71
70
  differenceWith: () => differenceWith,
72
71
  drop: () => drop,
@@ -1077,18 +1076,6 @@ function chunk2(arr, size = 1) {
1077
1076
  return chunk(arr, size);
1078
1077
  }
1079
1078
 
1080
- // src/compat/array/concat.ts
1081
- function concat(...values) {
1082
- return flatten(values);
1083
- }
1084
-
1085
- // src/compat/array/difference.ts
1086
- function difference2(arr, ...values) {
1087
- const arr1 = arr;
1088
- const arr2 = flatten(values);
1089
- return difference(arr1, arr2);
1090
- }
1091
-
1092
1079
  // src/compat/_internal/isIndex.ts
1093
1080
  var IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
1094
1081
  function isIndex(value) {
@@ -1255,7 +1242,6 @@ function min(items = []) {
1255
1242
  clamp,
1256
1243
  clone,
1257
1244
  compact,
1258
- concat,
1259
1245
  countBy,
1260
1246
  debounce,
1261
1247
  delay,