@gooddata/util 11.68.0-alpha.7 → 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 (163) hide show
  1. package/NOTICE +4 -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 +18 -0
  6. package/esm/_/_baseDifference.d.ts.map +1 -0
  7. package/esm/_/_baseDifference.js +79 -0
  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/_/clamp.d.ts +17 -0
  42. package/esm/_/clamp.d.ts.map +1 -0
  43. package/esm/_/clamp.js +56 -0
  44. package/esm/_/clone.d.ts +12 -0
  45. package/esm/_/clone.d.ts.map +1 -0
  46. package/esm/_/clone.js +45 -0
  47. package/esm/_/cloneDeep.js +1 -1
  48. package/esm/_/cloneDeepWith.d.ts +18 -0
  49. package/esm/_/cloneDeepWith.d.ts.map +1 -0
  50. package/esm/_/cloneDeepWith.js +36 -0
  51. package/esm/_/constant.d.ts +39 -0
  52. package/esm/_/constant.d.ts.map +1 -0
  53. package/esm/_/constant.js +43 -0
  54. package/esm/_/defaults.d.ts +36 -0
  55. package/esm/_/defaults.d.ts.map +1 -0
  56. package/esm/_/defaults.js +51 -0
  57. package/esm/_/difference.d.ts.map +1 -1
  58. package/esm/_/difference.js +2 -23
  59. package/esm/_/differenceBy.d.ts +39 -0
  60. package/esm/_/differenceBy.d.ts.map +1 -0
  61. package/esm/_/differenceBy.js +40 -0
  62. package/esm/_/differenceWith.d.ts +27 -0
  63. package/esm/_/differenceWith.d.ts.map +1 -0
  64. package/esm/_/differenceWith.js +39 -0
  65. package/esm/_/dropRightWhile.d.ts +13 -0
  66. package/esm/_/dropRightWhile.d.ts.map +1 -0
  67. package/esm/_/dropRightWhile.js +54 -0
  68. package/esm/_/escapeRegExp.d.ts +12 -0
  69. package/esm/_/escapeRegExp.d.ts.map +1 -0
  70. package/esm/_/escapeRegExp.js +47 -0
  71. package/esm/_/findKey.d.ts +14 -0
  72. package/esm/_/findKey.d.ts.map +1 -0
  73. package/esm/_/findKey.js +58 -0
  74. package/esm/_/findLastIndex.d.ts +16 -0
  75. package/esm/_/findLastIndex.d.ts.map +1 -0
  76. package/esm/_/findLastIndex.js +67 -0
  77. package/esm/_/get.d.ts +78 -0
  78. package/esm/_/get.d.ts.map +1 -0
  79. package/esm/_/get.js +36 -0
  80. package/esm/_/inRange.d.ts +14 -0
  81. package/esm/_/inRange.d.ts.map +1 -0
  82. package/esm/_/inRange.js +51 -0
  83. package/esm/_/initial.d.ts +11 -0
  84. package/esm/_/initial.d.ts.map +1 -0
  85. package/esm/_/initial.js +44 -0
  86. package/esm/_/intersection.d.ts +13 -0
  87. package/esm/_/intersection.d.ts.map +1 -0
  88. package/esm/_/intersection.js +45 -0
  89. package/esm/_/intersectionBy.d.ts +32 -0
  90. package/esm/_/intersectionBy.d.ts.map +1 -0
  91. package/esm/_/intersectionBy.js +41 -0
  92. package/esm/_/intersectionWith.d.ts +28 -0
  93. package/esm/_/intersectionWith.d.ts.map +1 -0
  94. package/esm/_/intersectionWith.js +38 -0
  95. package/esm/_/invert.d.ts +14 -0
  96. package/esm/_/invert.d.ts.map +1 -0
  97. package/esm/_/invert.js +55 -0
  98. package/esm/_/isError.d.ts +11 -0
  99. package/esm/_/isError.d.ts.map +1 -0
  100. package/esm/_/isError.js +57 -0
  101. package/esm/_/keys.d.ts +11 -0
  102. package/esm/_/keys.d.ts.map +1 -0
  103. package/esm/_/keys.js +60 -0
  104. package/esm/_/mapValues.d.ts +63 -0
  105. package/esm/_/mapValues.d.ts.map +1 -0
  106. package/esm/_/mapValues.js +47 -0
  107. package/esm/_/max.d.ts +16 -0
  108. package/esm/_/max.d.ts.map +1 -0
  109. package/esm/_/max.js +37 -0
  110. package/esm/_/mergeWith.d.ts +34 -0
  111. package/esm/_/mergeWith.d.ts.map +1 -0
  112. package/esm/_/mergeWith.js +50 -0
  113. package/esm/_/min.d.ts +16 -0
  114. package/esm/_/min.d.ts.map +1 -0
  115. package/esm/_/min.js +37 -0
  116. package/esm/_/negate.d.ts +41 -0
  117. package/esm/_/negate.d.ts.map +1 -0
  118. package/esm/_/negate.js +48 -0
  119. package/esm/_/reduce.d.ts +37 -0
  120. package/esm/_/reduce.d.ts.map +1 -0
  121. package/esm/_/reduce.js +48 -0
  122. package/esm/_/sumBy.d.ts +14 -0
  123. package/esm/_/sumBy.d.ts.map +1 -0
  124. package/esm/_/sumBy.js +47 -0
  125. package/esm/_/tail.d.ts +15 -0
  126. package/esm/_/tail.d.ts.map +1 -0
  127. package/esm/_/tail.js +36 -0
  128. package/esm/_/times.d.ts +17 -0
  129. package/esm/_/times.d.ts.map +1 -0
  130. package/esm/_/times.js +57 -0
  131. package/esm/_/toFinite.d.ts +0 -30
  132. package/esm/_/toFinite.d.ts.map +1 -1
  133. package/esm/_/toFinite.js +2 -2
  134. package/esm/_/toInteger.d.ts +11 -0
  135. package/esm/_/toInteger.d.ts.map +1 -0
  136. package/esm/_/toInteger.js +46 -0
  137. package/esm/_/toNumber.d.ts +11 -0
  138. package/esm/_/toNumber.d.ts.map +1 -0
  139. package/esm/_/toNumber.js +69 -0
  140. package/esm/_/types.d.ts +47 -0
  141. package/esm/_/types.d.ts.map +1 -1
  142. package/esm/_/unescape.d.ts +13 -0
  143. package/esm/_/unescape.d.ts.map +1 -0
  144. package/esm/_/unescape.js +56 -0
  145. package/esm/_/union.d.ts.map +1 -1
  146. package/esm/_/union.js +2 -13
  147. package/esm/_/unionBy.d.ts +34 -0
  148. package/esm/_/unionBy.d.ts.map +1 -0
  149. package/esm/_/unionBy.js +42 -0
  150. package/esm/_/update.d.ts +17 -0
  151. package/esm/_/update.d.ts.map +1 -0
  152. package/esm/_/update.js +55 -0
  153. package/esm/_/updateWith.d.ts +23 -0
  154. package/esm/_/updateWith.d.ts.map +1 -0
  155. package/esm/_/updateWith.js +41 -0
  156. package/esm/_/without.d.ts +15 -0
  157. package/esm/_/without.d.ts.map +1 -0
  158. package/esm/_/without.js +47 -0
  159. package/esm/index.d.ts +40 -3
  160. package/esm/index.d.ts.map +1 -1
  161. package/esm/index.js +39 -2
  162. package/esm/util.d.ts +918 -1
  163. package/package.json +3 -3
