es-toolkit 1.12.0-dev.269 → 1.12.0-dev.271

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,10 +1,4 @@
1
1
  import "../chunk-DDH7K4QM.mjs";
2
- import {
3
- zipWith
4
- } from "../chunk-4KYXHZ4R.mjs";
5
- import {
6
- unzip
7
- } from "../chunk-UYZKMBDO.mjs";
8
2
  import {
9
3
  unzipWith
10
4
  } from "../chunk-IFNXROZR.mjs";
@@ -27,8 +21,8 @@ import {
27
21
  zipObject
28
22
  } from "../chunk-6GWEY5EL.mjs";
29
23
  import {
30
- takeWhile
31
- } from "../chunk-2IXFGSUA.mjs";
24
+ zipWith
25
+ } from "../chunk-4KYXHZ4R.mjs";
32
26
  import {
33
27
  toFilled
34
28
  } from "../chunk-OP4OAKQJ.mjs";
@@ -51,8 +45,8 @@ import {
51
45
  uniqWith
52
46
  } from "../chunk-237HGSZS.mjs";
53
47
  import {
54
- partition
55
- } from "../chunk-DN3NOZ3H.mjs";
48
+ unzip
49
+ } from "../chunk-UYZKMBDO.mjs";
56
50
  import {
57
51
  sample
58
52
  } from "../chunk-2KNLZB7V.mjs";
@@ -77,8 +71,8 @@ import {
77
71
  takeRightWhile
78
72
  } from "../chunk-NTLX2MPV.mjs";
79
73
  import {
80
- intersection
81
- } from "../chunk-FVVSE2F2.mjs";
74
+ takeWhile
75
+ } from "../chunk-2IXFGSUA.mjs";
82
76
  import {
83
77
  intersectionBy
84
78
  } from "../chunk-O6UXZR3U.mjs";
@@ -101,14 +95,11 @@ import {
101
95
  orderBy
102
96
  } from "../chunk-7B7W36UP.mjs";
103
97
  import {
104
- flatMap
105
- } from "../chunk-UY76KTPE.mjs";
98
+ partition
99
+ } from "../chunk-DN3NOZ3H.mjs";
106
100
  import {
107
101
  flattenDeep
108
102
  } from "../chunk-ML727RRJ.mjs";
109
- import {
110
- flatten
111
- } from "../chunk-33MSBDC6.mjs";
112
103
  import {
113
104
  forEachRight
114
105
  } from "../chunk-IEA53J7P.mjs";
@@ -122,8 +113,8 @@ import {
122
113
  initial
123
114
  } from "../chunk-XPSOKBRZ.mjs";
124
115
  import {
125
- difference
126
- } from "../chunk-JPUKH67K.mjs";
116
+ intersection
117
+ } from "../chunk-FVVSE2F2.mjs";
127
118
  import {
128
119
  differenceBy
129
120
  } from "../chunk-LVWX5B43.mjs";
@@ -145,6 +136,12 @@ import {
145
136
  import {
146
137
  fill
147
138
  } from "../chunk-YFN6KOC4.mjs";
139
+ import {
140
+ flatMap
141
+ } from "../chunk-UY76KTPE.mjs";
142
+ import {
143
+ flatten
144
+ } from "../chunk-33MSBDC6.mjs";
148
145
  import {
149
146
  chunk
150
147
  } from "../chunk-E6C5EZQA.mjs";
@@ -154,6 +151,9 @@ import {
154
151
  import {
155
152
  countBy
156
153
  } from "../chunk-CRSKT4WW.mjs";
154
+ import {
155
+ difference
156
+ } from "../chunk-JPUKH67K.mjs";
157
157
  import "../chunk-424M7IR7.mjs";
158
158
  export {
159
159
  chunk,
@@ -1,6 +1,5 @@
1
1
  export { compact } from '../array/compact.mjs';
2
2
  export { countBy } from '../array/countBy.mjs';
3
- export { difference } from '../array/difference.mjs';
4
3
  export { differenceBy } from '../array/differenceBy.mjs';
5
4
  export { differenceWith } from '../array/differenceWith.mjs';
6
5
  export { drop } from '../array/drop.mjs';
@@ -110,6 +109,8 @@ export { capitalize } from '../string/capitalize.mjs';
110
109
  */
111
110
  declare function chunk<T>(arr: readonly T[], size?: number): T[][];
112
111
 
112
+ declare function difference<T>(arr: readonly T[], ...values: Array<readonly T[]>): T[];
113
+
113
114
  /**
114
115
  * Creates a deeply nested object given arrays of paths and values.
115
116
  *
@@ -497,4 +498,4 @@ declare function max<T>(items?: readonly T[]): T;
497
498
  */
498
499
  declare function min<T>(items?: readonly T[]): T;
499
500
 
500
- export { chunk, endsWith, get, max, min, set, startsWith, zipObjectDeep };
501
+ export { chunk, difference, endsWith, get, max, min, set, startsWith, zipObjectDeep };
@@ -1,6 +1,5 @@
1
1
  export { compact } from '../array/compact.js';
2
2
  export { countBy } from '../array/countBy.js';
3
- export { difference } from '../array/difference.js';
4
3
  export { differenceBy } from '../array/differenceBy.js';
5
4
  export { differenceWith } from '../array/differenceWith.js';
6
5
  export { drop } from '../array/drop.js';
@@ -110,6 +109,8 @@ export { capitalize } from '../string/capitalize.js';
110
109
  */
111
110
  declare function chunk<T>(arr: readonly T[], size?: number): T[][];
112
111
 
112
+ declare function difference<T>(arr: readonly T[], ...values: Array<readonly T[]>): T[];
113
+
113
114
  /**
114
115
  * Creates a deeply nested object given arrays of paths and values.
115
116
  *
@@ -497,4 +498,4 @@ declare function max<T>(items?: readonly T[]): T;
497
498
  */
498
499
  declare function min<T>(items?: readonly T[]): T;
499
500
 
500
- export { chunk, endsWith, get, max, min, set, startsWith, zipObjectDeep };
501
+ export { chunk, difference, endsWith, get, max, min, set, startsWith, zipObjectDeep };
@@ -65,7 +65,7 @@ __export(compat_exports, {
65
65
  countBy: () => countBy,
66
66
  debounce: () => debounce,
67
67
  delay: () => delay,
68
- difference: () => difference,
68
+ difference: () => difference2,
69
69
  differenceBy: () => differenceBy,
70
70
  differenceWith: () => differenceWith,
71
71
  drop: () => drop,
@@ -1076,6 +1076,13 @@ function chunk2(arr, size = 1) {
1076
1076
  return chunk(arr, size);
1077
1077
  }
1078
1078
 
1079
+ // src/compat/array/difference.ts
1080
+ function difference2(arr, ...values) {
1081
+ const arr1 = arr;
1082
+ const arr2 = flatten(values);
1083
+ return difference(arr1, arr2);
1084
+ }
1085
+
1079
1086
  // src/compat/_internal/isIndex.ts
1080
1087
  var IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
1081
1088
  function isIndex(value) {