@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
package/esm/_/clone.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a shallow clone of `value`: arrays, plain objects, arguments objects, dates, regexps, maps, sets,
|
|
3
|
+
* typed arrays, array buffers, data views and boxed primitives are copied one level, with nested values
|
|
4
|
+
* kept by reference. An empty object is returned for uncloneable values such as functions, errors and
|
|
5
|
+
* weak collections.
|
|
6
|
+
*
|
|
7
|
+
* @param value - The value to clone.
|
|
8
|
+
* @returns Returns the cloned value.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function _clone<T>(value: T): T;
|
|
12
|
+
//# sourceMappingURL=clone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../src/_/clone.ts"],"names":[],"mappings":"AAmCA;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAErC"}
|
package/esm/_/clone.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
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 { _baseClone } from "./_baseClone.js";
|
|
33
|
+
/**
|
|
34
|
+
* Creates a shallow clone of `value`: arrays, plain objects, arguments objects, dates, regexps, maps, sets,
|
|
35
|
+
* typed arrays, array buffers, data views and boxed primitives are copied one level, with nested values
|
|
36
|
+
* kept by reference. An empty object is returned for uncloneable values such as functions, errors and
|
|
37
|
+
* weak collections.
|
|
38
|
+
*
|
|
39
|
+
* @param value - The value to clone.
|
|
40
|
+
* @returns Returns the cloned value.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export function _clone(value) {
|
|
44
|
+
return _baseClone(value, false);
|
|
45
|
+
}
|
package/esm/_/cloneDeep.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { _CloneDeepWithCustomizer } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* This method is like `_cloneDeep` except that it accepts `customizer` which is invoked to produce the
|
|
4
|
+
* cloned value. If `customizer` returns `undefined`, cloning is handled by the method instead. The
|
|
5
|
+
* `customizer` is invoked with up to four arguments: (value [, index|key, object, stack]). Anything but
|
|
6
|
+
* a function is ignored as a customizer.
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to recursively clone.
|
|
9
|
+
* @param customizer - The function to customize cloning.
|
|
10
|
+
* @returns Returns the deep cloned value.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function _cloneDeepWith<T>(value: T, customizer: _CloneDeepWithCustomizer<T>): any;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function _cloneDeepWith<T>(value: T): T;
|
|
18
|
+
//# sourceMappingURL=cloneDeepWith.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloneDeepWith.d.ts","sourceRoot":"","sources":["../../src/_/cloneDeepWith.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D;;;;;;;;;;GAUG;AAEH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC1F;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -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 { _baseClone } from "./_baseClone.js";
|
|
33
|
+
export function _cloneDeepWith(value, customizer) {
|
|
34
|
+
const customize = typeof customizer === "function" ? customizer : undefined;
|
|
35
|
+
return _baseClone(value, true, customize);
|
|
36
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 returns `value`, by reference, on every call, ignoring its arguments and `this`.
|
|
33
|
+
*
|
|
34
|
+
* @param value - The value to return from the new function.
|
|
35
|
+
* @returns Returns the new constant function.
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare function _constant<T>(value: T): () => T;
|
|
39
|
+
//# sourceMappingURL=constant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/_/constant.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAI9C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
/*!
|
|
3
|
+
* Portions of this file are derived from Lodash.
|
|
4
|
+
* https://github.com/lodash/lodash
|
|
5
|
+
*
|
|
6
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
7
|
+
*
|
|
8
|
+
* Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
9
|
+
* DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
10
|
+
*
|
|
11
|
+
* Modifications Copyright (c) 2026 GoodData Corporation
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
+
* a copy of this software and associated documentation files (the
|
|
15
|
+
* "Software"), to deal in the Software without restriction, including
|
|
16
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
+
* the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be
|
|
22
|
+
* included in all copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
27
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
28
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
29
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Creates a function that returns `value`, by reference, on every call, ignoring its arguments and `this`.
|
|
34
|
+
*
|
|
35
|
+
* @param value - The value to return from the new function.
|
|
36
|
+
* @returns Returns the new constant function.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export function _constant(value) {
|
|
40
|
+
return function () {
|
|
41
|
+
return value;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assigns own and inherited enumerable string keyed properties of source objects to the destination object
|
|
3
|
+
* for all destination properties that resolve to `undefined`. Source objects are applied from left to
|
|
4
|
+
* right, so once a property is set, additional values of the same property are ignored. A value inherited
|
|
5
|
+
* from `Object.prototype`, such as `toString`, counts as missing too. Sources are copied by plain
|
|
6
|
+
* assignment, a nullish destination becomes a new object and a primitive one is boxed.
|
|
7
|
+
*
|
|
8
|
+
* **Note:** This method mutates `object`.
|
|
9
|
+
*
|
|
10
|
+
* @param object - The destination object.
|
|
11
|
+
* @param sources - The source objects.
|
|
12
|
+
* @returns Returns `object`.
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function _defaults<TObject, TSource>(object: TObject, source: TSource): NonNullable<TSource & TObject>;
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function _defaults<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): NonNullable<TSource2 & TSource1 & TObject>;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function _defaults<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): NonNullable<TSource3 & TSource2 & TSource1 & TObject>;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare function _defaults<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & TObject>;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function _defaults<TObject>(object: TObject): NonNullable<TObject>;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare function _defaults(object: any, ...sources: any[]): any;
|
|
36
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/_/defaults.ts"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC;AAC9G;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EACjD,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,GAClB,WAAW,CAAC,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;AAC9C;;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,WAAW,CAAC,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;AACzD;;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,WAAW,CAAC,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;AACpE;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AAC1E;;GAEG;AAEH,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 { _isIterateeCall } from "./_isIterateeCall.js";
|
|
33
|
+
import { _eq } from "./eq.js";
|
|
34
|
+
import { _keysIn } from "./keysIn.js";
|
|
35
|
+
const objectProto = Object.prototype;
|
|
36
|
+
export function _defaults(object, ...sources) {
|
|
37
|
+
const target = Object(object);
|
|
38
|
+
// when called as an iteratee, e.g. by `reduce`, only the value is a source, not the index and collection
|
|
39
|
+
const length = sources.length > 2 && _isIterateeCall(sources[0], sources[1], sources[2]) ? 1 : sources.length;
|
|
40
|
+
for (let index = 0; index < length; index++) {
|
|
41
|
+
const source = sources[index];
|
|
42
|
+
const from = Object(source);
|
|
43
|
+
for (const key of _keysIn(source)) {
|
|
44
|
+
const value = target[key];
|
|
45
|
+
if (value === undefined || (_eq(value, objectProto[key]) && !Object.hasOwn(target, key))) {
|
|
46
|
+
target[key] = from[key];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return target;
|
|
51
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"difference.d.ts","sourceRoot":"","sources":["../../src/_/difference.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"difference.d.ts","sourceRoot":"","sources":["../../src/_/difference.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAE7F"}
|
package/esm/_/difference.js
CHANGED
|
@@ -29,8 +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 {
|
|
33
|
-
import { _isObjectLike } from "./isObjectLike.js";
|
|
32
|
+
import { _baseDifference } from "./_baseDifference.js";
|
|
34
33
|
/**
|
|
35
34
|
* Creates an array of `array` values not included in the other given arrays using SameValueZero for equality
|
|
36
35
|
* comparisons. The order and references of result values are determined by the first array. Only array-like
|
|
@@ -43,25 +42,5 @@ import { _isObjectLike } from "./isObjectLike.js";
|
|
|
43
42
|
* @internal
|
|
44
43
|
*/
|
|
45
44
|
export function _difference(array, ...values) {
|
|
46
|
-
|
|
47
|
-
return [];
|
|
48
|
-
}
|
|
49
|
-
const excluded = new Set();
|
|
50
|
-
for (const list of values) {
|
|
51
|
-
if (!_isObjectLike(list) || !_isArrayLike(list)) {
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
for (let index = 0; index < list.length; index++) {
|
|
55
|
-
excluded.add(list[index]);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const result = [];
|
|
59
|
-
for (let index = 0; index < array.length; index++) {
|
|
60
|
-
const value = array[index];
|
|
61
|
-
if (!excluded.has(value)) {
|
|
62
|
-
// lodash normalises `-0` to `+0` in the result
|
|
63
|
-
result.push(value === 0 ? 0 : value);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return result;
|
|
45
|
+
return _baseDifference(array, values);
|
|
67
46
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { _List, _ValueIteratee } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* This method is like `_difference` except that it accepts `iteratee` which is invoked for each element of
|
|
4
|
+
* `array` and `values` to generate the criterion by which they're compared. The order and references of
|
|
5
|
+
* result values are determined by the first array. The iteratee is invoked with one argument: (value).
|
|
6
|
+
* The iteratee is the last argument unless that argument is array-like, in which case it is one more list of
|
|
7
|
+
* values and the elements are compared as they are.
|
|
8
|
+
*
|
|
9
|
+
* @param array - The array to inspect.
|
|
10
|
+
* @param values - The values to exclude, followed by the iteratee.
|
|
11
|
+
* @returns Returns the new array of filtered values.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function _differenceBy<T1, T2>(array: _List<T1> | null | undefined, values: _List<T2>, iteratee: _ValueIteratee<T1 | T2>): T1[];
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function _differenceBy<T1, T2, T3>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, iteratee: _ValueIteratee<T1 | T2 | T3>): T1[];
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function _differenceBy<T1, T2, T3, T4>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, values3: _List<T4>, iteratee: _ValueIteratee<T1 | T2 | T3 | T4>): T1[];
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function _differenceBy<T1, T2, T3, T4, T5>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, values3: _List<T4>, values4: _List<T5>, iteratee: _ValueIteratee<T1 | T2 | T3 | T4 | T5>): T1[];
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare function _differenceBy<T1, T2, T3, T4, T5, T6>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, values3: _List<T4>, values4: _List<T5>, values5: _List<T6>, iteratee: _ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6>): T1[];
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare function _differenceBy<T1, T2, T3, T4, T5, T6, T7>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, values3: _List<T4>, values4: _List<T5>, values5: _List<T6>, ...values: (_List<T7> | _ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6 | T7>)[]): T1[];
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare function _differenceBy<T>(array: _List<T> | null | undefined, ...values: _List<T>[]): T[];
|
|
39
|
+
//# sourceMappingURL=differenceBy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"differenceBy.d.ts","sourceRoot":"","sources":["../../src/_/differenceBy.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { _baseDifference } from "./_baseDifference.js";
|
|
33
|
+
import { _baseIteratee } from "./_baseIteratee.js";
|
|
34
|
+
import { _isArrayLike } from "./isArrayLike.js";
|
|
35
|
+
import { _isObjectLike } from "./isObjectLike.js";
|
|
36
|
+
export function _differenceBy(array, ...values) {
|
|
37
|
+
const last = values[values.length - 1];
|
|
38
|
+
const iteratee = _isObjectLike(last) && _isArrayLike(last) ? undefined : last;
|
|
39
|
+
return _baseDifference(array, values, _baseIteratee(iteratee));
|
|
40
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { _Comparator2, _List } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* This method is like `_difference` except that it accepts `comparator` which is invoked to compare elements
|
|
4
|
+
* of `array` to `values`. The order and references of result values are determined by the first array. The
|
|
5
|
+
* comparator is invoked with two arguments: (arrVal, othVal). As in lodash, the last argument is taken as
|
|
6
|
+
* the comparator unless it is an array-like object, and `-0` is not normalised when a comparator is used.
|
|
7
|
+
*
|
|
8
|
+
* @param array - The array to inspect.
|
|
9
|
+
* @param values - The values to exclude.
|
|
10
|
+
* @param comparator - The comparator invoked per element.
|
|
11
|
+
* @returns Returns the new array of filtered values.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function _differenceWith<T1, T2>(array: _List<T1> | null | undefined, values: _List<T2>, comparator: _Comparator2<T1, T2>): T1[];
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function _differenceWith<T1, T2, T3>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, comparator: _Comparator2<T1, T2 | T3>): T1[];
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function _differenceWith<T1, T2, T3, T4>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, ...values: (_List<T4> | _Comparator2<T1, T2 | T3 | T4>)[]): T1[];
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function _differenceWith<T>(array: _List<T> | null | undefined, ...values: _List<T>[]): T[];
|
|
27
|
+
//# sourceMappingURL=differenceWith.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"differenceWith.d.ts","sourceRoot":"","sources":["../../src/_/differenceWith.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,EAAE,EAClC,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,CAAC,GACjC,EAAE,EAAE,CAAC;AACR;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EACtC,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,CAAC,GACtC,EAAE,EAAE,CAAC;AACR;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAC1C,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,CAAC,CAAC,EAAE,GAC1D,EAAE,EAAE,CAAC;AACR;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { _baseDifference } from "./_baseDifference.js";
|
|
33
|
+
import { _isArrayLike } from "./isArrayLike.js";
|
|
34
|
+
import { _isObjectLike } from "./isObjectLike.js";
|
|
35
|
+
export function _differenceWith(array, ...values) {
|
|
36
|
+
const last = values[values.length - 1];
|
|
37
|
+
const comparator = _isObjectLike(last) && _isArrayLike(last) ? undefined : last;
|
|
38
|
+
return _baseDifference(array, values, undefined, comparator);
|
|
39
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { _List, _ListIteratee } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a slice of `array` excluding elements dropped from the end. Elements are dropped until
|
|
4
|
+
* `predicate` returns falsey. The predicate is invoked with three arguments: (value, index, array), and may
|
|
5
|
+
* be an iteratee shorthand; it defaults to the identity. The result is a new dense array.
|
|
6
|
+
*
|
|
7
|
+
* @param array - The array to query.
|
|
8
|
+
* @param predicate - The function invoked per iteration.
|
|
9
|
+
* @returns Returns the slice of `array`.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function _dropRightWhile<T>(array: _List<T> | null | undefined, predicate?: _ListIteratee<T>): T[];
|
|
13
|
+
//# sourceMappingURL=dropRightWhile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropRightWhile.d.ts","sourceRoot":"","sources":["../../src/_/dropRightWhile.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAaxG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { _baseSlice } from "./_baseSlice.js";
|
|
34
|
+
/**
|
|
35
|
+
* Creates a slice of `array` excluding elements dropped from the end. Elements are dropped until
|
|
36
|
+
* `predicate` returns falsey. The predicate is invoked with three arguments: (value, index, array), and may
|
|
37
|
+
* be an iteratee shorthand; it defaults to the identity. The result is a new dense array.
|
|
38
|
+
*
|
|
39
|
+
* @param array - The array to query.
|
|
40
|
+
* @param predicate - The function invoked per iteration.
|
|
41
|
+
* @returns Returns the slice of `array`.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export function _dropRightWhile(array, predicate) {
|
|
45
|
+
if (!array?.length) {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
const test = _baseIteratee(predicate);
|
|
49
|
+
let index = array.length - 1;
|
|
50
|
+
while (index >= 0 && test(array[index], index, array)) {
|
|
51
|
+
index--;
|
|
52
|
+
}
|
|
53
|
+
return _baseSlice(array, 0, index + 1);
|
|
54
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Escapes the `RegExp` special characters `^`, `$`, `\`, `.`, `*`, `+`, `?`, `(`, `)`, `[`, `]`, `{`, `}`
|
|
3
|
+
* and `|` in `string`, so the result matches the input literally when used in a pattern.
|
|
4
|
+
*
|
|
5
|
+
* **Note:** Unlike the `escapeRegExp` in `stringUtils`, `/` is not escaped, matching lodash.
|
|
6
|
+
*
|
|
7
|
+
* @param string - The string to escape.
|
|
8
|
+
* @returns Returns the escaped string.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function _escapeRegExp(string?: string): string;
|
|
12
|
+
//# sourceMappingURL=escapeRegExp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escapeRegExp.d.ts","sourceRoot":"","sources":["../../src/_/escapeRegExp.ts"],"names":[],"mappings":"AAsCA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD"}
|