es-toolkit 1.35.0-dev.1209 → 1.35.0-dev.1212

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.
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
3
+ *
4
+ * @template K - The type of elements in the array.
5
+ * @template T - The type of the array.
6
+ * @param {T | null | undefined} array - The array to iterate over.
7
+ * @param {(value: K, index: number, array: T) => unknown} [callback] - The function invoked for each element.
8
+ * The callback function receives three arguments:
9
+ * - 'value': The current element being processed in the array.
10
+ * - 'index': The index of the current element being processed in the array.
11
+ * - 'array': The array 'forEachRight' was called upon.
12
+ * @returns {T} Returns the original array.
13
+ *
14
+ * @example
15
+ * forEachRight([1, 2, 3], (value, index, array) => console.log(value, index));
16
+ * // Output:
17
+ * // 3 2
18
+ * // 2 1
19
+ * // 1 0
20
+ *
21
+ */
22
+ declare function forEachRight<T>(array: T[], callback?: (value: T, index: number, array: T[]) => unknown): T[];
23
+ /**
24
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
25
+ *
26
+ * @template K - The type of elements in the array.
27
+ * @template T - The type of the array.
28
+ * @param {T | null | undefined} array - The array to iterate over.
29
+ * @param {(value: K, index: number, array: T) => unknown} [callback] - The function invoked for each element.
30
+ * The callback function receives three arguments:
31
+ * - 'value': The current element being processed in the array.
32
+ * - 'index': The index of the current element being processed in the array.
33
+ * - 'array': The array 'forEachRight' was called upon.
34
+ * @returns {T} Returns the original array.
35
+ *
36
+ * @example
37
+ * forEachRight([1, 2, 3], (value, index, array) => console.log(value, index));
38
+ * // Output:
39
+ * // 3 2
40
+ * // 2 1
41
+ * // 1 0
42
+ *
43
+ */
44
+ declare function forEachRight<T>(array: readonly T[], callback?: (value: T, index: number, array: T[]) => unknown): readonly T[];
45
+ /**
46
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
47
+ *
48
+ * @template T - The type of string.
49
+ * @param {T | null | undefined} string - The string to iterate over
50
+ * @param {(value: T, index: number, string: T) => unknown} [callback] - The function invoked for each char.
51
+ * The callback function receives three arguments:
52
+ * - 'char': The current char being processed in the string.
53
+ * - 'index': The index of the current char being processed in the string.
54
+ * - 'string': The string 'forEachRight' was called upon.
55
+ * @returns {T} Returns the original string.
56
+ *
57
+ * @example
58
+ * forEachRight('abc', (char, index, string) => console.log(char, index));
59
+ * // Output:
60
+ * // 'c' 2
61
+ * // 'b' 1
62
+ * // 'a' 0
63
+ */
64
+ declare function forEachRight<T extends string | null | undefined>(string: T, callback?: (char: string, index: number, string: string) => unknown): T;
65
+ /**
66
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
67
+ *
68
+ * @template T - The type of elements in the array.
69
+ * @param { ArrayLike<T> } array - The array to iterate over.
70
+ * @param {(value: T, index: number, array: ArrayLike<T>) => unknown} [callback] - The function invoked for each element.
71
+ * The callback function receives three arguments:
72
+ * - 'value': The current element being processed in the array.
73
+ * - 'index': The index of the current element being processed in the array.
74
+ * - 'array': The array 'forEachRight' was called upon.
75
+ * @returns {T} Returns the original array.
76
+ *
77
+ * @example
78
+ * forEachRight([1, 2, 3], (value, index, array) => console.log(value, index));
79
+ * // Output:
80
+ * // 3 2
81
+ * // 2 1
82
+ * // 1 0
83
+ *
84
+ */
85
+ declare function forEachRight<T>(array: ArrayLike<T>, callback?: (value: T, index: number, array: ArrayLike<T>) => unknown): ArrayLike<T>;
86
+ /**
87
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
88
+ *
89
+ * @template T - The type of object.
90
+ * @param {T} object - The object to iterate over.
91
+ * @param {(value: T[keyof T], key: keyof T, object: T) => unknown} [callback] - The function invoked for each property.
92
+ * The callback function receives three arguments:
93
+ * - 'value': The current property being processed in the object.
94
+ * - 'key': The key of the current property being processed in the object.
95
+ * - 'object': The object 'forEachRight' was called upon.
96
+ * @returns {T} Returns the original object.
97
+ *
98
+ * @example
99
+ * forEachRight({'a': 1, 'b': 2 }, (value, key, object) => console.log(value, key));
100
+ * // Output:
101
+ * // 2 'b'
102
+ * // 1 'a'
103
+ */
104
+ declare function forEachRight<T extends object | null | undefined>(object: T, callback?: (value: T[keyof T], key: keyof T, object: T) => unknown): T;
105
+
106
+ export { forEachRight };
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
3
+ *
4
+ * @template K - The type of elements in the array.
5
+ * @template T - The type of the array.
6
+ * @param {T | null | undefined} array - The array to iterate over.
7
+ * @param {(value: K, index: number, array: T) => unknown} [callback] - The function invoked for each element.
8
+ * The callback function receives three arguments:
9
+ * - 'value': The current element being processed in the array.
10
+ * - 'index': The index of the current element being processed in the array.
11
+ * - 'array': The array 'forEachRight' was called upon.
12
+ * @returns {T} Returns the original array.
13
+ *
14
+ * @example
15
+ * forEachRight([1, 2, 3], (value, index, array) => console.log(value, index));
16
+ * // Output:
17
+ * // 3 2
18
+ * // 2 1
19
+ * // 1 0
20
+ *
21
+ */
22
+ declare function forEachRight<T>(array: T[], callback?: (value: T, index: number, array: T[]) => unknown): T[];
23
+ /**
24
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
25
+ *
26
+ * @template K - The type of elements in the array.
27
+ * @template T - The type of the array.
28
+ * @param {T | null | undefined} array - The array to iterate over.
29
+ * @param {(value: K, index: number, array: T) => unknown} [callback] - The function invoked for each element.
30
+ * The callback function receives three arguments:
31
+ * - 'value': The current element being processed in the array.
32
+ * - 'index': The index of the current element being processed in the array.
33
+ * - 'array': The array 'forEachRight' was called upon.
34
+ * @returns {T} Returns the original array.
35
+ *
36
+ * @example
37
+ * forEachRight([1, 2, 3], (value, index, array) => console.log(value, index));
38
+ * // Output:
39
+ * // 3 2
40
+ * // 2 1
41
+ * // 1 0
42
+ *
43
+ */
44
+ declare function forEachRight<T>(array: readonly T[], callback?: (value: T, index: number, array: T[]) => unknown): readonly T[];
45
+ /**
46
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
47
+ *
48
+ * @template T - The type of string.
49
+ * @param {T | null | undefined} string - The string to iterate over
50
+ * @param {(value: T, index: number, string: T) => unknown} [callback] - The function invoked for each char.
51
+ * The callback function receives three arguments:
52
+ * - 'char': The current char being processed in the string.
53
+ * - 'index': The index of the current char being processed in the string.
54
+ * - 'string': The string 'forEachRight' was called upon.
55
+ * @returns {T} Returns the original string.
56
+ *
57
+ * @example
58
+ * forEachRight('abc', (char, index, string) => console.log(char, index));
59
+ * // Output:
60
+ * // 'c' 2
61
+ * // 'b' 1
62
+ * // 'a' 0
63
+ */
64
+ declare function forEachRight<T extends string | null | undefined>(string: T, callback?: (char: string, index: number, string: string) => unknown): T;
65
+ /**
66
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
67
+ *
68
+ * @template T - The type of elements in the array.
69
+ * @param { ArrayLike<T> } array - The array to iterate over.
70
+ * @param {(value: T, index: number, array: ArrayLike<T>) => unknown} [callback] - The function invoked for each element.
71
+ * The callback function receives three arguments:
72
+ * - 'value': The current element being processed in the array.
73
+ * - 'index': The index of the current element being processed in the array.
74
+ * - 'array': The array 'forEachRight' was called upon.
75
+ * @returns {T} Returns the original array.
76
+ *
77
+ * @example
78
+ * forEachRight([1, 2, 3], (value, index, array) => console.log(value, index));
79
+ * // Output:
80
+ * // 3 2
81
+ * // 2 1
82
+ * // 1 0
83
+ *
84
+ */
85
+ declare function forEachRight<T>(array: ArrayLike<T>, callback?: (value: T, index: number, array: ArrayLike<T>) => unknown): ArrayLike<T>;
86
+ /**
87
+ * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.
88
+ *
89
+ * @template T - The type of object.
90
+ * @param {T} object - The object to iterate over.
91
+ * @param {(value: T[keyof T], key: keyof T, object: T) => unknown} [callback] - The function invoked for each property.
92
+ * The callback function receives three arguments:
93
+ * - 'value': The current property being processed in the object.
94
+ * - 'key': The key of the current property being processed in the object.
95
+ * - 'object': The object 'forEachRight' was called upon.
96
+ * @returns {T} Returns the original object.
97
+ *
98
+ * @example
99
+ * forEachRight({'a': 1, 'b': 2 }, (value, key, object) => console.log(value, key));
100
+ * // Output:
101
+ * // 2 'b'
102
+ * // 1 'a'
103
+ */
104
+ declare function forEachRight<T extends object | null | undefined>(object: T, callback?: (value: T[keyof T], key: keyof T, object: T) => unknown): T;
105
+
106
+ export { forEachRight };
@@ -0,0 +1,21 @@
1
+ import { identity } from '../../function/identity.mjs';
2
+ import { range } from '../../math/range.mjs';
3
+ import { isArrayLike } from '../predicate/isArrayLike.mjs';
4
+
5
+ function forEachRight(collection, callback = identity) {
6
+ if (!collection) {
7
+ return collection;
8
+ }
9
+ const keys = isArrayLike(collection) ? range(0, collection.length) : Object.keys(collection);
10
+ for (let i = keys.length - 1; i >= 0; i--) {
11
+ const key = keys[i];
12
+ const value = collection[key];
13
+ const result = callback(value, key, collection);
14
+ if (result === false) {
15
+ break;
16
+ }
17
+ }
18
+ return collection;
19
+ }
20
+
21
+ export { forEachRight };
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Maps each element of an array based on a provided key-generating function.
3
+ *
4
+ * This function takes an array and a function that generates a key from each element. It returns
5
+ * an object where the keys are the generated keys and the values are the corresponding elements.
6
+ * If there are multiple elements generating the same key, the last element among them is used
7
+ * as the value.
8
+ *
9
+ * @template T - The type of elements in the array.
10
+ * @template K - The type of keys.
11
+ * @param {T[]} arr - The array of elements to be mapped.
12
+ * @param {(item: T) => K} getKeyFromItem - A function that generates a key from an element.
13
+ * @returns {Record<K, T>} An object where keys are mapped to each element of an array.
14
+ *
15
+ * @example
16
+ * const array = [
17
+ * { category: 'fruit', name: 'apple' },
18
+ * { category: 'fruit', name: 'banana' },
19
+ * { category: 'vegetable', name: 'carrot' }
20
+ * ];
21
+ * const result = keyBy(array, item => item.category);
22
+ * // result will be:
23
+ * // {
24
+ * // fruit: { category: 'fruit', name: 'banana' },
25
+ * // vegetable: { category: 'vegetable', name: 'carrot' }
26
+ * // }
27
+ */
28
+ declare function groupBy<T, K extends PropertyKey>(source: ArrayLike<T> | null | undefined, getKeyFromItem?: ((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey | null): Record<K, T[]>;
29
+ /**
30
+ * Groups the elements of an object based on a provided key-generating function.
31
+ *
32
+ * This function takes an object and a function that generates a key from each value. It returns
33
+ * an object where the keys are the generated keys and the values are arrays of elements that share
34
+ * the same key.
35
+ *
36
+ * @template T - The type of values in the object.
37
+ * @template K - The type of keys.
38
+ * @param {Record<any, T> | null | undefined} source - The object to group.
39
+ * @param {Function | PropertyKey | Array | Object} [getKeyFromItem] - The iteratee to transform keys.
40
+ * - If a function is provided, it's invoked for each element in the collection.
41
+ * - If a property name (string) is provided, that property of each element is used as the key.
42
+ * - If a property-value pair (array) is provided, elements with matching property values are used.
43
+ * - If a partial object is provided, elements with matching properties are used.
44
+ * @returns {Record<K, T>} An object where each key is associated with an array of elements that
45
+ * share that key.
46
+ *
47
+ * @example
48
+ * // Using an object
49
+ * const obj = { a: { category: 'fruit' }, b: { category: 'vegetable' }, c: { category: 'fruit' } };
50
+ * const result = groupBy(obj, 'category');
51
+ * // => { fruit: [{ category: 'fruit' }, { category: 'fruit' }], vegetable: [{ category: 'vegetable' }] }
52
+ */
53
+ declare function groupBy<T, K extends PropertyKey>(source: Record<any, T> | null | undefined, getKeyFromItem?: ((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey | null): Record<K, T[]>;
54
+
55
+ export { groupBy };
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Maps each element of an array based on a provided key-generating function.
3
+ *
4
+ * This function takes an array and a function that generates a key from each element. It returns
5
+ * an object where the keys are the generated keys and the values are the corresponding elements.
6
+ * If there are multiple elements generating the same key, the last element among them is used
7
+ * as the value.
8
+ *
9
+ * @template T - The type of elements in the array.
10
+ * @template K - The type of keys.
11
+ * @param {T[]} arr - The array of elements to be mapped.
12
+ * @param {(item: T) => K} getKeyFromItem - A function that generates a key from an element.
13
+ * @returns {Record<K, T>} An object where keys are mapped to each element of an array.
14
+ *
15
+ * @example
16
+ * const array = [
17
+ * { category: 'fruit', name: 'apple' },
18
+ * { category: 'fruit', name: 'banana' },
19
+ * { category: 'vegetable', name: 'carrot' }
20
+ * ];
21
+ * const result = keyBy(array, item => item.category);
22
+ * // result will be:
23
+ * // {
24
+ * // fruit: { category: 'fruit', name: 'banana' },
25
+ * // vegetable: { category: 'vegetable', name: 'carrot' }
26
+ * // }
27
+ */
28
+ declare function groupBy<T, K extends PropertyKey>(source: ArrayLike<T> | null | undefined, getKeyFromItem?: ((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey | null): Record<K, T[]>;
29
+ /**
30
+ * Groups the elements of an object based on a provided key-generating function.
31
+ *
32
+ * This function takes an object and a function that generates a key from each value. It returns
33
+ * an object where the keys are the generated keys and the values are arrays of elements that share
34
+ * the same key.
35
+ *
36
+ * @template T - The type of values in the object.
37
+ * @template K - The type of keys.
38
+ * @param {Record<any, T> | null | undefined} source - The object to group.
39
+ * @param {Function | PropertyKey | Array | Object} [getKeyFromItem] - The iteratee to transform keys.
40
+ * - If a function is provided, it's invoked for each element in the collection.
41
+ * - If a property name (string) is provided, that property of each element is used as the key.
42
+ * - If a property-value pair (array) is provided, elements with matching property values are used.
43
+ * - If a partial object is provided, elements with matching properties are used.
44
+ * @returns {Record<K, T>} An object where each key is associated with an array of elements that
45
+ * share that key.
46
+ *
47
+ * @example
48
+ * // Using an object
49
+ * const obj = { a: { category: 'fruit' }, b: { category: 'vegetable' }, c: { category: 'fruit' } };
50
+ * const result = groupBy(obj, 'category');
51
+ * // => { fruit: [{ category: 'fruit' }, { category: 'fruit' }], vegetable: [{ category: 'vegetable' }] }
52
+ */
53
+ declare function groupBy<T, K extends PropertyKey>(source: Record<any, T> | null | undefined, getKeyFromItem?: ((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey | null): Record<K, T[]>;
54
+
55
+ export { groupBy };
@@ -0,0 +1,15 @@
1
+ import { groupBy as groupBy$1 } from '../../array/groupBy.mjs';
2
+ import { identity } from '../../function/identity.mjs';
3
+ import { isArrayLike } from '../predicate/isArrayLike.mjs';
4
+ import { iteratee } from '../util/iteratee.mjs';
5
+
6
+ function groupBy(source, _getKeyFromItem) {
7
+ if (source == null) {
8
+ return {};
9
+ }
10
+ const items = isArrayLike(source) ? Array.from(source) : Object.values(source);
11
+ const getKeyFromItem = iteratee(_getKeyFromItem ?? identity);
12
+ return groupBy$1(items, getKeyFromItem);
13
+ }
14
+
15
+ export { groupBy };
@@ -2,8 +2,6 @@ export { at } from '../array/at.mjs';
2
2
  export { countBy } from '../array/countBy.mjs';
3
3
  export { flatMap } from '../array/flatMap.mjs';
4
4
  export { flatMapDeep } from '../array/flatMapDeep.mjs';
5
- export { forEachRight } from '../array/forEachRight.mjs';
6
- export { groupBy } from '../array/groupBy.mjs';
7
5
  export { initial } from '../array/initial.mjs';
8
6
  export { isSubset } from '../array/isSubset.mjs';
9
7
  export { isSubsetWith } from '../array/isSubsetWith.mjs';
@@ -86,6 +84,8 @@ export { flatten } from './array/flatten.mjs';
86
84
  export { flattenDeep } from './array/flattenDeep.mjs';
87
85
  export { flattenDepth } from './array/flattenDepth.mjs';
88
86
  export { forEach as each, forEach } from './array/forEach.mjs';
87
+ export { forEachRight as eachRight, forEachRight } from './array/forEachRight.mjs';
88
+ export { groupBy } from './array/groupBy.mjs';
89
89
  export { head as first, head } from './array/head.mjs';
90
90
  export { includes } from './array/includes.mjs';
91
91
  export { indexOf } from './array/indexOf.mjs';
@@ -2,8 +2,6 @@ export { at } from '../array/at.js';
2
2
  export { countBy } from '../array/countBy.js';
3
3
  export { flatMap } from '../array/flatMap.js';
4
4
  export { flatMapDeep } from '../array/flatMapDeep.js';
5
- export { forEachRight } from '../array/forEachRight.js';
6
- export { groupBy } from '../array/groupBy.js';
7
5
  export { initial } from '../array/initial.js';
8
6
  export { isSubset } from '../array/isSubset.js';
9
7
  export { isSubsetWith } from '../array/isSubsetWith.js';
@@ -86,6 +84,8 @@ export { flatten } from './array/flatten.js';
86
84
  export { flattenDeep } from './array/flattenDeep.js';
87
85
  export { flattenDepth } from './array/flattenDepth.js';
88
86
  export { forEach as each, forEach } from './array/forEach.js';
87
+ export { forEachRight as eachRight, forEachRight } from './array/forEachRight.js';
88
+ export { groupBy } from './array/groupBy.js';
89
89
  export { head as first, head } from './array/head.js';
90
90
  export { includes } from './array/includes.js';
91
91
  export { indexOf } from './array/indexOf.js';
@@ -2,8 +2,6 @@ export { at } from '../array/at.mjs';
2
2
  export { countBy } from '../array/countBy.mjs';
3
3
  export { flatMap } from '../array/flatMap.mjs';
4
4
  export { flatMapDeep } from '../array/flatMapDeep.mjs';
5
- export { forEachRight } from '../array/forEachRight.mjs';
6
- export { groupBy } from '../array/groupBy.mjs';
7
5
  export { initial } from '../array/initial.mjs';
8
6
  export { isSubset } from '../array/isSubset.mjs';
9
7
  export { isSubsetWith } from '../array/isSubsetWith.mjs';
@@ -91,6 +89,8 @@ export { flatten } from './array/flatten.mjs';
91
89
  export { flattenDeep } from './array/flattenDeep.mjs';
92
90
  export { flattenDepth } from './array/flattenDepth.mjs';
93
91
  export { forEach as each, forEach } from './array/forEach.mjs';
92
+ export { forEachRight as eachRight, forEachRight } from './array/forEachRight.mjs';
93
+ export { groupBy } from './array/groupBy.mjs';
94
94
  export { head as first, head } from './array/head.mjs';
95
95
  export { includes } from './array/includes.mjs';
96
96
  export { indexOf } from './array/indexOf.mjs';
@@ -2,8 +2,6 @@ export { at } from '../array/at.mjs';
2
2
  export { countBy } from '../array/countBy.mjs';
3
3
  export { flatMap } from '../array/flatMap.mjs';
4
4
  export { flatMapDeep } from '../array/flatMapDeep.mjs';
5
- export { forEachRight } from '../array/forEachRight.mjs';
6
- export { groupBy } from '../array/groupBy.mjs';
7
5
  export { initial } from '../array/initial.mjs';
8
6
  export { isSubset } from '../array/isSubset.mjs';
9
7
  export { isSubsetWith } from '../array/isSubsetWith.mjs';
@@ -86,6 +84,8 @@ export { flatten } from './array/flatten.mjs';
86
84
  export { flattenDeep } from './array/flattenDeep.mjs';
87
85
  export { flattenDepth } from './array/flattenDepth.mjs';
88
86
  export { forEach as each, forEach } from './array/forEach.mjs';
87
+ export { forEachRight as eachRight, forEachRight } from './array/forEachRight.mjs';
88
+ export { groupBy } from './array/groupBy.mjs';
89
89
  export { head as first, head } from './array/head.mjs';
90
90
  export { includes } from './array/includes.mjs';
91
91
  export { indexOf } from './array/indexOf.mjs';
@@ -2,8 +2,6 @@ export { at } from '../array/at.js';
2
2
  export { countBy } from '../array/countBy.js';
3
3
  export { flatMap } from '../array/flatMap.js';
4
4
  export { flatMapDeep } from '../array/flatMapDeep.js';
5
- export { forEachRight } from '../array/forEachRight.js';
6
- export { groupBy } from '../array/groupBy.js';
7
5
  export { initial } from '../array/initial.js';
8
6
  export { isSubset } from '../array/isSubset.js';
9
7
  export { isSubsetWith } from '../array/isSubsetWith.js';
@@ -86,6 +84,8 @@ export { flatten } from './array/flatten.js';
86
84
  export { flattenDeep } from './array/flattenDeep.js';
87
85
  export { flattenDepth } from './array/flattenDepth.js';
88
86
  export { forEach as each, forEach } from './array/forEach.js';
87
+ export { forEachRight as eachRight, forEachRight } from './array/forEachRight.js';
88
+ export { groupBy } from './array/groupBy.js';
89
89
  export { head as first, head } from './array/head.js';
90
90
  export { includes } from './array/includes.js';
91
91
  export { indexOf } from './array/indexOf.js';
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
- const zipWith = require('../_chunk/zipWith-CsbMsR.js');
5
+ const zipWith = require('../_chunk/zipWith-Bt0YQl.js');
6
6
  const AbortError = require('../_chunk/AbortError-Cg4ZQ1.js');
7
7
  const error_index = require('../error/index.js');
8
8
  const unary = require('../_chunk/unary-EIEhcF.js');
9
9
  const noop = require('../_chunk/noop-2IwLUk.js');
10
10
  const range = require('../_chunk/range-HnEIT7.js');
11
11
  const randomInt = require('../_chunk/randomInt-CF7bZK.js');
12
- const compat_index = require('../_chunk/toSnakeCaseKeys-Bvb9j3.js');
12
+ const compat_index = require('../_chunk/toSnakeCaseKeys-DTk_p5.js');
13
13
  const isPromise = require('../_chunk/isPromise-BqEEYJ.js');
14
14
  const promise_index = require('../promise/index.js');
15
15
  const reverseString = require('../_chunk/reverseString-BixeGz.js');
@@ -21,8 +21,6 @@ exports.at = zipWith.at;
21
21
  exports.countBy = zipWith.countBy;
22
22
  exports.flatMap = zipWith.flatMap;
23
23
  exports.flatMapDeep = zipWith.flatMapDeep;
24
- exports.forEachRight = zipWith.forEachRight;
25
- exports.groupBy = zipWith.groupBy;
26
24
  exports.initial = zipWith.initial;
27
25
  exports.isSubset = zipWith.isSubset;
28
26
  exports.isSubsetWith = zipWith.isSubsetWith;
@@ -99,6 +97,7 @@ exports.dropRight = compat_index.dropRight;
99
97
  exports.dropRightWhile = compat_index.dropRightWhile;
100
98
  exports.dropWhile = compat_index.dropWhile;
101
99
  exports.each = compat_index.forEach;
100
+ exports.eachRight = compat_index.forEachRight;
102
101
  exports.endsWith = compat_index.endsWith;
103
102
  exports.escape = compat_index.escape;
104
103
  exports.escapeRegExp = compat_index.escapeRegExp;
@@ -122,10 +121,12 @@ exports.floor = compat_index.floor;
122
121
  exports.flow = compat_index.flow;
123
122
  exports.flowRight = compat_index.flowRight;
124
123
  exports.forEach = compat_index.forEach;
124
+ exports.forEachRight = compat_index.forEachRight;
125
125
  exports.fromPairs = compat_index.fromPairs;
126
126
  exports.functions = compat_index.functions;
127
127
  exports.functionsIn = compat_index.functionsIn;
128
128
  exports.get = compat_index.get;
129
+ exports.groupBy = compat_index.groupBy;
129
130
  exports.gt = compat_index.gt;
130
131
  exports.gte = compat_index.gte;
131
132
  exports.has = compat_index.has;
@@ -2,8 +2,6 @@ export { at } from '../array/at.mjs';
2
2
  export { countBy } from '../array/countBy.mjs';
3
3
  export { flatMap } from '../array/flatMap.mjs';
4
4
  export { flatMapDeep } from '../array/flatMapDeep.mjs';
5
- export { forEachRight } from '../array/forEachRight.mjs';
6
- export { groupBy } from '../array/groupBy.mjs';
7
5
  export { initial } from '../array/initial.mjs';
8
6
  export { isSubset } from '../array/isSubset.mjs';
9
7
  export { isSubsetWith } from '../array/isSubsetWith.mjs';
@@ -91,6 +89,8 @@ export { flatten } from './array/flatten.mjs';
91
89
  export { flattenDeep } from './array/flattenDeep.mjs';
92
90
  export { flattenDepth } from './array/flattenDepth.mjs';
93
91
  export { forEach as each, forEach } from './array/forEach.mjs';
92
+ export { forEachRight as eachRight, forEachRight } from './array/forEachRight.mjs';
93
+ export { groupBy } from './array/groupBy.mjs';
94
94
  export { head as first, head } from './array/head.mjs';
95
95
  export { includes } from './array/includes.mjs';
96
96
  export { indexOf } from './array/indexOf.mjs';
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const zipWith = require('./_chunk/zipWith-CsbMsR.js');
5
+ const zipWith = require('./_chunk/zipWith-Bt0YQl.js');
6
6
  const array_index = require('./array/index.js');
7
7
  const AbortError = require('./_chunk/AbortError-Cg4ZQ1.js');
8
8
  const error_index = require('./error/index.js');
@@ -12,7 +12,7 @@ const noop = require('./_chunk/noop-2IwLUk.js');
12
12
  const range = require('./_chunk/range-HnEIT7.js');
13
13
  const randomInt = require('./_chunk/randomInt-CF7bZK.js');
14
14
  const math_index = require('./math/index.js');
15
- const compat_index = require('./_chunk/toSnakeCaseKeys-Bvb9j3.js');
15
+ const compat_index = require('./_chunk/toSnakeCaseKeys-DTk_p5.js');
16
16
  const object_index = require('./object/index.js');
17
17
  const isPromise = require('./_chunk/isPromise-BqEEYJ.js');
18
18
  const predicate_index = require('./predicate/index.js');
@@ -41,7 +41,6 @@ exports.flatMap = zipWith.flatMap;
41
41
  exports.flatMapDeep = zipWith.flatMapDeep;
42
42
  exports.flatten = zipWith.flatten;
43
43
  exports.flattenDeep = zipWith.flattenDeep;
44
- exports.forEachRight = zipWith.forEachRight;
45
44
  exports.groupBy = zipWith.groupBy;
46
45
  exports.head = zipWith.head;
47
46
  exports.initial = zipWith.initial;
@@ -81,6 +80,7 @@ exports.xorWith = zipWith.xorWith;
81
80
  exports.zip = zipWith.zip;
82
81
  exports.zipObject = zipWith.zipObject;
83
82
  exports.zipWith = zipWith.zipWith;
83
+ exports.forEachRight = array_index.forEachRight;
84
84
  exports.orderBy = array_index.orderBy;
85
85
  exports.sortBy = array_index.sortBy;
86
86
  exports.takeRightWhile = array_index.takeRightWhile;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const compat_index = require('../_chunk/toSnakeCaseKeys-Bvb9j3.js');
5
+ const compat_index = require('../_chunk/toSnakeCaseKeys-DTk_p5.js');
6
6
 
7
7
  function mergeWith(target, source, merge) {
8
8
  const sourceKeys = Object.keys(source);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "es-toolkit",
3
3
  "description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
4
- "version": "1.35.0-dev.1209+d7d8f2c6",
4
+ "version": "1.35.0-dev.1212+0b738ff3",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {