@gooddata/util 11.68.0-alpha.8 → 11.68.0-alpha.9

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.
Files changed (149) hide show
  1. package/NOTICE +2 -2
  2. package/esm/_/_baseClone.d.ts +17 -4
  3. package/esm/_/_baseClone.d.ts.map +1 -1
  4. package/esm/_/_baseClone.js +55 -23
  5. package/esm/_/_baseDifference.d.ts +7 -4
  6. package/esm/_/_baseDifference.d.ts.map +1 -1
  7. package/esm/_/_baseDifference.js +18 -7
  8. package/esm/_/_baseExtremum.d.ts +15 -0
  9. package/esm/_/_baseExtremum.d.ts.map +1 -0
  10. package/esm/_/_baseExtremum.js +64 -0
  11. package/esm/_/_baseIntersection.d.ts +19 -0
  12. package/esm/_/_baseIntersection.d.ts.map +1 -0
  13. package/esm/_/_baseIntersection.js +91 -0
  14. package/esm/_/_baseMerge.d.ts +7 -3
  15. package/esm/_/_baseMerge.d.ts.map +1 -1
  16. package/esm/_/_baseMerge.js +20 -11
  17. package/esm/_/_baseSet.d.ts +3 -1
  18. package/esm/_/_baseSet.d.ts.map +1 -1
  19. package/esm/_/_baseSet.js +9 -3
  20. package/esm/_/_baseSlice.d.ts +45 -0
  21. package/esm/_/_baseSlice.d.ts.map +1 -0
  22. package/esm/_/_baseSlice.js +30 -0
  23. package/esm/_/_baseSum.d.ts +42 -0
  24. package/esm/_/_baseSum.d.ts.map +1 -0
  25. package/esm/_/_baseSum.js +21 -0
  26. package/esm/_/_cloneTypedArray.d.ts +1 -1
  27. package/esm/_/_cloneTypedArray.d.ts.map +1 -1
  28. package/esm/_/_cloneTypedArray.js +3 -2
  29. package/esm/_/_flattenArrayLikeObjects.d.ts +11 -0
  30. package/esm/_/_flattenArrayLikeObjects.d.ts.map +1 -0
  31. package/esm/_/_flattenArrayLikeObjects.js +55 -0
  32. package/esm/_/assignIn.d.ts +35 -0
  33. package/esm/_/assignIn.d.ts.map +1 -0
  34. package/esm/_/assignIn.js +50 -0
  35. package/esm/_/bindAll.d.ts +16 -0
  36. package/esm/_/bindAll.d.ts.map +1 -0
  37. package/esm/_/bindAll.js +88 -0
  38. package/esm/_/chunk.d.ts +15 -0
  39. package/esm/_/chunk.d.ts.map +1 -0
  40. package/esm/_/chunk.js +61 -0
  41. package/esm/_/clone.d.ts +12 -0
  42. package/esm/_/clone.d.ts.map +1 -0
  43. package/esm/_/clone.js +45 -0
  44. package/esm/_/cloneDeep.js +1 -1
  45. package/esm/_/cloneDeepWith.d.ts +18 -0
  46. package/esm/_/cloneDeepWith.d.ts.map +1 -0
  47. package/esm/_/cloneDeepWith.js +36 -0
  48. package/esm/_/constant.d.ts +39 -0
  49. package/esm/_/constant.d.ts.map +1 -0
  50. package/esm/_/constant.js +43 -0
  51. package/esm/_/defaults.d.ts +36 -0
  52. package/esm/_/defaults.d.ts.map +1 -0
  53. package/esm/_/defaults.js +51 -0
  54. package/esm/_/differenceWith.d.ts +27 -0
  55. package/esm/_/differenceWith.d.ts.map +1 -0
  56. package/esm/_/differenceWith.js +39 -0
  57. package/esm/_/dropRightWhile.d.ts +13 -0
  58. package/esm/_/dropRightWhile.d.ts.map +1 -0
  59. package/esm/_/dropRightWhile.js +54 -0
  60. package/esm/_/escapeRegExp.d.ts +12 -0
  61. package/esm/_/escapeRegExp.d.ts.map +1 -0
  62. package/esm/_/escapeRegExp.js +47 -0
  63. package/esm/_/findKey.d.ts +14 -0
  64. package/esm/_/findKey.d.ts.map +1 -0
  65. package/esm/_/findKey.js +58 -0
  66. package/esm/_/findLastIndex.d.ts +16 -0
  67. package/esm/_/findLastIndex.d.ts.map +1 -0
  68. package/esm/_/findLastIndex.js +67 -0
  69. package/esm/_/get.d.ts +78 -0
  70. package/esm/_/get.d.ts.map +1 -0
  71. package/esm/_/get.js +36 -0
  72. package/esm/_/inRange.d.ts +14 -0
  73. package/esm/_/inRange.d.ts.map +1 -0
  74. package/esm/_/inRange.js +51 -0
  75. package/esm/_/initial.d.ts +11 -0
  76. package/esm/_/initial.d.ts.map +1 -0
  77. package/esm/_/initial.js +44 -0
  78. package/esm/_/intersection.d.ts +13 -0
  79. package/esm/_/intersection.d.ts.map +1 -0
  80. package/esm/_/intersection.js +45 -0
  81. package/esm/_/intersectionBy.d.ts +32 -0
  82. package/esm/_/intersectionBy.d.ts.map +1 -0
  83. package/esm/_/intersectionBy.js +41 -0
  84. package/esm/_/intersectionWith.d.ts +28 -0
  85. package/esm/_/intersectionWith.d.ts.map +1 -0
  86. package/esm/_/intersectionWith.js +38 -0
  87. package/esm/_/invert.d.ts +14 -0
  88. package/esm/_/invert.d.ts.map +1 -0
  89. package/esm/_/invert.js +55 -0
  90. package/esm/_/isError.d.ts +11 -0
  91. package/esm/_/isError.d.ts.map +1 -0
  92. package/esm/_/isError.js +57 -0
  93. package/esm/_/keys.d.ts +11 -0
  94. package/esm/_/keys.d.ts.map +1 -0
  95. package/esm/_/keys.js +60 -0
  96. package/esm/_/mapValues.d.ts +63 -0
  97. package/esm/_/mapValues.d.ts.map +1 -0
  98. package/esm/_/mapValues.js +47 -0
  99. package/esm/_/max.d.ts +16 -0
  100. package/esm/_/max.d.ts.map +1 -0
  101. package/esm/_/max.js +37 -0
  102. package/esm/_/mergeWith.d.ts +34 -0
  103. package/esm/_/mergeWith.d.ts.map +1 -0
  104. package/esm/_/mergeWith.js +50 -0
  105. package/esm/_/min.d.ts +16 -0
  106. package/esm/_/min.d.ts.map +1 -0
  107. package/esm/_/min.js +37 -0
  108. package/esm/_/negate.d.ts +41 -0
  109. package/esm/_/negate.d.ts.map +1 -0
  110. package/esm/_/negate.js +48 -0
  111. package/esm/_/reduce.d.ts +37 -0
  112. package/esm/_/reduce.d.ts.map +1 -0
  113. package/esm/_/reduce.js +48 -0
  114. package/esm/_/sumBy.d.ts +14 -0
  115. package/esm/_/sumBy.d.ts.map +1 -0
  116. package/esm/_/sumBy.js +47 -0
  117. package/esm/_/tail.d.ts +15 -0
  118. package/esm/_/tail.d.ts.map +1 -0
  119. package/esm/_/tail.js +36 -0
  120. package/esm/_/times.d.ts +17 -0
  121. package/esm/_/times.d.ts.map +1 -0
  122. package/esm/_/times.js +57 -0
  123. package/esm/_/toFinite.d.ts +0 -30
  124. package/esm/_/toFinite.d.ts.map +1 -1
  125. package/esm/_/toFinite.js +2 -2
  126. package/esm/_/toInteger.d.ts +11 -0
  127. package/esm/_/toInteger.d.ts.map +1 -0
  128. package/esm/_/toInteger.js +46 -0
  129. package/esm/_/types.d.ts +47 -0
  130. package/esm/_/types.d.ts.map +1 -1
  131. package/esm/_/unescape.d.ts +13 -0
  132. package/esm/_/unescape.d.ts.map +1 -0
  133. package/esm/_/unescape.js +56 -0
  134. package/esm/_/union.d.ts.map +1 -1
  135. package/esm/_/union.js +2 -13
  136. package/esm/_/unionBy.d.ts +34 -0
  137. package/esm/_/unionBy.d.ts.map +1 -0
  138. package/esm/_/unionBy.js +42 -0
  139. package/esm/_/updateWith.d.ts +23 -0
  140. package/esm/_/updateWith.d.ts.map +1 -0
  141. package/esm/_/updateWith.js +41 -0
  142. package/esm/_/without.d.ts +15 -0
  143. package/esm/_/without.d.ts.map +1 -0
  144. package/esm/_/without.js +47 -0
  145. package/esm/index.d.ts +37 -3
  146. package/esm/index.d.ts.map +1 -1
  147. package/esm/index.js +36 -2
  148. package/esm/util.d.ts +857 -18
  149. package/package.json +3 -3
