@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.
- package/NOTICE +4 -2
- 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 +18 -0
- package/esm/_/_baseDifference.d.ts.map +1 -0
- package/esm/_/_baseDifference.js +79 -0
- 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/_/clamp.d.ts +17 -0
- package/esm/_/clamp.d.ts.map +1 -0
- package/esm/_/clamp.js +56 -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/_/difference.d.ts.map +1 -1
- package/esm/_/difference.js +2 -23
- package/esm/_/differenceBy.d.ts +39 -0
- package/esm/_/differenceBy.d.ts.map +1 -0
- package/esm/_/differenceBy.js +40 -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/_/toNumber.d.ts +11 -0
- package/esm/_/toNumber.d.ts.map +1 -0
- package/esm/_/toNumber.js +69 -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/_/update.d.ts +17 -0
- package/esm/_/update.d.ts.map +1 -0
- package/esm/_/update.js +55 -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 +40 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +39 -2
- package/esm/util.d.ts +918 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersectionWith.d.ts","sourceRoot":"","sources":["../../src/_/intersectionWith.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,EACpC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EACnC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,EACjB,UAAU,EAAE,YAAY,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,GACtC,EAAE,EAAE,CAAC;AACR;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EACxC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EACnC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,EAClB,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,EAClB,UAAU,EAAE,YAAY,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,GAC3C,EAAE,EAAE,CAAC;AACR;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAC5C,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EACnC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,EAClB,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,EAClB,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAC/D,EAAE,EAAE,CAAC;AACR;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { _baseIntersection } from "./_baseIntersection.js";
|
|
33
|
+
export function _intersectionWith(...values) {
|
|
34
|
+
const last = values[values.length - 1];
|
|
35
|
+
const comparator = typeof last === "function" ? last : undefined;
|
|
36
|
+
const arrays = comparator ? values.slice(0, -1) : values;
|
|
37
|
+
return _baseIntersection(arrays, undefined, comparator);
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { _Dictionary } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates an object composed of the inverted keys and values of `object`. If `object` contains duplicate
|
|
4
|
+
* values, subsequent values overwrite property assignments of previous values. Only own enumerable string
|
|
5
|
+
* keyed properties are inverted. As in lodash, a value is coerced to a property key the way property
|
|
6
|
+
* assignment does it, except that a value without a callable `toString` (such as an object with a null
|
|
7
|
+
* prototype) becomes `[object Object]`; a symbol value becomes a symbol key.
|
|
8
|
+
*
|
|
9
|
+
* @param object - The object to invert.
|
|
10
|
+
* @returns Returns the new inverted object.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function _invert(object: object): _Dictionary<string>;
|
|
14
|
+
//# sourceMappingURL=invert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invert.d.ts","sourceRoot":"","sources":["../../src/_/invert.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAI9C;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAa3D"}
|
package/esm/_/invert.js
ADDED
|
@@ -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 { _keys } from "./keys.js";
|
|
33
|
+
const nativeObjectToString = Object.prototype.toString;
|
|
34
|
+
/**
|
|
35
|
+
* Creates an object composed of the inverted keys and values of `object`. If `object` contains duplicate
|
|
36
|
+
* values, subsequent values overwrite property assignments of previous values. Only own enumerable string
|
|
37
|
+
* keyed properties are inverted. As in lodash, a value is coerced to a property key the way property
|
|
38
|
+
* assignment does it, except that a value without a callable `toString` (such as an object with a null
|
|
39
|
+
* prototype) becomes `[object Object]`; a symbol value becomes a symbol key.
|
|
40
|
+
*
|
|
41
|
+
* @param object - The object to invert.
|
|
42
|
+
* @returns Returns the new inverted object.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export function _invert(object) {
|
|
46
|
+
const result = {};
|
|
47
|
+
const source = Object(object);
|
|
48
|
+
for (const key of _keys(object)) {
|
|
49
|
+
const value = source[key];
|
|
50
|
+
const hasToString = typeof value?.toString === "function";
|
|
51
|
+
const inverted = value == null || hasToString ? value : nativeObjectToString.call(value);
|
|
52
|
+
result[inverted] = key;
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`,
|
|
3
|
+
* `URIError` or `DOMException` object, or a non-plain object with string `message` and `name` properties.
|
|
4
|
+
* The raw tag is used, so a faked `Symbol.toStringTag` is ignored.
|
|
5
|
+
*
|
|
6
|
+
* @param value - The value to check.
|
|
7
|
+
* @returns Returns `true` if `value` is an error object, else `false`.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function _isError(value: unknown): value is Error;
|
|
11
|
+
//# sourceMappingURL=isError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isError.d.ts","sourceRoot":"","sources":["../../src/_/isError.ts"],"names":[],"mappings":"AAyCA;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAcvD"}
|
package/esm/_/isError.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 { _baseGetTag } from "./_baseGetTag.js";
|
|
33
|
+
import { _isObjectLike } from "./isObjectLike.js";
|
|
34
|
+
import { _isPlainObject } from "./isPlainObject.js";
|
|
35
|
+
/** `Object#toString` result references. */
|
|
36
|
+
const DOM_EXCEPTION_TAG = "[object DOMException]";
|
|
37
|
+
const ERROR_TAG = "[object Error]";
|
|
38
|
+
/**
|
|
39
|
+
* Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`,
|
|
40
|
+
* `URIError` or `DOMException` object, or a non-plain object with string `message` and `name` properties.
|
|
41
|
+
* The raw tag is used, so a faked `Symbol.toStringTag` is ignored.
|
|
42
|
+
*
|
|
43
|
+
* @param value - The value to check.
|
|
44
|
+
* @returns Returns `true` if `value` is an error object, else `false`.
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export function _isError(value) {
|
|
48
|
+
if (!_isObjectLike(value)) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
const tag = _baseGetTag(value);
|
|
52
|
+
if (tag === ERROR_TAG || tag === DOM_EXCEPTION_TAG) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
const { message, name } = value;
|
|
56
|
+
return typeof message === "string" && typeof name === "string" && !_isPlainObject(value);
|
|
57
|
+
}
|
package/esm/_/keys.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an array of the own enumerable string keys of `object`. Arrays, arguments objects and typed arrays
|
|
3
|
+
* list every index first, holes included, followed by their other own keys; other array-likes, strings
|
|
4
|
+
* included, list their own keys as they are. Non-object values are coerced to objects.
|
|
5
|
+
*
|
|
6
|
+
* @param object - The object to query.
|
|
7
|
+
* @returns Returns the array of property names.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function _keys(object: unknown): string[];
|
|
11
|
+
//# sourceMappingURL=keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/_/keys.ts"],"names":[],"mappings":"AAuCA;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAiB/C"}
|
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"}
|