package/esm/_/_baseSet.js CHANGED
@@ -40,10 +40,11 @@ import { _isObject } from "./isObject.js";
40
40
  * @param object - The object to modify.
41
41
  * @param path - The path of the property to set.
42
42
  * @param value - The value to set.
43
+ * @param customizer - The function to customize the containers created along the path.
43
44
  * @returns Returns `object`.
44
45
  * @internal
45
46
  */
46
- export function _baseSet(object, path, value) {
47
+ export function _baseSet(object, path, value, customizer) {
47
48
  if (!_isObject(object)) {
48
49
  return object;
49
50
  }
@@ -58,8 +59,13 @@ export function _baseSet(object, path, value) {
58
59
  let newValue = value;
59
60
  if (index !== lastIndex) {
60
61
  const objValue = nested[key];
61
- // keep an existing container, otherwise create an array for an index segment and an object otherwise
62
- newValue = _isObject(objValue) ? objValue : _isIndex(keys[index + 1]) ? [] : {};
62
+ // a customizer may supply the container; otherwise keep an existing one, or create an array for
63
+ // an index segment and an object otherwise; symbol keys are passed as they are, although the
64
+ // lodash typing only names string keys
65
+ newValue = customizer?.(objValue, key, nested);
66
+ if (newValue === undefined) {
67
+ newValue = _isObject(objValue) ? objValue : _isIndex(keys[index + 1]) ? [] : {};
68
+ }
63
69
  }
64
70
  _assignValue(nested, key, newValue);
65
71
  nested = nested[key];
@@ -0,0 +1,45 @@
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
+ import type { _List } from "./types.js";
32
+ /**
33
+ * The base implementation of `_.slice` without an iteratee call guard: copies the elements of `array` from
34
+ * `start` up to, but not including, `end` into a new dense array. Negative positions count from the end,
35
+ * positions are clamped to the length, and holes become `undefined`. The `length` of `array` is used as is,
36
+ * as in lodash.
37
+ *
38
+ * @param array - The array to slice.
39
+ * @param start - The start position.
40
+ * @param end - The end position.
41
+ * @returns Returns the slice of `array`.
42
+ * @internal
43
+ */
44
+ export declare function _baseSlice<T>(array: _List<T>, start: number, end: number): T[];
45
+ //# sourceMappingURL=_baseSlice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_baseSlice.d.ts","sourceRoot":"","sources":["../../src/_/_baseSlice.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,EAAE,CAsB9E"}
@@ -0,0 +1,30 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /**
3
+ * The base implementation of `_.slice` without an iteratee call guard: copies the elements of `array` from
4
+ * `start` up to, but not including, `end` into a new dense array. Negative positions count from the end,
5
+ * positions are clamped to the length, and holes become `undefined`. The `length` of `array` is used as is,
6
+ * as in lodash.
7
+ *
8
+ * @param array - The array to slice.
9
+ * @param start - The start position.
10
+ * @param end - The end position.
11
+ * @returns Returns the slice of `array`.
12
+ * @internal
13
+ */
14
+ export function _baseSlice(array, start, end) {
15
+ const length = array.length;
16
+ if (start < 0) {
17
+ start = -start > length ? 0 : length + start;
18
+ }
19
+ end = end > length ? length : end;
20
+ if (end < 0) {
21
+ end += length;
22
+ }
23
+ const count = start > end ? 0 : (end - start) >>> 0;
24
+ const from = start >>> 0;
25
+ const result = Array(count);
26
+ for (let index = 0; index < count; index++) {
27
+ result[index] = array[index + from];
28
+ }
29
+ return result;
30
+ }
@@ -0,0 +1,42 @@
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
+ import type { _List } from "./types.js";
32
+ /**
33
+ * The base implementation of `_sumBy`: adds the iteratee results of `array` with the `+` operator, skipping
34
+ * `undefined` results. As in lodash, the sum is `undefined` when no result was added.
35
+ *
36
+ * @param array - The array to iterate over.
37
+ * @param iteratee - The function invoked per element.
38
+ * @returns Returns the sum.
39
+ * @internal
40
+ */
41
+ export declare function _baseSum<T>(array: _List<T>, iteratee: (value: T) => unknown): unknown;
42
+ //# sourceMappingURL=_baseSum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_baseSum.d.ts","sourceRoot":"","sources":["../../src/_/_baseSum.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAarF"}
@@ -0,0 +1,21 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /**
3
+ * The base implementation of `_sumBy`: adds the iteratee results of `array` with the `+` operator, skipping
4
+ * `undefined` results. As in lodash, the sum is `undefined` when no result was added.
5
+ *
6
+ * @param array - The array to iterate over.
7
+ * @param iteratee - The function invoked per element.
8
+ * @returns Returns the sum.
9
+ * @internal
10
+ */
11
+ export function _baseSum(array, iteratee) {
12
+ let result;
13
+ for (let index = 0; index < array.length; index++) {
14
+ const current = iteratee(array[index]);
15
+ if (current !== undefined) {
16
+ // oxlint-disable-next-line @typescript-eslint/no-explicit-any -- `+` on any value, as in lodash
17
+ result = result === undefined ? current : result + current;
18
+ }
19
+ }
20
+ return result;
21
+ }
@@ -6,5 +6,5 @@
6
6
  * @returns Returns the cloned typed array.
7
7
  * @internal
8
8
  */
9
- export declare function _cloneTypedArray(typedArray: ArrayBufferView & ArrayLike<unknown>): ArrayBufferView;
9
+ export declare function _cloneTypedArray(typedArray: ArrayBufferView & ArrayLike<unknown>, deep?: boolean): ArrayBufferView;
10
10
  //# sourceMappingURL=_cloneTypedArray.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_cloneTypedArray.d.ts","sourceRoot":"","sources":["../../src/_/_cloneTypedArray.ts"],"names":[],"mappings":"AA8CA;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,eAAe,CAQlG"}
1
+ {"version":3,"file":"_cloneTypedArray.d.ts","sourceRoot":"","sources":["../../src/_/_cloneTypedArray.ts"],"names":[],"mappings":"AA8CA;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC5B,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,EAChD,IAAI,GAAE,OAAc,GACrB,eAAe,CASjB"}
@@ -40,10 +40,11 @@ const NodeBuffer = globalThis.Buffer;
40
40
  * @returns Returns the cloned typed array.
41
41
  * @internal
42
42
  */
43
- export function _cloneTypedArray(typedArray) {
43
+ export function _cloneTypedArray(typedArray, deep = true) {
44
44
  if (NodeBuffer?.isBuffer(typedArray)) {
45
45
  return NodeBuffer.from(typedArray);
46
46
  }
47
47
  const Ctor = typedArray.constructor;
48
- return new Ctor(_cloneArrayBuffer(typedArray.buffer), typedArray.byteOffset, typedArray.length);
48
+ const buffer = deep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
49
+ return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
49
50
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Concatenates the elements of the array-like objects among `values` into a new array, in order, skipping
3
+ * every other value. Elements are visited by index, so holes become `undefined` entries. This is the
4
+ * one-level strict flatten that `_union` and `_unionBy` apply to their arguments.
5
+ *
6
+ * @param values - The values to flatten.
7
+ * @returns Returns the new flattened array.
8
+ * @internal
9
+ */
10
+ export declare function _flattenArrayLikeObjects<T>(values: unknown[]): T[];
11
+ //# sourceMappingURL=_flattenArrayLikeObjects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_flattenArrayLikeObjects.d.ts","sourceRoot":"","sources":["../../src/_/_flattenArrayLikeObjects.ts"],"names":[],"mappings":"AAoCA;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,CAgBlE"}
@@ -0,0 +1,55 @@
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 { _isArrayLike } from "./isArrayLike.js";
33
+ import { _isObjectLike } from "./isObjectLike.js";
34
+ /**
35
+ * Concatenates the elements of the array-like objects among `values` into a new array, in order, skipping
36
+ * every other value. Elements are visited by index, so holes become `undefined` entries. This is the
37
+ * one-level strict flatten that `_union` and `_unionBy` apply to their arguments.
38
+ *
39
+ * @param values - The values to flatten.
40
+ * @returns Returns the new flattened array.
41
+ * @internal
42
+ */
43
+ export function _flattenArrayLikeObjects(values) {
44
+ const result = [];
45
+ for (const value of values) {
46
+ if (!_isObjectLike(value) || !_isArrayLike(value)) {
47
+ continue;
48
+ }
49
+ const list = value;
50
+ for (let index = 0; index < list.length; index++) {
51
+ result.push(list[index]);
52
+ }
53
+ }
54
+ return result;
55
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * This method is like `_assign` except that it iterates over own and inherited source properties: it
3
+ * assigns the own and inherited enumerable string keyed properties of the source objects to the destination
4
+ * object, left to right, so later sources overwrite earlier ones. Falsy sources are skipped, array-like
5
+ * sources are copied by index, and a nullish destination becomes a new object while a primitive one is boxed.
6
+ *
7
+ * **Note:** This method mutates `object`.
8
+ *
9
+ * @param object - The destination object.
10
+ * @param sources - The source objects.
11
+ * @returns Returns `object`.
12
+ * @internal
13
+ */
14
+ export declare function _assignIn<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
15
+ /**
16
+ * @internal
17
+ */
18
+ export declare function _assignIn<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
19
+ /**
20
+ * @internal
21
+ */
22
+ export declare function _assignIn<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
23
+ /**
24
+ * @internal
25
+ */
26
+ export declare function _assignIn<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
27
+ /**
28
+ * @internal
29
+ */
30
+ export declare function _assignIn<TObject>(object: TObject): TObject;
31
+ /**
32
+ * @internal
33
+ */
34
+ export declare function _assignIn<TResult>(object: any, ...otherArgs: any[]): TResult;
35
+ //# sourceMappingURL=assignIn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignIn.d.ts","sourceRoot":"","sources":["../../src/_/assignIn.ts"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AACjG;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EACjD,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,GAClB,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACjC;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAC3D,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,GAClB,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC5C;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EACrE,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,GAClB,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACvD;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC;AAC7D;;GAEG;AAEH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,OAAO,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 { _assignValue } from "./_assignValue.js";
33
+ import { _isIterateeCall } from "./_isIterateeCall.js";
34
+ import { _keysIn } from "./keysIn.js";
35
+ export function _assignIn(object, ...sources) {
36
+ const target = Object(object);
37
+ // when called as an iteratee, e.g. by `reduce`, only the value is a source, not the index and collection
38
+ const length = sources.length > 2 && _isIterateeCall(sources[0], sources[1], sources[2]) ? 1 : sources.length;
39
+ for (let index = 0; index < length; index++) {
40
+ const source = sources[index];
41
+ if (!source) {
42
+ continue;
43
+ }
44
+ const from = Object(source);
45
+ for (const key of _keysIn(source)) {
46
+ _assignValue(target, key, from[key]);
47
+ }
48
+ }
49
+ return target;
50
+ }
@@ -0,0 +1,16 @@
1
+ import type { _Many } from "./types.js";
2
+ /**
3
+ * Binds methods of an object to the object itself, overwriting the existing method. Method names may be
4
+ * specified as individual arguments or as arrays of method names, which are flattened one level; names are
5
+ * coerced to property keys the way lodash does it, so symbols and `-0` are kept.
6
+ *
7
+ * **Note:** This method doesn't set the "length" property of bound functions, and it mutates `object`.
8
+ *
9
+ * @param object - The object to bind and assign the bound methods to.
10
+ * @param methodNames - The object method names to bind.
11
+ * @returns Returns `object`.
12
+ * @throws TypeError when a named property is not a function.
13
+ * @internal
14
+ */
15
+ export declare function _bindAll<T>(object: T, ...methodNames: _Many<string>[]): T;
16
+ //# sourceMappingURL=bindAll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bindAll.d.ts","sourceRoot":"","sources":["../../src/_/bindAll.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAuCxC;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAmBzE"}
@@ -0,0 +1,88 @@
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 { _toKey } from "./_toKey.js";
34
+ import { _isArguments } from "./isArguments.js";
35
+ /**
36
+ * Whether lodash's one-level flatten spreads `value`: arrays, arguments objects and anything marked with
37
+ * `Symbol.isConcatSpreadable`.
38
+ */
39
+ function isSpreadable(value) {
40
+ if (Array.isArray(value) || _isArguments(value)) {
41
+ return true;
42
+ }
43
+ const spreadable = value?.[Symbol.isConcatSpreadable];
44
+ return Boolean(spreadable);
45
+ }
46
+ /**
47
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`. As in lodash, the created
48
+ * function reports a length of `0`, and a `new` call constructs `func` itself, ignoring the binding.
49
+ */
50
+ function bindTo(func, thisArg) {
51
+ if (typeof func !== "function") {
52
+ throw new TypeError("Expected a function");
53
+ }
54
+ const target = func;
55
+ return function (...args) {
56
+ return new.target ? Reflect.construct(target, args) : target.apply(thisArg, args);
57
+ };
58
+ }
59
+ /**
60
+ * Binds methods of an object to the object itself, overwriting the existing method. Method names may be
61
+ * specified as individual arguments or as arrays of method names, which are flattened one level; names are
62
+ * coerced to property keys the way lodash does it, so symbols and `-0` are kept.
63
+ *
64
+ * **Note:** This method doesn't set the "length" property of bound functions, and it mutates `object`.
65
+ *
66
+ * @param object - The object to bind and assign the bound methods to.
67
+ * @param methodNames - The object method names to bind.
68
+ * @returns Returns `object`.
69
+ * @throws TypeError when a named property is not a function.
70
+ * @internal
71
+ */
72
+ export function _bindAll(object, ...methodNames) {
73
+ const target = object;
74
+ const names = [];
75
+ for (const entry of methodNames) {
76
+ if (isSpreadable(entry)) {
77
+ names.push(...Array.from(entry));
78
+ }
79
+ else {
80
+ names.push(entry);
81
+ }
82
+ }
83
+ for (const name of names) {
84
+ const key = _toKey(name);
85
+ _baseAssignValue(target, key, bindTo(target[key], target));
86
+ }
87
+ return object;
88
+ }
@@ -0,0 +1,15 @@
1
+ import type { _List } from "./types.js";
2
+ /**
3
+ * Creates an array of elements split into groups the length of `size`. If `array` can't be split evenly, the
4
+ * final chunk will be the remaining elements. The size is coerced to an integer the way lodash does it, and
5
+ * a size below 1 yields an empty array.
6
+ *
7
+ * @param array - The array to process.
8
+ * @param size - The length of each chunk. Defaults to 1.
9
+ * @param guard - Enables use as an iteratee for methods like `map`: when it is the collection holding
10
+ * `array` at index `size`, the size is ignored.
11
+ * @returns Returns the new array of chunks.
12
+ * @internal
13
+ */
14
+ export declare function _chunk<T>(array: _List<T> | null | undefined, size?: number, guard?: unknown): T[][];
15
+ //# sourceMappingURL=chunk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk.d.ts","sourceRoot":"","sources":["../../src/_/chunk.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,EAAE,CAkBnG"}
package/esm/_/chunk.js ADDED
@@ -0,0 +1,61 @@
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 { _baseSlice } from "./_baseSlice.js";
33
+ import { _isIterateeCall } from "./_isIterateeCall.js";
34
+ import { _toInteger } from "./toInteger.js";
35
+ /**
36
+ * Creates an array of elements split into groups the length of `size`. If `array` can't be split evenly, the
37
+ * final chunk will be the remaining elements. The size is coerced to an integer the way lodash does it, and
38
+ * a size below 1 yields an empty array.
39
+ *
40
+ * @param array - The array to process.
41
+ * @param size - The length of each chunk. Defaults to 1.
42
+ * @param guard - Enables use as an iteratee for methods like `map`: when it is the collection holding
43
+ * `array` at index `size`, the size is ignored.
44
+ * @returns Returns the new array of chunks.
45
+ * @internal
46
+ */
47
+ export function _chunk(array, size, guard) {
48
+ const chunkSize = (guard ? _isIterateeCall(array, size, guard) : size === undefined)
49
+ ? 1
50
+ : Math.max(_toInteger(size), 0);
51
+ if (!array?.length || chunkSize < 1) {
52
+ return [];
53
+ }
54
+ const length = array.length;
55
+ const result = Array(Math.ceil(length / chunkSize));
56
+ let resIndex = 0;
57
+ for (let index = 0; index < length; index += chunkSize) {
58
+ result[resIndex++] = _baseSlice(array, index, index + chunkSize);
59
+ }
60
+ return result;
61
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Clamps `number` within the inclusive `lower` and `upper` bounds. With two arguments the second one is the
3
+ * upper bound. The upper bound is applied first, bounds that convert to `NaN` count as `0`, an `undefined`
4
+ * bound is skipped, and a `NaN` number is returned as is.
5
+ *
6
+ * @param number - The number to clamp.
7
+ * @param lower - The lower bound.
8
+ * @param upper - The upper bound.
9
+ * @returns Returns the clamped number.
10
+ * @internal
11
+ */
12
+ export declare function _clamp(number: number, lower: number, upper: number): number;
13
+ /**
14
+ * @internal
15
+ */
16
+ export declare function _clamp(number: number, upper: number): number;
17
+ //# sourceMappingURL=clamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clamp.d.ts","sourceRoot":"","sources":["../../src/_/clamp.ts"],"names":[],"mappings":"AAmCA;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;AAC7E;;GAEG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC"}
package/esm/_/clamp.js ADDED
@@ -0,0 +1,56 @@
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 { _toNumber } from "./toNumber.js";
33
+ export function _clamp(number, lower, upper) {
34
+ if (upper === undefined) {
35
+ upper = lower;
36
+ lower = undefined;
37
+ }
38
+ const max = upper === undefined ? undefined : _toBound(upper);
39
+ const min = lower === undefined ? undefined : _toBound(lower);
40
+ let result = _toNumber(number);
41
+ if (result !== result) {
42
+ return result;
43
+ }
44
+ if (max !== undefined) {
45
+ result = result <= max ? result : max;
46
+ }
47
+ if (min !== undefined) {
48
+ result = result >= min ? result : min;
49
+ }
50
+ return result;
51
+ }
52
+ /** Converts a bound to a number, `NaN` counting as `0`. */
53
+ function _toBound(bound) {
54
+ const converted = _toNumber(bound);
55
+ return converted === converted ? converted : 0;
56
+ }