package/esm/_/keys.js ADDED
@@ -0,0 +1,60 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /*!
3
+ * Portions of this file are derived from Lodash.
4
+ * https://github.com/lodash/lodash
5
+ *
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ *
8
+ * Based on Underscore.js, copyright Jeremy Ashkenas,
9
+ * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
10
+ *
11
+ * Modifications Copyright (c) 2026 GoodData Corporation
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining
14
+ * a copy of this software and associated documentation files (the
15
+ * "Software"), to deal in the Software without restriction, including
16
+ * without limitation the rights to use, copy, modify, merge, publish,
17
+ * distribute, sublicense, and/or sell copies of the Software, and to
18
+ * permit persons to whom the Software is furnished to do so, subject to
19
+ * the following conditions:
20
+ *
21
+ * The above copyright notice and this permission notice shall be
22
+ * included in all copies or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ */
32
+ import { _baseKeys } from "./_baseKeys.js";
33
+ import { _isIndex } from "./_isIndex.js";
34
+ import { _isArguments } from "./isArguments.js";
35
+ import { _isArrayLike } from "./isArrayLike.js";
36
+ import { _isTypedArray } from "./isTypedArray.js";
37
+ /**
38
+ * Creates an array of the own enumerable string keys of `object`. Arrays, arguments objects and typed arrays
39
+ * list every index first, holes included, followed by their other own keys; other array-likes, strings
40
+ * included, list their own keys as they are. Non-object values are coerced to objects.
41
+ *
42
+ * @param object - The object to query.
43
+ * @returns Returns the array of property names.
44
+ * @internal
45
+ */
46
+ export function _keys(object) {
47
+ if (!_isArrayLike(object)) {
48
+ return _baseKeys(object);
49
+ }
50
+ const value = Object(object);
51
+ const indexed = Array.isArray(value) || _isArguments(value) || _isTypedArray(value);
52
+ const length = indexed ? value.length : 0;
53
+ const result = Array.from({ length }, (_, index) => String(index));
54
+ for (const key of Object.keys(value)) {
55
+ if (!(indexed && (key === "length" || _isIndex(key, length)))) {
56
+ result.push(key);
57
+ }
58
+ }
59
+ return result;
60
+ }
@@ -0,0 +1,63 @@
1
+ import type { _ArrayIterator, _Dictionary, _NumericDictionary, _ObjectIterator, _PartialObject, _StringIterator } from "./types.js";
2
+ /**
3
+ * Creates an object with the same keys as `object` and values generated by running each own enumerable
4
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked with three arguments:
5
+ * (value, key, object). Arrays, strings and other array-likes are mapped by index.
6
+ *
7
+ * @param object - The object to iterate over.
8
+ * @param iteratee - The function invoked per iteration, or an iteratee shorthand. Defaults to identity.
9
+ * @returns Returns the new mapped object.
10
+ * @internal
11
+ */
12
+ export declare function _mapValues<TResult>(obj: string | null | undefined, callback: _StringIterator<TResult>): _NumericDictionary<TResult>;
13
+ /**
14
+ * @internal
15
+ */
16
+ export declare function _mapValues<T, TResult>(array: T[], callback: _ArrayIterator<T, TResult>): _NumericDictionary<TResult>;
17
+ /**
18
+ * @internal
19
+ */
20
+ export declare function _mapValues<T extends object, TResult>(obj: T | null | undefined, callback: _ObjectIterator<T, TResult>): {
21
+ [P in keyof T]: TResult;
22
+ };
23
+ /**
24
+ * @internal
25
+ */
26
+ export declare function _mapValues<T>(obj: _Dictionary<T> | _NumericDictionary<T> | null | undefined, iteratee: object): _Dictionary<boolean>;
27
+ /**
28
+ * @internal
29
+ */
30
+ export declare function _mapValues<T extends object>(obj: T | null | undefined, iteratee: object): {
31
+ [P in keyof T]: boolean;
32
+ };
33
+ /**
34
+ * @internal
35
+ */
36
+ export declare function _mapValues<T, TKey extends keyof T>(obj: _Dictionary<T> | _NumericDictionary<T> | null | undefined, iteratee: TKey): _Dictionary<T[TKey]>;
37
+ /**
38
+ * @internal
39
+ */
40
+ export declare function _mapValues<T>(obj: _Dictionary<T> | _NumericDictionary<T> | null | undefined, iteratee: string): _Dictionary<any>;
41
+ /**
42
+ * @internal
43
+ */
44
+ export declare function _mapValues<T extends object>(obj: T | null | undefined, iteratee: string): {
45
+ [P in keyof T]: any;
46
+ };
47
+ /**
48
+ * @internal
49
+ */
50
+ export declare function _mapValues(obj: string | null | undefined): _NumericDictionary<string>;
51
+ /**
52
+ * @internal
53
+ */
54
+ export declare function _mapValues<T>(obj: _Dictionary<T> | _NumericDictionary<T> | null | undefined): _Dictionary<T>;
55
+ /**
56
+ * @internal
57
+ */
58
+ export declare function _mapValues<T extends object>(obj: T): T;
59
+ /**
60
+ * @internal
61
+ */
62
+ export declare function _mapValues<T extends object>(obj: T | null | undefined): _PartialObject<T>;
63
+ //# sourceMappingURL=mapValues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapValues.d.ts","sourceRoot":"","sources":["../../src/_/mapValues.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EACR,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,eAAe,EAClB,MAAM,YAAY,CAAC;AAIpB;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC,GACnC,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAC/B;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,EACjC,KAAK,EAAE,CAAC,EAAE,EACV,QAAQ,EAAE,cAAc,CAAC,CAAC,EAAE,OAAO,CAAC,GACrC,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAC/B;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAChD,GAAG,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EACzB,QAAQ,EAAE,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,GACtC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,OAAO;CAAE,CAAC;AAC/B;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EACxB,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAC9D,QAAQ,EAAE,MAAM,GACjB,WAAW,CAAC,OAAO,CAAC,CAAC;AACxB;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EACvC,GAAG,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EACzB,QAAQ,EAAE,MAAM,GACjB;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,OAAO;CAAE,CAAC;AAC/B;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,SAAS,MAAM,CAAC,EAC9C,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAC9D,QAAQ,EAAE,IAAI,GACf,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EACxB,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAC9D,QAAQ,EAAE,MAAM,GAEjB,WAAW,CAAC,GAAG,CAAC,CAAC;AACpB;;GAEG;AAEH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EACvC,GAAG,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EACzB,QAAQ,EAAE,MAAM,GACjB;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG;CAAE,CAAC;AAC3B;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACvF;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAC9G;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;AACxD;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,47 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /*!
3
+ * Portions of this file are derived from Lodash.
4
+ * https://github.com/lodash/lodash
5
+ *
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ *
8
+ * Based on Underscore.js, copyright Jeremy Ashkenas,
9
+ * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
10
+ *
11
+ * Modifications Copyright (c) 2026 GoodData Corporation
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining
14
+ * a copy of this software and associated documentation files (the
15
+ * "Software"), to deal in the Software without restriction, including
16
+ * without limitation the rights to use, copy, modify, merge, publish,
17
+ * distribute, sublicense, and/or sell copies of the Software, and to
18
+ * permit persons to whom the Software is furnished to do so, subject to
19
+ * the following conditions:
20
+ *
21
+ * The above copyright notice and this permission notice shall be
22
+ * included in all copies or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ */
32
+ import { _baseAssignValue } from "./_baseAssignValue.js";
33
+ import { _baseIteratee } from "./_baseIteratee.js";
34
+ import { _keys } from "./keys.js";
35
+ export function _mapValues(object, iteratee) {
36
+ const result = {};
37
+ if (object == null) {
38
+ return result;
39
+ }
40
+ const transform = _baseIteratee(iteratee);
41
+ const source = Object(object);
42
+ for (const key of _keys(source)) {
43
+ // defines a `__proto__` key as an own property instead of changing the prototype
44
+ _baseAssignValue(result, key, transform(source[key], key, source));
45
+ }
46
+ return result;
47
+ }
package/esm/_/max.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { _List } from "./types.js";
2
+ /**
3
+ * Computes the maximum value of `array` using the `>` operator, so mixed values coerce the way the operator
4
+ * does. Nullish, `NaN` and symbol elements are skipped. If `array` is empty or falsey, `undefined` is
5
+ * returned.
6
+ *
7
+ * @param array - The array to iterate over.
8
+ * @returns Returns the maximum value.
9
+ * @internal
10
+ */
11
+ export declare function _max<T>(array: readonly [T, ...T[]]): T;
12
+ /**
13
+ * @internal
14
+ */
15
+ export declare function _max<T>(array: _List<T> | null | undefined): T | undefined;
16
+ //# sourceMappingURL=max.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"max.d.ts","sourceRoot":"","sources":["../../src/_/max.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAKxC;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACxD;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAAC"}
package/esm/_/max.js ADDED
@@ -0,0 +1,37 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /*!
3
+ * Portions of this file are derived from Lodash.
4
+ * https://github.com/lodash/lodash
5
+ *
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ *
8
+ * Based on Underscore.js, copyright Jeremy Ashkenas,
9
+ * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
10
+ *
11
+ * Modifications Copyright (c) 2026 GoodData Corporation
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining
14
+ * a copy of this software and associated documentation files (the
15
+ * "Software"), to deal in the Software without restriction, including
16
+ * without limitation the rights to use, copy, modify, merge, publish,
17
+ * distribute, sublicense, and/or sell copies of the Software, and to
18
+ * permit persons to whom the Software is furnished to do so, subject to
19
+ * the following conditions:
20
+ *
21
+ * The above copyright notice and this permission notice shall be
22
+ * included in all copies or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ */
32
+ import { _baseExtremum } from "./_baseExtremum.js";
33
+ // oxlint-disable-next-line @typescript-eslint/no-explicit-any -- the `>` operator is applied to arbitrary values, as in lodash
34
+ const isGreater = (value, other) => value > other;
35
+ export function _max(array) {
36
+ return array?.length ? _baseExtremum(array, (value) => value, isGreater) : undefined;
37
+ }
@@ -0,0 +1,34 @@
1
+ import type { _MergeWithCustomizer } from "./types.js";
2
+ /**
3
+ * This method is like `_merge` except that it accepts `customizer` which is invoked to produce the merged
4
+ * values of the destination and source properties. If `customizer` returns `undefined`, merging is handled
5
+ * by the method instead. The `customizer` is invoked with six arguments: (objValue, srcValue, key, object,
6
+ * source, stack). It is taken from the last argument when that is a function preceded by at least one
7
+ * source.
8
+ *
9
+ * **Note:** This method mutates `object`.
10
+ *
11
+ * @param object - The destination object.
12
+ * @param source - The source object.
13
+ * @param customizer - The function to customize assigned values.
14
+ * @returns Returns `object`.
15
+ * @internal
16
+ */
17
+ export declare function _mergeWith<TObject, TSource>(object: TObject, source: TSource, customizer: _MergeWithCustomizer): TObject & TSource;
18
+ /**
19
+ * @internal
20
+ */
21
+ export declare function _mergeWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: _MergeWithCustomizer): TObject & TSource1 & TSource2;
22
+ /**
23
+ * @internal
24
+ */
25
+ export declare function _mergeWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: _MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3;
26
+ /**
27
+ * @internal
28
+ */
29
+ export declare function _mergeWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: _MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
30
+ /**
31
+ * @internal
32
+ */
33
+ export declare function _mergeWith(object: any, ...otherArgs: any[]): any;
34
+ //# sourceMappingURL=mergeWith.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeWith.d.ts","sourceRoot":"","sources":["../../src/_/mergeWith.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAIvD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EACvC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,oBAAoB,GACjC,OAAO,GAAG,OAAO,CAAC;AACrB;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAClD,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,UAAU,EAAE,oBAAoB,GACjC,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACjC;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAC5D,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,UAAU,EAAE,oBAAoB,GACjC,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC5C;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EACtE,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,UAAU,EAAE,oBAAoB,GACjC,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACvD;;GAEG;AAEH,wBAAgB,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC"}
@@ -0,0 +1,50 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /*!
3
+ * Portions of this file are derived from Lodash.
4
+ * https://github.com/lodash/lodash
5
+ *
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ *
8
+ * Based on Underscore.js, copyright Jeremy Ashkenas,
9
+ * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
10
+ *
11
+ * Modifications Copyright (c) 2026 GoodData Corporation
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining
14
+ * a copy of this software and associated documentation files (the
15
+ * "Software"), to deal in the Software without restriction, including
16
+ * without limitation the rights to use, copy, modify, merge, publish,
17
+ * distribute, sublicense, and/or sell copies of the Software, and to
18
+ * permit persons to whom the Software is furnished to do so, subject to
19
+ * the following conditions:
20
+ *
21
+ * The above copyright notice and this permission notice shall be
22
+ * included in all copies or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ */
32
+ import { _baseMerge } from "./_baseMerge.js";
33
+ import { _isIterateeCall } from "./_isIterateeCall.js";
34
+ export function _mergeWith(object, ...args) {
35
+ const target = Object(object);
36
+ const last = args[args.length - 1];
37
+ const customizer = args.length > 1 && typeof last === "function" ? last : undefined;
38
+ let length = customizer ? args.length - 1 : args.length;
39
+ // when called as an iteratee, e.g. by `reduce`, only the value is a source, not the index and collection
40
+ if (args.length > 2 && _isIterateeCall(args[0], args[1], args[2])) {
41
+ length = 1;
42
+ }
43
+ for (let index = 0; index < length; index++) {
44
+ const source = args[index];
45
+ if (source) {
46
+ _baseMerge(target, Object(source), new Map(), customizer);
47
+ }
48
+ }
49
+ return target;
50
+ }
package/esm/_/min.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { _List } from "./types.js";
2
+ /**
3
+ * Computes the minimum value of `array` using the `<` operator, so mixed values coerce the way the operator
4
+ * does. Nullish, `NaN` and symbol elements are skipped. If `array` is empty or falsey, `undefined` is
5
+ * returned.
6
+ *
7
+ * @param array - The array to iterate over.
8
+ * @returns Returns the minimum value.
9
+ * @internal
10
+ */
11
+ export declare function _min<T>(array: readonly [T, ...T[]]): T;
12
+ /**
13
+ * @internal
14
+ */
15
+ export declare function _min<T>(array: _List<T> | null | undefined): T | undefined;
16
+ //# sourceMappingURL=min.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"min.d.ts","sourceRoot":"","sources":["../../src/_/min.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAKxC;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACxD;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAAC"}
package/esm/_/min.js ADDED
@@ -0,0 +1,37 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /*!
3
+ * Portions of this file are derived from Lodash.
4
+ * https://github.com/lodash/lodash
5
+ *
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ *
8
+ * Based on Underscore.js, copyright Jeremy Ashkenas,
9
+ * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
10
+ *
11
+ * Modifications Copyright (c) 2026 GoodData Corporation
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining
14
+ * a copy of this software and associated documentation files (the
15
+ * "Software"), to deal in the Software without restriction, including
16
+ * without limitation the rights to use, copy, modify, merge, publish,
17
+ * distribute, sublicense, and/or sell copies of the Software, and to
18
+ * permit persons to whom the Software is furnished to do so, subject to
19
+ * the following conditions:
20
+ *
21
+ * The above copyright notice and this permission notice shall be
22
+ * included in all copies or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ */
32
+ import { _baseExtremum } from "./_baseExtremum.js";
33
+ // oxlint-disable-next-line @typescript-eslint/no-explicit-any -- `<` takes arbitrary values, as in lodash
34
+ const isLess = (value, other) => value < other;
35
+ export function _min(array) {
36
+ return array?.length ? _baseExtremum(array, (value) => value, isLess) : undefined;
37
+ }
@@ -0,0 +1,41 @@
1
+ /*!
2
+ * Portions of this file are derived from Lodash.
3
+ * https://github.com/lodash/lodash
4
+ *
5
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
6
+ *
7
+ * Based on Underscore.js, copyright Jeremy Ashkenas,
8
+ * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
9
+ *
10
+ * Modifications Copyright (c) 2026 GoodData Corporation
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining
13
+ * a copy of this software and associated documentation files (the
14
+ * "Software"), to deal in the Software without restriction, including
15
+ * without limitation the rights to use, copy, modify, merge, publish,
16
+ * distribute, sublicense, and/or sell copies of the Software, and to
17
+ * permit persons to whom the Software is furnished to do so, subject to
18
+ * the following conditions:
19
+ *
20
+ * The above copyright notice and this permission notice shall be
21
+ * included in all copies or substantial portions of the Software.
22
+ *
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
+ */
31
+ /**
32
+ * Creates a function that negates the result of the predicate `predicate`. The predicate is invoked with
33
+ * the `this` binding and arguments of the created function, and its result is coerced to a boolean.
34
+ *
35
+ * @param predicate - The predicate to negate.
36
+ * @returns Returns the new negated function.
37
+ * @throws TypeError when `predicate` is not a function.
38
+ * @internal
39
+ */
40
+ export declare function _negate<T extends unknown[]>(predicate: (...args: T) => boolean): (...args: T) => boolean;
41
+ //# sourceMappingURL=negate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"negate.d.ts","sourceRoot":"","sources":["../../src/_/negate.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAQxG"}
@@ -0,0 +1,48 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /*!
3
+ * Portions of this file are derived from Lodash.
4
+ * https://github.com/lodash/lodash
5
+ *
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ *
8
+ * Based on Underscore.js, copyright Jeremy Ashkenas,
9
+ * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
10
+ *
11
+ * Modifications Copyright (c) 2026 GoodData Corporation
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining
14
+ * a copy of this software and associated documentation files (the
15
+ * "Software"), to deal in the Software without restriction, including
16
+ * without limitation the rights to use, copy, modify, merge, publish,
17
+ * distribute, sublicense, and/or sell copies of the Software, and to
18
+ * permit persons to whom the Software is furnished to do so, subject to
19
+ * the following conditions:
20
+ *
21
+ * The above copyright notice and this permission notice shall be
22
+ * included in all copies or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ */
32
+ /**
33
+ * Creates a function that negates the result of the predicate `predicate`. The predicate is invoked with
34
+ * the `this` binding and arguments of the created function, and its result is coerced to a boolean.
35
+ *
36
+ * @param predicate - The predicate to negate.
37
+ * @returns Returns the new negated function.
38
+ * @throws TypeError when `predicate` is not a function.
39
+ * @internal
40
+ */
41
+ export function _negate(predicate) {
42
+ if (typeof predicate !== "function") {
43
+ throw new TypeError("Expected a function");
44
+ }
45
+ return function (...args) {
46
+ return !predicate.apply(this, args);
47
+ };
48
+ }
@@ -0,0 +1,37 @@
1
+ import type { _List, _MemoListIterator, _MemoObjectIterator } from "./types.js";
2
+ /**
3
+ * Reduces `collection` to a value which is the accumulated result of running each element in `collection`
4
+ * thru `iteratee`, where each successive invocation is supplied the return value of the previous. If
5
+ * `accumulator` is not given, the first element of `collection` is used as the initial value; whether it
6
+ * was given is decided by the argument count, as in lodash. The iteratee is invoked with four arguments:
7
+ * (accumulator, value, index|key, collection). Arrays and array-likes are iterated by index, strings by
8
+ * character, other objects by their own enumerable string keys.
9
+ *
10
+ * @param collection - The collection to iterate over.
11
+ * @param iteratee - The function invoked per iteration, or an iteratee shorthand.
12
+ * @param accumulator - The initial value.
13
+ * @returns Returns the accumulated value.
14
+ * @internal
15
+ */
16
+ export declare function _reduce<T, TResult>(collection: T[] | null | undefined, iteratee: _MemoListIterator<T, TResult, T[]>, accumulator: TResult): TResult;
17
+ /**
18
+ * @internal
19
+ */
20
+ export declare function _reduce<T, TResult>(collection: _List<T> | null | undefined, iteratee: _MemoListIterator<T, TResult, _List<T>>, accumulator: TResult): TResult;
21
+ /**
22
+ * @internal
23
+ */
24
+ export declare function _reduce<T extends object, TResult>(collection: T | null | undefined, iteratee: _MemoObjectIterator<T[keyof T], TResult, T>, accumulator: TResult): TResult;
25
+ /**
26
+ * @internal
27
+ */
28
+ export declare function _reduce<T>(collection: T[] | null | undefined, iteratee: _MemoListIterator<T, T, T[]>): T | undefined;
29
+ /**
30
+ * @internal
31
+ */
32
+ export declare function _reduce<T>(collection: _List<T> | null | undefined, iteratee: _MemoListIterator<T, T, _List<T>>): T | undefined;
33
+ /**
34
+ * @internal
35
+ */
36
+ export declare function _reduce<T extends object>(collection: T | null | undefined, iteratee: _MemoObjectIterator<T[keyof T], T[keyof T], T>): T[keyof T] | undefined;
37
+ //# sourceMappingURL=reduce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reduce.d.ts","sourceRoot":"","sources":["../../src/_/reduce.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEhF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,OAAO,EAC9B,UAAU,EAAE,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EAClC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAC5C,WAAW,EAAE,OAAO,GACrB,OAAO,CAAC;AACX;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,OAAO,EAC9B,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EACvC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EACjD,WAAW,EAAE,OAAO,GACrB,OAAO,CAAC;AACX;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAC7C,UAAU,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAChC,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EACrD,WAAW,EAAE,OAAO,GACrB,OAAO,CAAC;AACX;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACrB,UAAU,EAAE,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EAClC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GACvC,CAAC,GAAG,SAAS,CAAC;AACjB;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACrB,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EACvC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAC5C,CAAC,GAAG,SAAS,CAAC;AACjB;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EACpC,UAAU,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAChC,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACzD,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC"}
@@ -0,0 +1,48 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /*!
3
+ * Portions of this file are derived from Lodash.
4
+ * https://github.com/lodash/lodash
5
+ *
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ *
8
+ * Based on Underscore.js, copyright Jeremy Ashkenas,
9
+ * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
10
+ *
11
+ * Modifications Copyright (c) 2026 GoodData Corporation
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining
14
+ * a copy of this software and associated documentation files (the
15
+ * "Software"), to deal in the Software without restriction, including
16
+ * without limitation the rights to use, copy, modify, merge, publish,
17
+ * distribute, sublicense, and/or sell copies of the Software, and to
18
+ * permit persons to whom the Software is furnished to do so, subject to
19
+ * the following conditions:
20
+ *
21
+ * The above copyright notice and this permission notice shall be
22
+ * included in all copies or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ */
32
+ import { _baseEach } from "./_baseEach.js";
33
+ import { _baseIteratee } from "./_baseIteratee.js";
34
+ export function _reduce(collection, iteratee, ...accumulator) {
35
+ const callback = _baseIteratee(iteratee);
36
+ let initial = accumulator.length === 0;
37
+ let result = accumulator[0];
38
+ _baseEach(collection, (value, key, iterable) => {
39
+ if (initial) {
40
+ initial = false;
41
+ result = value;
42
+ }
43
+ else {
44
+ result = callback(result, value, key, iterable);
45
+ }
46
+ });
47
+ return result;
48
+ }
@@ -0,0 +1,14 @@
1
+ import type { _List } from "./types.js";
2
+ /**
3
+ * This method is like `_sum` except that it accepts `iteratee` which is invoked for each element in `array`
4
+ * to generate the value to be summed. The iteratee is invoked with one argument: (value). Values are added
5
+ * with the `+` operator, `undefined` results are skipped, and, as in lodash, an empty or nullish array
6
+ * yields `0` while an array without any defined result yields `undefined`.
7
+ *
8
+ * @param array - The array to iterate over.
9
+ * @param iteratee - The iteratee invoked per element, or a property shorthand.
10
+ * @returns Returns the sum.
11
+ * @internal
12
+ */
13
+ export declare function _sumBy<T>(array: _List<T> | null | undefined, iteratee?: ((value: T) => number) | string): number;
14
+ //# sourceMappingURL=sumBy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sumBy.d.ts","sourceRoot":"","sources":["../../src/_/sumBy.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACpB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAClC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAC,GAAG,MAAM,GAC3C,MAAM,CAER"}
package/esm/_/sumBy.js ADDED
@@ -0,0 +1,47 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /*!
3
+ * Portions of this file are derived from Lodash.
4
+ * https://github.com/lodash/lodash
5
+ *
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ *
8
+ * Based on Underscore.js, copyright Jeremy Ashkenas,
9
+ * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
10
+ *
11
+ * Modifications Copyright (c) 2026 GoodData Corporation
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining
14
+ * a copy of this software and associated documentation files (the
15
+ * "Software"), to deal in the Software without restriction, including
16
+ * without limitation the rights to use, copy, modify, merge, publish,
17
+ * distribute, sublicense, and/or sell copies of the Software, and to
18
+ * permit persons to whom the Software is furnished to do so, subject to
19
+ * the following conditions:
20
+ *
21
+ * The above copyright notice and this permission notice shall be
22
+ * included in all copies or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ */
32
+ import { _baseIteratee } from "./_baseIteratee.js";
33
+ import { _baseSum } from "./_baseSum.js";
34
+ /**
35
+ * This method is like `_sum` except that it accepts `iteratee` which is invoked for each element in `array`
36
+ * to generate the value to be summed. The iteratee is invoked with one argument: (value). Values are added
37
+ * with the `+` operator, `undefined` results are skipped, and, as in lodash, an empty or nullish array
38
+ * yields `0` while an array without any defined result yields `undefined`.
39
+ *
40
+ * @param array - The array to iterate over.
41
+ * @param iteratee - The iteratee invoked per element, or a property shorthand.
42
+ * @returns Returns the sum.
43
+ * @internal
44
+ */
45
+ export function _sumBy(array, iteratee) {
46
+ return array?.length ? _baseSum(array, _baseIteratee(iteratee)) : 0;
47
+ }