@gooddata/util 11.68.0-alpha.8 → 11.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +3 -3
- package/esm/_/_baseClone.d.ts +17 -4
- package/esm/_/_baseClone.d.ts.map +1 -1
- package/esm/_/_baseClone.js +55 -23
- package/esm/_/_baseDifference.d.ts +7 -4
- package/esm/_/_baseDifference.d.ts.map +1 -1
- package/esm/_/_baseDifference.js +18 -7
- package/esm/_/_baseExtremum.d.ts +15 -0
- package/esm/_/_baseExtremum.d.ts.map +1 -0
- package/esm/_/_baseExtremum.js +64 -0
- package/esm/_/_baseIntersection.d.ts +19 -0
- package/esm/_/_baseIntersection.d.ts.map +1 -0
- package/esm/_/_baseIntersection.js +91 -0
- package/esm/_/_baseMerge.d.ts +7 -3
- package/esm/_/_baseMerge.d.ts.map +1 -1
- package/esm/_/_baseMerge.js +20 -11
- package/esm/_/_baseSet.d.ts +3 -1
- package/esm/_/_baseSet.d.ts.map +1 -1
- package/esm/_/_baseSet.js +9 -3
- package/esm/_/_baseSlice.d.ts +45 -0
- package/esm/_/_baseSlice.d.ts.map +1 -0
- package/esm/_/_baseSlice.js +30 -0
- package/esm/_/_baseSum.d.ts +42 -0
- package/esm/_/_baseSum.d.ts.map +1 -0
- package/esm/_/_baseSum.js +21 -0
- package/esm/_/_cloneTypedArray.d.ts +1 -1
- package/esm/_/_cloneTypedArray.d.ts.map +1 -1
- package/esm/_/_cloneTypedArray.js +3 -2
- package/esm/_/_flattenArrayLikeObjects.d.ts +11 -0
- package/esm/_/_flattenArrayLikeObjects.d.ts.map +1 -0
- package/esm/_/_flattenArrayLikeObjects.js +55 -0
- package/esm/_/assignIn.d.ts +35 -0
- package/esm/_/assignIn.d.ts.map +1 -0
- package/esm/_/assignIn.js +50 -0
- package/esm/_/bindAll.d.ts +16 -0
- package/esm/_/bindAll.d.ts.map +1 -0
- package/esm/_/bindAll.js +88 -0
- package/esm/_/chunk.d.ts +15 -0
- package/esm/_/chunk.d.ts.map +1 -0
- package/esm/_/chunk.js +61 -0
- package/esm/_/clone.d.ts +12 -0
- package/esm/_/clone.d.ts.map +1 -0
- package/esm/_/clone.js +45 -0
- package/esm/_/cloneDeep.js +1 -1
- package/esm/_/cloneDeepWith.d.ts +18 -0
- package/esm/_/cloneDeepWith.d.ts.map +1 -0
- package/esm/_/cloneDeepWith.js +36 -0
- package/esm/_/constant.d.ts +39 -0
- package/esm/_/constant.d.ts.map +1 -0
- package/esm/_/constant.js +43 -0
- package/esm/_/defaults.d.ts +36 -0
- package/esm/_/defaults.d.ts.map +1 -0
- package/esm/_/defaults.js +51 -0
- package/esm/_/differenceWith.d.ts +27 -0
- package/esm/_/differenceWith.d.ts.map +1 -0
- package/esm/_/differenceWith.js +39 -0
- package/esm/_/dropRightWhile.d.ts +13 -0
- package/esm/_/dropRightWhile.d.ts.map +1 -0
- package/esm/_/dropRightWhile.js +54 -0
- package/esm/_/escapeRegExp.d.ts +12 -0
- package/esm/_/escapeRegExp.d.ts.map +1 -0
- package/esm/_/escapeRegExp.js +47 -0
- package/esm/_/findKey.d.ts +14 -0
- package/esm/_/findKey.d.ts.map +1 -0
- package/esm/_/findKey.js +58 -0
- package/esm/_/findLastIndex.d.ts +16 -0
- package/esm/_/findLastIndex.d.ts.map +1 -0
- package/esm/_/findLastIndex.js +67 -0
- package/esm/_/get.d.ts +78 -0
- package/esm/_/get.d.ts.map +1 -0
- package/esm/_/get.js +36 -0
- package/esm/_/inRange.d.ts +14 -0
- package/esm/_/inRange.d.ts.map +1 -0
- package/esm/_/inRange.js +51 -0
- package/esm/_/initial.d.ts +11 -0
- package/esm/_/initial.d.ts.map +1 -0
- package/esm/_/initial.js +44 -0
- package/esm/_/intersection.d.ts +13 -0
- package/esm/_/intersection.d.ts.map +1 -0
- package/esm/_/intersection.js +45 -0
- package/esm/_/intersectionBy.d.ts +32 -0
- package/esm/_/intersectionBy.d.ts.map +1 -0
- package/esm/_/intersectionBy.js +41 -0
- package/esm/_/intersectionWith.d.ts +28 -0
- package/esm/_/intersectionWith.d.ts.map +1 -0
- package/esm/_/intersectionWith.js +38 -0
- package/esm/_/invert.d.ts +14 -0
- package/esm/_/invert.d.ts.map +1 -0
- package/esm/_/invert.js +55 -0
- package/esm/_/isError.d.ts +11 -0
- package/esm/_/isError.d.ts.map +1 -0
- package/esm/_/isError.js +57 -0
- package/esm/_/keys.d.ts +11 -0
- package/esm/_/keys.d.ts.map +1 -0
- package/esm/_/keys.js +60 -0
- package/esm/_/mapValues.d.ts +63 -0
- package/esm/_/mapValues.d.ts.map +1 -0
- package/esm/_/mapValues.js +47 -0
- package/esm/_/max.d.ts +16 -0
- package/esm/_/max.d.ts.map +1 -0
- package/esm/_/max.js +37 -0
- package/esm/_/mergeWith.d.ts +34 -0
- package/esm/_/mergeWith.d.ts.map +1 -0
- package/esm/_/mergeWith.js +50 -0
- package/esm/_/min.d.ts +16 -0
- package/esm/_/min.d.ts.map +1 -0
- package/esm/_/min.js +37 -0
- package/esm/_/negate.d.ts +41 -0
- package/esm/_/negate.d.ts.map +1 -0
- package/esm/_/negate.js +48 -0
- package/esm/_/reduce.d.ts +37 -0
- package/esm/_/reduce.d.ts.map +1 -0
- package/esm/_/reduce.js +48 -0
- package/esm/_/sumBy.d.ts +14 -0
- package/esm/_/sumBy.d.ts.map +1 -0
- package/esm/_/sumBy.js +47 -0
- package/esm/_/tail.d.ts +15 -0
- package/esm/_/tail.d.ts.map +1 -0
- package/esm/_/tail.js +36 -0
- package/esm/_/times.d.ts +17 -0
- package/esm/_/times.d.ts.map +1 -0
- package/esm/_/times.js +57 -0
- package/esm/_/toFinite.d.ts +0 -30
- package/esm/_/toFinite.d.ts.map +1 -1
- package/esm/_/toFinite.js +2 -2
- package/esm/_/toInteger.d.ts +11 -0
- package/esm/_/toInteger.d.ts.map +1 -0
- package/esm/_/toInteger.js +46 -0
- package/esm/_/types.d.ts +47 -0
- package/esm/_/types.d.ts.map +1 -1
- package/esm/_/unescape.d.ts +13 -0
- package/esm/_/unescape.d.ts.map +1 -0
- package/esm/_/unescape.js +56 -0
- package/esm/_/union.d.ts.map +1 -1
- package/esm/_/union.js +2 -13
- package/esm/_/unionBy.d.ts +34 -0
- package/esm/_/unionBy.d.ts.map +1 -0
- package/esm/_/unionBy.js +42 -0
- package/esm/_/updateWith.d.ts +23 -0
- package/esm/_/updateWith.d.ts.map +1 -0
- package/esm/_/updateWith.js +41 -0
- package/esm/_/without.d.ts +15 -0
- package/esm/_/without.d.ts.map +1 -0
- package/esm/_/without.js +47 -0
- package/esm/index.d.ts +37 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +36 -2
- package/esm/util.d.ts +857 -18
- package/package.json +3 -3
package/esm/_/tail.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { _List } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Gets all but the first element of `array` as a new dense array. Nullish input and anything without a
|
|
4
|
+
* truthy `length` yield an empty array.
|
|
5
|
+
*
|
|
6
|
+
* @param array - The array to query.
|
|
7
|
+
* @returns Returns the slice of `array`.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function _tail<T extends unknown[]>(array: readonly [unknown, ...T]): T;
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function _tail<T>(array?: _List<T> | null): T[];
|
|
15
|
+
//# sourceMappingURL=tail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tail.d.ts","sourceRoot":"","sources":["../../src/_/tail.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC/E;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC"}
|
package/esm/_/tail.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
export function _tail(array) {
|
|
34
|
+
const length = array == null ? 0 : array.length;
|
|
35
|
+
return length ? _baseSlice(array, 1, length) : [];
|
|
36
|
+
}
|
package/esm/_/times.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Invokes the iteratee `n` times, returning an array of the results of each invocation. The iteratee is
|
|
3
|
+
* invoked with one argument, the index, and anything but a function is replaced by the identity, so the
|
|
4
|
+
* indices are returned. The count is coerced to an integer the way lodash does it; a count below 1 or above
|
|
5
|
+
* the safe integer range yields an empty array.
|
|
6
|
+
*
|
|
7
|
+
* @param n - The number of times to invoke `iteratee`.
|
|
8
|
+
* @param iteratee - The function invoked per iteration.
|
|
9
|
+
* @returns Returns the array of results.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function _times<TResult>(n: number, iteratee: (index: number) => TResult): TResult[];
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function _times(n: number): number[];
|
|
17
|
+
//# sourceMappingURL=times.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"times.d.ts","sourceRoot":"","sources":["../../src/_/times.ts"],"names":[],"mappings":"AAsCA;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,EAAE,CAAC;AAC5F;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC"}
|
package/esm/_/times.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
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 { _toInteger } from "./toInteger.js";
|
|
33
|
+
/** Used as the maximum length of an array. */
|
|
34
|
+
const MAX_ARRAY_LENGTH = 4294967295;
|
|
35
|
+
export function _times(n, iteratee) {
|
|
36
|
+
const count = _toInteger(n);
|
|
37
|
+
if (count < 1 || count > Number.MAX_SAFE_INTEGER) {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
const invoke = typeof iteratee === "function" ? iteratee : identity;
|
|
41
|
+
const length = Math.min(count, MAX_ARRAY_LENGTH);
|
|
42
|
+
const result = Array(length);
|
|
43
|
+
for (let index = 0; index < length; index++) {
|
|
44
|
+
result[index] = invoke(index);
|
|
45
|
+
}
|
|
46
|
+
// beyond the maximum array length lodash keeps invoking the iteratee without storing the results, with
|
|
47
|
+
// exactly this arithmetic
|
|
48
|
+
let index = MAX_ARRAY_LENGTH;
|
|
49
|
+
const remaining = count - MAX_ARRAY_LENGTH;
|
|
50
|
+
while (++index < remaining) {
|
|
51
|
+
invoke(index);
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
function identity(index) {
|
|
56
|
+
return index;
|
|
57
|
+
}
|
package/esm/_/toFinite.d.ts
CHANGED
|
@@ -1,33 +1,3 @@
|
|
|
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
1
|
/**
|
|
32
2
|
* Converts `value` to a finite number: `NaN` and anything that does not convert become `0`, infinities
|
|
33
3
|
* become the largest finite number of their sign, and the sign of `-0` is kept.
|
package/esm/_/toFinite.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toFinite.d.ts","sourceRoot":"","sources":["../../src/_/toFinite.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toFinite.d.ts","sourceRoot":"","sources":["../../src/_/toFinite.ts"],"names":[],"mappings":"AAmCA;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAYhD"}
|
package/esm/_/toFinite.js
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
30
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
31
|
*/
|
|
32
|
+
import { _toNumber } from "./toNumber.js";
|
|
32
33
|
/**
|
|
33
34
|
* Converts `value` to a finite number: `NaN` and anything that does not convert become `0`, infinities
|
|
34
35
|
* become the largest finite number of their sign, and the sign of `-0` is kept.
|
|
@@ -41,8 +42,7 @@ export function _toFinite(value) {
|
|
|
41
42
|
if (!value) {
|
|
42
43
|
return value === 0 ? value : 0;
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
-
const number = typeof value === "symbol" ? NaN : Number(value);
|
|
45
|
+
const number = _toNumber(value);
|
|
46
46
|
if (number === Infinity || number === -Infinity) {
|
|
47
47
|
return Math.sign(number) * Number.MAX_VALUE;
|
|
48
48
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts `value` to an integer, truncating towards zero after the lodash numeric coercion of `_toFinite`:
|
|
3
|
+
* `NaN` and unconvertible values become `0` and infinities become the largest finite integer of their
|
|
4
|
+
* sign.
|
|
5
|
+
*
|
|
6
|
+
* @param value - The value to convert.
|
|
7
|
+
* @returns Returns the converted integer.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function _toInteger(value: unknown): number;
|
|
11
|
+
//# sourceMappingURL=toInteger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toInteger.d.ts","sourceRoot":"","sources":["../../src/_/toInteger.ts"],"names":[],"mappings":"AAmCA;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAKjD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { _toFinite } from "./toFinite.js";
|
|
33
|
+
/**
|
|
34
|
+
* Converts `value` to an integer, truncating towards zero after the lodash numeric coercion of `_toFinite`:
|
|
35
|
+
* `NaN` and unconvertible values become `0` and infinities become the largest finite integer of their
|
|
36
|
+
* sign.
|
|
37
|
+
*
|
|
38
|
+
* @param value - The value to convert.
|
|
39
|
+
* @returns Returns the converted integer.
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export function _toInteger(value) {
|
|
43
|
+
const result = _toFinite(value);
|
|
44
|
+
const remainder = result % 1;
|
|
45
|
+
return remainder ? result - remainder : result;
|
|
46
|
+
}
|
package/esm/_/types.d.ts
CHANGED
|
@@ -81,6 +81,10 @@ export type _ListIterator<T, TResult> = (value: T, index: number, collection: _L
|
|
|
81
81
|
* @internal
|
|
82
82
|
*/
|
|
83
83
|
export type _ListIteratee<T> = _ListIterator<T, _NotVoid> | _IterateeShorthand<T>;
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
export type _ListIterateeCustom<T, TResult> = _ListIterator<T, TResult> | _IterateeShorthand<T>;
|
|
84
88
|
/**
|
|
85
89
|
* @internal
|
|
86
90
|
*/
|
|
@@ -131,4 +135,47 @@ export type _Function4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) =>
|
|
|
131
135
|
* @internal
|
|
132
136
|
*/
|
|
133
137
|
export type _Comparator<T> = (a: T, b: T) => boolean;
|
|
138
|
+
/**
|
|
139
|
+
* @internal
|
|
140
|
+
*/
|
|
141
|
+
export type _Comparator2<T1, T2> = (a: T1, b: T2) => boolean;
|
|
142
|
+
/**
|
|
143
|
+
* @internal
|
|
144
|
+
*/
|
|
145
|
+
export type _ArrayIterator<T, TResult> = (value: T, index: number, collection: T[]) => TResult;
|
|
146
|
+
/**
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
export type _StringIterator<TResult> = (char: string, index: number, string: string) => TResult;
|
|
150
|
+
/**
|
|
151
|
+
* The customizer of `_mergeWith`: invoked per property with the destination value, the source value, the
|
|
152
|
+
* key, the destination and source objects being merged, and the stack of traversed source values. A result
|
|
153
|
+
* other than `undefined` is used as the merged value.
|
|
154
|
+
*
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
export type _MergeWithCustomizer = (value: any, srcValue: any, key: string, object: any, source: any, stack: any) => any;
|
|
158
|
+
/**
|
|
159
|
+
* The customizer of `_cloneDeepWith`: invoked with the value alone at the top level and with the value,
|
|
160
|
+
* its key, the containing object and the stack of objects being cloned below. A result other than
|
|
161
|
+
* `undefined` is used as the cloned value.
|
|
162
|
+
*
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
export type _CloneDeepWithCustomizer<TObject> = (value: any, key: number | string | undefined, object: TObject | undefined, stack: any) => any;
|
|
166
|
+
/**
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
export type _MemoListIterator<T, TResult, TList> = (prev: TResult, curr: T, index: number, list: TList) => TResult;
|
|
170
|
+
/**
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
export type _MemoObjectIterator<T, TResult, TList> = (prev: TResult, curr: T, key: string, list: TList) => TResult;
|
|
174
|
+
/**
|
|
175
|
+
* The customizer of `_updateWith`: invoked for every intermediate path segment with the current value, the
|
|
176
|
+
* key and the object holding it. A result other than `undefined` is used as the container for that segment.
|
|
177
|
+
*
|
|
178
|
+
* @internal
|
|
179
|
+
*/
|
|
180
|
+
export type _SetWithCustomizer<T> = (nsValue: any, key: string, nsObject: T) => any;
|
|
134
181
|
//# sourceMappingURL=types.d.ts.map
|
package/esm/_/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/_/types.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,M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KAAK,KACV,OAAO,CAAC;AAEb;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAEhC,OAAO,EAAE,GAAG,EACZ,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,CAAC,KAEV,GAAG,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The inverse of `_escape`; this method converts the HTML entities `&`, `<`, `>`, `"` and
|
|
3
|
+
* `'` in `string` to their corresponding characters.
|
|
4
|
+
*
|
|
5
|
+
* **Note:** No other HTML entities are unescaped. To unescape additional HTML entities use a third-party
|
|
6
|
+
* library like [he](https://mths.be/he).
|
|
7
|
+
*
|
|
8
|
+
* @param string - The string to unescape.
|
|
9
|
+
* @returns Returns the unescaped string.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function _unescape(string?: string): string;
|
|
13
|
+
//# sourceMappingURL=unescape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/_/unescape.ts"],"names":[],"mappings":"AA+CA;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
|
@@ -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 { _toString } from "./toString.js";
|
|
33
|
+
/** Used to match the HTML entities `_unescape` handles. */
|
|
34
|
+
const RE_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39);/g;
|
|
35
|
+
/** Used to map HTML entities to characters. */
|
|
36
|
+
const HTML_UNESCAPES = {
|
|
37
|
+
"&": "&",
|
|
38
|
+
"<": "<",
|
|
39
|
+
">": ">",
|
|
40
|
+
""": '"',
|
|
41
|
+
"'": "'",
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The inverse of `_escape`; this method converts the HTML entities `&`, `<`, `>`, `"` and
|
|
45
|
+
* `'` in `string` to their corresponding characters.
|
|
46
|
+
*
|
|
47
|
+
* **Note:** No other HTML entities are unescaped. To unescape additional HTML entities use a third-party
|
|
48
|
+
* library like [he](https://mths.be/he).
|
|
49
|
+
*
|
|
50
|
+
* @param string - The string to unescape.
|
|
51
|
+
* @returns Returns the unescaped string.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export function _unescape(string) {
|
|
55
|
+
return _toString(string).replace(RE_ESCAPED_HTML, (entity) => HTML_UNESCAPES[entity] ?? entity);
|
|
56
|
+
}
|
package/esm/_/union.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../src/_/union.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../src/_/union.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAEzE"}
|
package/esm/_/union.js
CHANGED
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
31
|
*/
|
|
32
32
|
import { _baseUniq } from "./_baseUniq.js";
|
|
33
|
-
import {
|
|
34
|
-
import { _isObjectLike } from "./isObjectLike.js";
|
|
33
|
+
import { _flattenArrayLikeObjects } from "./_flattenArrayLikeObjects.js";
|
|
35
34
|
/**
|
|
36
35
|
* Creates an array of unique values, in order, from all given arrays using SameValueZero for equality
|
|
37
36
|
* comparisons. Only array-like objects are inspected; other arguments, strings included, are skipped.
|
|
@@ -41,15 +40,5 @@ import { _isObjectLike } from "./isObjectLike.js";
|
|
|
41
40
|
* @internal
|
|
42
41
|
*/
|
|
43
42
|
export function _union(...arrays) {
|
|
44
|
-
|
|
45
|
-
for (const array of arrays) {
|
|
46
|
-
if (!_isObjectLike(array) || !_isArrayLike(array)) {
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
// visited by index, so holes become `undefined` entries
|
|
50
|
-
for (let index = 0; index < array.length; index++) {
|
|
51
|
-
values.push(array[index]);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return _baseUniq(values);
|
|
43
|
+
return _baseUniq(_flattenArrayLikeObjects(arrays));
|
|
55
44
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { _List, _ValueIteratee } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* This method is like `_union` except that it accepts `iteratee` which is invoked for each element of each
|
|
4
|
+
* array to generate the criterion by which uniqueness is computed. Result values are chosen from the first
|
|
5
|
+
* array in which the value occurs. The iteratee is invoked with one argument: (value). As in lodash, the
|
|
6
|
+
* last argument is taken as the iteratee unless it is an array-like object, so an array is always a list
|
|
7
|
+
* to merge, and arguments that are not array-like objects are skipped.
|
|
8
|
+
*
|
|
9
|
+
* @param arrays - The arrays to inspect, followed by the optional iteratee.
|
|
10
|
+
* @returns Returns the new array of combined values.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function _unionBy<T>(arrays: _List<T> | null | undefined, iteratee?: _ValueIteratee<T>): T[];
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function _unionBy<T>(arrays1: _List<T> | null | undefined, arrays2: _List<T> | null | undefined, iteratee?: _ValueIteratee<T>): T[];
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function _unionBy<T>(arrays1: _List<T> | null | undefined, arrays2: _List<T> | null | undefined, arrays3: _List<T> | null | undefined, iteratee?: _ValueIteratee<T>): T[];
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function _unionBy<T>(arrays1: _List<T> | null | undefined, arrays2: _List<T> | null | undefined, arrays3: _List<T> | null | undefined, arrays4: _List<T> | null | undefined, iteratee?: _ValueIteratee<T>): T[];
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare function _unionBy<T>(arrays1: _List<T> | null | undefined, arrays2: _List<T> | null | undefined, arrays3: _List<T> | null | undefined, arrays4: _List<T> | null | undefined, arrays5: _List<T> | null | undefined, ...iteratee: (_ValueIteratee<T> | _List<T> | null | undefined)[]): T[];
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export declare function _unionBy<T>(...values: (_ValueIteratee<T> | _List<T> | null | undefined)[]): T[];
|
|
34
|
+
//# sourceMappingURL=unionBy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unionBy.d.ts","sourceRoot":"","sources":["../../src/_/unionBy.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;AACpG;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACtB,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EACpC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GAC7B,CAAC,EAAE,CAAC;AACP;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACtB,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,EAAE,KAAK,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G,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC"}
|
package/esm/_/unionBy.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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 { _baseUniq } from "./_baseUniq.js";
|
|
34
|
+
import { _flattenArrayLikeObjects } from "./_flattenArrayLikeObjects.js";
|
|
35
|
+
import { _isArrayLike } from "./isArrayLike.js";
|
|
36
|
+
import { _isObjectLike } from "./isObjectLike.js";
|
|
37
|
+
export function _unionBy(...values) {
|
|
38
|
+
const last = values[values.length - 1];
|
|
39
|
+
const iteratee = _isObjectLike(last) && _isArrayLike(last) ? undefined : last;
|
|
40
|
+
// a non-list iteratee is not array-like, so the flatten drops it from the values
|
|
41
|
+
return _baseUniq(_flattenArrayLikeObjects(values), _baseIteratee(iteratee));
|
|
42
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { _PropertyPath } from "./set.js";
|
|
2
|
+
import type { _SetWithCustomizer } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* This method is like `_update` except that it accepts `customizer` which is invoked to produce the objects
|
|
5
|
+
* of `path`. If `customizer` returns `undefined` path creation is handled by the method instead. The
|
|
6
|
+
* `customizer` is invoked with three arguments: (nsValue, key, nsObject). Anything but a function is
|
|
7
|
+
* ignored as a customizer, and anything but a function is the identity as an updater.
|
|
8
|
+
*
|
|
9
|
+
* **Note:** This method mutates `object`.
|
|
10
|
+
*
|
|
11
|
+
* @param object - The object to modify.
|
|
12
|
+
* @param path - The path of the property to set.
|
|
13
|
+
* @param updater - The function to produce the updated value.
|
|
14
|
+
* @param customizer - The function to customize assigned values.
|
|
15
|
+
* @returns Returns `object`.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function _updateWith<T extends object>(object: T, path: _PropertyPath, updater: (oldValue: any) => any, customizer?: _SetWithCustomizer<T>): T;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function _updateWith<T extends object, TResult>(object: T, path: _PropertyPath, updater: (oldValue: any) => any, customizer?: _SetWithCustomizer<T>): TResult;
|
|
23
|
+
//# sourceMappingURL=updateWith.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateWith.d.ts","sourceRoot":"","sources":["../../src/_/updateWith.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EACxC,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,aAAa,EAEnB,OAAO,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,GAAG,EAC/B,UAAU,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GACnC,CAAC,CAAC;AACL;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EACjD,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,aAAa,EAEnB,OAAO,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,GAAG,EAC/B,UAAU,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GACnC,OAAO,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { _baseGet } from "./_baseGet.js";
|
|
33
|
+
import { _baseSet } from "./_baseSet.js";
|
|
34
|
+
export function _updateWith(object, path, updater, customizer) {
|
|
35
|
+
if (object == null) {
|
|
36
|
+
return object;
|
|
37
|
+
}
|
|
38
|
+
const produce = typeof updater === "function" ? updater : (value) => value;
|
|
39
|
+
const customize = typeof customizer === "function" ? customizer : undefined;
|
|
40
|
+
return _baseSet(object, path, produce(_baseGet(object, path)), customize);
|
|
41
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { _List } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates an array excluding all given values using SameValueZero for equality comparisons. The order and
|
|
4
|
+
* references of result values are determined by the input array, with `-0` normalised to `0`. Only an
|
|
5
|
+
* array-like object is inspected: any other `array` yields an empty array.
|
|
6
|
+
*
|
|
7
|
+
* **Note:** Unlike `_.pull`, this method returns a new array.
|
|
8
|
+
*
|
|
9
|
+
* @param array - The array to inspect.
|
|
10
|
+
* @param values - The values to exclude.
|
|
11
|
+
* @returns Returns the new array of filtered values.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function _without<T>(array: _List<T> | null | undefined, ...values: T[]): T[];
|
|
15
|
+
//# sourceMappingURL=without.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"without.d.ts","sourceRoot":"","sources":["../../src/_/without.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEnF"}
|