@gooddata/util 11.68.0-alpha.1 → 11.68.0-alpha.10
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/LICENSE +1 -1
- package/NOTICE +179 -0
- package/esm/_/_assignValue.d.ts +12 -0
- package/esm/_/_assignValue.d.ts.map +1 -0
- package/esm/_/_assignValue.js +49 -0
- package/esm/_/_baseAssignValue.d.ts +41 -0
- package/esm/_/_baseAssignValue.d.ts.map +1 -0
- package/esm/_/_baseAssignValue.js +48 -0
- package/esm/_/_baseClone.d.ts +28 -0
- package/esm/_/_baseClone.d.ts.map +1 -0
- package/esm/_/_baseClone.js +229 -0
- package/esm/_/_baseDifference.d.ts +18 -0
- package/esm/_/_baseDifference.d.ts.map +1 -0
- package/esm/_/_baseDifference.js +79 -0
- package/esm/_/_baseEach.d.ts +11 -0
- package/esm/_/_baseEach.d.ts.map +1 -0
- package/esm/_/_baseEach.js +62 -0
- package/esm/_/_baseExtremum.d.ts +15 -0
- package/esm/_/_baseExtremum.d.ts.map +1 -0
- package/esm/_/_baseExtremum.js +64 -0
- package/esm/_/_baseGet.d.ts +10 -0
- package/esm/_/_baseGet.d.ts.map +1 -0
- package/esm/_/_baseGet.js +50 -0
- package/esm/_/_baseGetTag.d.ts +9 -0
- package/esm/_/_baseGetTag.d.ts.map +1 -0
- package/esm/_/_baseGetTag.js +48 -0
- package/esm/_/_baseIntersection.d.ts +19 -0
- package/esm/_/_baseIntersection.d.ts.map +1 -0
- package/esm/_/_baseIntersection.js +91 -0
- package/esm/_/_baseIsEqual.d.ts +34 -0
- package/esm/_/_baseIsEqual.d.ts.map +1 -0
- package/esm/_/_baseIsEqual.js +278 -0
- package/esm/_/_baseIsMatch.d.ts +13 -0
- package/esm/_/_baseIsMatch.d.ts.map +1 -0
- package/esm/_/_baseIsMatch.js +67 -0
- package/esm/_/_baseIteratee.d.ts +15 -0
- package/esm/_/_baseIteratee.d.ts.map +1 -0
- package/esm/_/_baseIteratee.js +65 -0
- package/esm/_/_baseKeys.d.ts +12 -0
- package/esm/_/_baseKeys.d.ts.map +1 -0
- package/esm/_/_baseKeys.js +46 -0
- package/esm/_/_baseMatches.d.ts +10 -0
- package/esm/_/_baseMatches.d.ts.map +1 -0
- package/esm/_/_baseMatches.js +50 -0
- package/esm/_/_baseMatchesProperty.d.ts +11 -0
- package/esm/_/_baseMatchesProperty.d.ts.map +1 -0
- package/esm/_/_baseMatchesProperty.js +59 -0
- package/esm/_/_baseMerge.d.ts +19 -0
- package/esm/_/_baseMerge.d.ts.map +1 -0
- package/esm/_/_baseMerge.js +146 -0
- package/esm/_/_baseOrderBy.d.ts +11 -0
- package/esm/_/_baseOrderBy.d.ts.map +1 -0
- package/esm/_/_baseOrderBy.js +70 -0
- package/esm/_/_basePickBy.d.ts +14 -0
- package/esm/_/_basePickBy.d.ts.map +1 -0
- package/esm/_/_basePickBy.js +57 -0
- package/esm/_/_baseSet.d.ts +13 -0
- package/esm/_/_baseSet.d.ts.map +1 -0
- package/esm/_/_baseSet.js +74 -0
- 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/_/_baseUniq.d.ts +43 -0
- package/esm/_/_baseUniq.d.ts.map +1 -0
- package/esm/_/_baseUniq.js +57 -0
- package/esm/_/_baseUnset.d.ts +13 -0
- package/esm/_/_baseUnset.d.ts.map +1 -0
- package/esm/_/_baseUnset.js +62 -0
- package/esm/_/_castPath.d.ts +10 -0
- package/esm/_/_castPath.d.ts.map +1 -0
- package/esm/_/_castPath.js +48 -0
- package/esm/_/_cloneArrayBuffer.d.ts +39 -0
- package/esm/_/_cloneArrayBuffer.d.ts.map +1 -0
- package/esm/_/_cloneArrayBuffer.js +45 -0
- package/esm/_/_cloneTypedArray.d.ts +10 -0
- package/esm/_/_cloneTypedArray.d.ts.map +1 -0
- package/esm/_/_cloneTypedArray.js +50 -0
- package/esm/_/_compareAscending.d.ts +12 -0
- package/esm/_/_compareAscending.d.ts.map +1 -0
- package/esm/_/_compareAscending.js +78 -0
- package/esm/_/_createCompounder.d.ts +11 -0
- package/esm/_/_createCompounder.d.ts.map +1 -0
- package/esm/_/_createCompounder.js +47 -0
- package/esm/_/_flattenArrayLikeObjects.d.ts +11 -0
- package/esm/_/_flattenArrayLikeObjects.d.ts.map +1 -0
- package/esm/_/_flattenArrayLikeObjects.js +55 -0
- package/esm/_/_getAllKeys.d.ts +9 -0
- package/esm/_/_getAllKeys.d.ts.map +1 -0
- package/esm/_/_getAllKeys.js +43 -0
- package/esm/_/_getAllKeysIn.d.ts +12 -0
- package/esm/_/_getAllKeysIn.d.ts.map +1 -0
- package/esm/_/_getAllKeysIn.js +59 -0
- package/esm/_/_getMatchData.d.ts +16 -0
- package/esm/_/_getMatchData.d.ts.map +1 -0
- package/esm/_/_getMatchData.js +46 -0
- package/esm/_/_getRawTag.d.ts +43 -0
- package/esm/_/_getRawTag.d.ts.map +1 -0
- package/esm/_/_getRawTag.js +65 -0
- package/esm/_/_hasPath.d.ts +13 -0
- package/esm/_/_hasPath.d.ts.map +1 -0
- package/esm/_/_hasPath.js +70 -0
- package/esm/_/_initCloneObject.d.ts +10 -0
- package/esm/_/_initCloneObject.d.ts.map +1 -0
- package/esm/_/_initCloneObject.js +48 -0
- package/esm/_/_isIndex.d.ts +11 -0
- package/esm/_/_isIndex.d.ts.map +1 -0
- package/esm/_/_isIndex.js +51 -0
- package/esm/_/_isIterateeCall.d.ts +13 -0
- package/esm/_/_isIterateeCall.d.ts.map +1 -0
- package/esm/_/_isIterateeCall.js +55 -0
- package/esm/_/_isKey.d.ts +12 -0
- package/esm/_/_isKey.d.ts.map +1 -0
- package/esm/_/_isKey.js +58 -0
- package/esm/_/_isPrototype.d.ts +39 -0
- package/esm/_/_isPrototype.d.ts.map +1 -0
- package/esm/_/_isPrototype.js +43 -0
- package/esm/_/_isStrictComparable.d.ts +9 -0
- package/esm/_/_isStrictComparable.d.ts.map +1 -0
- package/esm/_/_isStrictComparable.js +42 -0
- package/esm/_/_matchesStrictComparable.d.ts +41 -0
- package/esm/_/_matchesStrictComparable.d.ts.map +1 -0
- package/esm/_/_matchesStrictComparable.js +50 -0
- package/esm/_/_stringToPath.d.ts +10 -0
- package/esm/_/_stringToPath.d.ts.map +1 -0
- package/esm/_/_stringToPath.js +64 -0
- package/esm/_/_toKey.d.ts +9 -0
- package/esm/_/_toKey.d.ts.map +1 -0
- package/esm/_/_toKey.js +46 -0
- package/esm/_/_unicode.d.ts +27 -0
- package/esm/_/_unicode.d.ts.map +1 -0
- package/esm/_/_unicode.js +120 -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/_/camelCase.d.ts +10 -0
- package/esm/_/camelCase.d.ts.map +1 -0
- package/esm/_/camelCase.js +45 -0
- package/esm/_/capitalize.d.ts +9 -0
- package/esm/_/capitalize.d.ts.map +1 -0
- package/esm/_/capitalize.js +43 -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.d.ts +14 -0
- package/esm/_/cloneDeep.d.ts.map +1 -0
- package/esm/_/cloneDeep.js +47 -0
- package/esm/_/cloneDeepWith.d.ts +18 -0
- package/esm/_/cloneDeepWith.d.ts.map +1 -0
- package/esm/_/cloneDeepWith.js +36 -0
- package/esm/_/compact.d.ts +46 -0
- package/esm/_/compact.d.ts.map +1 -0
- package/esm/_/compact.js +23 -0
- package/esm/_/constant.d.ts +39 -0
- package/esm/_/constant.d.ts.map +1 -0
- package/esm/_/constant.js +43 -0
- package/esm/_/debounce.d.ts +70 -0
- package/esm/_/debounce.d.ts.map +1 -0
- package/esm/_/debounce.js +136 -0
- package/esm/_/deburr.d.ts +10 -0
- package/esm/_/deburr.d.ts.map +1 -0
- package/esm/_/deburr.js +243 -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 +14 -0
- package/esm/_/difference.d.ts.map +1 -0
- package/esm/_/difference.js +46 -0
- 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/_/eq.d.ts +41 -0
- package/esm/_/eq.d.ts.map +1 -0
- package/esm/_/eq.js +43 -0
- package/esm/_/escape.d.ts +13 -0
- package/esm/_/escape.d.ts.map +1 -0
- package/esm/_/escape.js +56 -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/_/groupBy.d.ts +19 -0
- package/esm/_/groupBy.d.ts.map +1 -0
- package/esm/_/groupBy.js +49 -0
- package/esm/_/has.d.ts +23 -0
- package/esm/_/has.d.ts.map +1 -0
- package/esm/_/has.js +35 -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/_/isArguments.d.ts +9 -0
- package/esm/_/isArguments.d.ts.map +1 -0
- package/esm/_/isArguments.js +45 -0
- package/esm/_/isArray.d.ts +61 -0
- package/esm/_/isArray.d.ts.map +1 -0
- package/esm/_/isArray.js +62 -0
- package/esm/_/isArrayLike.d.ts +25 -0
- package/esm/_/isArrayLike.d.ts.map +1 -0
- package/esm/_/isArrayLike.js +35 -0
- package/esm/_/isEmpty.d.ts +49 -0
- package/esm/_/isEmpty.d.ts.map +1 -0
- package/esm/_/isEmpty.js +57 -0
- package/esm/_/isEqual.d.ts +15 -0
- package/esm/_/isEqual.d.ts.map +1 -0
- package/esm/_/isEqual.js +48 -0
- package/esm/_/isError.d.ts +11 -0
- package/esm/_/isError.d.ts.map +1 -0
- package/esm/_/isError.js +57 -0
- package/esm/_/isLength.d.ts +41 -0
- package/esm/_/isLength.d.ts.map +1 -0
- package/esm/_/isLength.js +43 -0
- package/esm/_/isObject.d.ts +40 -0
- package/esm/_/isObject.d.ts.map +1 -0
- package/esm/_/isObject.js +42 -0
- package/esm/_/isObjectLike.d.ts +40 -0
- package/esm/_/isObjectLike.d.ts.map +1 -0
- package/esm/_/isObjectLike.js +42 -0
- package/esm/_/isPlainObject.d.ts +10 -0
- package/esm/_/isPlainObject.d.ts.map +1 -0
- package/esm/_/isPlainObject.js +58 -0
- package/esm/_/isSymbol.d.ts +9 -0
- package/esm/_/isSymbol.d.ts.map +1 -0
- package/esm/_/isSymbol.js +45 -0
- package/esm/_/isTypedArray.d.ts +43 -0
- package/esm/_/isTypedArray.d.ts.map +1 -0
- package/esm/_/isTypedArray.js +45 -0
- package/esm/_/kebabCase.d.ts +9 -0
- package/esm/_/kebabCase.d.ts.map +1 -0
- package/esm/_/kebabCase.js +40 -0
- package/esm/_/keyBy.d.ts +17 -0
- package/esm/_/keyBy.d.ts.map +1 -0
- package/esm/_/keyBy.js +43 -0
- package/esm/_/keys.d.ts +11 -0
- package/esm/_/keys.d.ts.map +1 -0
- package/esm/_/keys.js +60 -0
- package/esm/_/keysIn.d.ts +10 -0
- package/esm/_/keysIn.d.ts.map +1 -0
- package/esm/_/keysIn.js +54 -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/_/memoize.d.ts +89 -0
- package/esm/_/memoize.d.ts.map +1 -0
- package/esm/_/memoize.js +36 -0
- package/esm/_/merge.d.ts +32 -0
- package/esm/_/merge.d.ts.map +1 -0
- package/esm/_/merge.js +45 -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/_/omit.d.ts +27 -0
- package/esm/_/omit.d.ts.map +1 -0
- package/esm/_/omit.js +76 -0
- package/esm/_/omitBy.d.ts +21 -0
- package/esm/_/omitBy.d.ts.map +1 -0
- package/esm/_/omitBy.js +37 -0
- package/esm/_/partial.d.ts +87 -0
- package/esm/_/partial.d.ts.map +1 -0
- package/esm/_/partial.js +30 -0
- package/esm/_/partition.d.ts +23 -0
- package/esm/_/partition.d.ts.map +1 -0
- package/esm/_/partition.js +42 -0
- package/esm/_/pick.d.ts +18 -0
- package/esm/_/pick.d.ts.map +1 -0
- package/esm/_/pick.js +48 -0
- package/esm/_/pickBy.d.ts +21 -0
- package/esm/_/pickBy.d.ts.map +1 -0
- package/esm/_/pickBy.js +36 -0
- package/esm/_/range.d.ts +24 -0
- package/esm/_/range.d.ts.map +1 -0
- package/esm/_/range.js +56 -0
- package/esm/_/reduce.d.ts +37 -0
- package/esm/_/reduce.d.ts.map +1 -0
- package/esm/_/reduce.js +48 -0
- package/esm/_/set.d.ts +25 -0
- package/esm/_/set.d.ts.map +1 -0
- package/esm/_/set.js +35 -0
- package/esm/_/sortBy.d.ts +17 -0
- package/esm/_/sortBy.d.ts.map +1 -0
- package/esm/_/sortBy.js +46 -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/_/throttle.d.ts +76 -0
- package/esm/_/throttle.d.ts.map +1 -0
- package/esm/_/throttle.js +45 -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 +10 -0
- package/esm/_/toFinite.d.ts.map +1 -0
- package/esm/_/toFinite.js +50 -0
- 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/_/toString.d.ts +11 -0
- package/esm/_/toString.d.ts.map +1 -0
- package/esm/_/toString.js +57 -0
- package/esm/_/types.d.ts +181 -0
- package/esm/_/types.d.ts.map +1 -0
- package/esm/_/types.js +2 -0
- 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 +11 -0
- package/esm/_/union.d.ts.map +1 -0
- package/esm/_/union.js +44 -0
- package/esm/_/unionBy.d.ts +34 -0
- package/esm/_/unionBy.d.ts.map +1 -0
- package/esm/_/unionBy.js +42 -0
- package/esm/_/uniq.d.ts +12 -0
- package/esm/_/uniq.d.ts.map +1 -0
- package/esm/_/uniq.js +47 -0
- package/esm/_/uniqBy.d.ts +13 -0
- package/esm/_/uniqBy.d.ts.map +1 -0
- package/esm/_/uniqBy.js +49 -0
- package/esm/_/uniqWith.d.ts +14 -0
- package/esm/_/uniqWith.d.ts.map +1 -0
- package/esm/_/uniqWith.js +59 -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/_/upperFirst.d.ts +10 -0
- package/esm/_/upperFirst.d.ts.map +1 -0
- package/esm/_/upperFirst.js +46 -0
- package/esm/_/without.d.ts +15 -0
- package/esm/_/without.d.ts.map +1 -0
- package/esm/_/without.js +47 -0
- package/esm/_/words.d.ts +9 -0
- package/esm/_/words.d.ts.map +1 -0
- package/esm/_/words.js +50 -0
- package/esm/_/zip.d.ts +28 -0
- package/esm/_/zip.d.ts.map +1 -0
- package/esm/_/zip.js +38 -0
- package/esm/index.d.ts +69 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +69 -0
- package/esm/util.d.ts +1870 -67
- package/package.json +5 -4
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
/*!
|
|
3
|
+
* Portions of this file are derived from Lodash.
|
|
4
|
+
* https://github.com/lodash/lodash
|
|
5
|
+
*
|
|
6
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
7
|
+
*
|
|
8
|
+
* Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
9
|
+
* DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
10
|
+
*
|
|
11
|
+
* Modifications Copyright (c) 2026 GoodData Corporation
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
+
* a copy of this software and associated documentation files (the
|
|
15
|
+
* "Software"), to deal in the Software without restriction, including
|
|
16
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
+
* the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be
|
|
22
|
+
* included in all copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
27
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
28
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
29
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
import { _isArrayLike } from "./isArrayLike.js";
|
|
33
|
+
import { _isObjectLike } from "./isObjectLike.js";
|
|
34
|
+
/**
|
|
35
|
+
* The base implementation of `_difference`, `_differenceBy` and `_differenceWith`: creates an array of the
|
|
36
|
+
* `array` values whose criteria are not among the criteria of the `values` lists, compared with
|
|
37
|
+
* SameValueZero, or with `comparator` when one is given. The order and references of result values are
|
|
38
|
+
* determined by the first array, with `-0` normalised to `0` unless a comparator is used. Only array-like
|
|
39
|
+
* objects are inspected: any other `array` yields an empty array and any other entry of `values` is skipped.
|
|
40
|
+
*
|
|
41
|
+
* @param array - The array to inspect.
|
|
42
|
+
* @param values - The lists of values to exclude.
|
|
43
|
+
* @param iteratee - The iteratee invoked per element to produce its criterion. Defaults to identity.
|
|
44
|
+
* @param comparator - The comparator invoked per element with (arrayValue, otherValue); a truthy result
|
|
45
|
+
* excludes the element.
|
|
46
|
+
* @returns Returns the new array of filtered values.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export function _baseDifference(array, values, iteratee = (value) => value, comparator) {
|
|
50
|
+
if (!_isObjectLike(array) || !_isArrayLike(array)) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
const excluded = [];
|
|
54
|
+
for (const list of values) {
|
|
55
|
+
if (!_isObjectLike(list) || !_isArrayLike(list)) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
for (let index = 0; index < list.length; index++) {
|
|
59
|
+
excluded.push(iteratee(list[index]));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const excludedSet = new Set(excluded);
|
|
63
|
+
const result = [];
|
|
64
|
+
for (let index = 0; index < array.length; index++) {
|
|
65
|
+
const value = array[index];
|
|
66
|
+
const computed = iteratee(value);
|
|
67
|
+
if (comparator) {
|
|
68
|
+
// lodash keeps `-0` as it is when a comparator is used
|
|
69
|
+
if (!excluded.some((other) => comparator(computed, other))) {
|
|
70
|
+
result.push(value);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else if (!excludedSet.has(computed)) {
|
|
74
|
+
// lodash normalises `-0` to `+0` in the result
|
|
75
|
+
result.push(value === 0 ? 0 : value);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The base implementation of `forEach` without support for iteratee shorthands: visits every element
|
|
3
|
+
* of an array-like by index, holes included, or every own enumerable value of an object by key. The
|
|
4
|
+
* iteratee may stop the iteration early by returning `false`.
|
|
5
|
+
*
|
|
6
|
+
* @param collection - The collection to iterate over.
|
|
7
|
+
* @param iteratee - The function invoked per iteration with the value, its index or key, and the collection.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function _baseEach(collection: unknown, iteratee: (value: unknown, key: string | number, collection: object) => unknown): void;
|
|
11
|
+
//# sourceMappingURL=_baseEach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_baseEach.d.ts","sourceRoot":"","sources":["../../src/_/_baseEach.ts"],"names":[],"mappings":"AAoCA;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CACrB,UAAU,EAAE,OAAO,EACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,GAChF,IAAI,CAwBN"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 { _isArrayLike } from "./isArrayLike.js";
|
|
34
|
+
/**
|
|
35
|
+
* The base implementation of `forEach` without support for iteratee shorthands: visits every element
|
|
36
|
+
* of an array-like by index, holes included, or every own enumerable value of an object by key. The
|
|
37
|
+
* iteratee may stop the iteration early by returning `false`.
|
|
38
|
+
*
|
|
39
|
+
* @param collection - The collection to iterate over.
|
|
40
|
+
* @param iteratee - The function invoked per iteration with the value, its index or key, and the collection.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export function _baseEach(collection, iteratee) {
|
|
44
|
+
if (collection == null) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const iterable = Object(collection);
|
|
48
|
+
if (_isArrayLike(collection)) {
|
|
49
|
+
const length = collection.length;
|
|
50
|
+
for (let index = 0; index < length; index++) {
|
|
51
|
+
if (iteratee(iterable[index], index, iterable) === false) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
for (const key of _baseKeys(iterable)) {
|
|
58
|
+
if (iteratee(iterable[key], key, iterable) === false) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { _List } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The base implementation of methods like `_max` and `_min` which accepts a `comparator` to determine the
|
|
4
|
+
* extremum value. Elements whose criterion is nullish, `NaN` or a symbol never seed the result; once a
|
|
5
|
+
* result is seeded every later criterion is passed to the comparator. The `length` of `array` is used as
|
|
6
|
+
* is, as in lodash.
|
|
7
|
+
*
|
|
8
|
+
* @param array - The array to iterate over.
|
|
9
|
+
* @param iteratee - The iteratee invoked per element to produce its criterion.
|
|
10
|
+
* @param comparator - Returns `true` when `current` should replace `computed` as the extremum.
|
|
11
|
+
* @returns Returns the extremum element, or `undefined` when there is none.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function _baseExtremum<T, TCriterion>(array: _List<T>, iteratee: (value: T) => TCriterion, comparator: (current: TCriterion, computed: TCriterion) => boolean): T | undefined;
|
|
15
|
+
//# sourceMappingURL=_baseExtremum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_baseExtremum.d.ts","sourceRoot":"","sources":["../../src/_/_baseExtremum.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,UAAU,EACvC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EACf,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,UAAU,EAClC,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,KAAK,OAAO,GACnE,CAAC,GAAG,SAAS,CAyBf"}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { _isSymbol } from "./isSymbol.js";
|
|
33
|
+
/**
|
|
34
|
+
* The base implementation of methods like `_max` and `_min` which accepts a `comparator` to determine the
|
|
35
|
+
* extremum value. Elements whose criterion is nullish, `NaN` or a symbol never seed the result; once a
|
|
36
|
+
* result is seeded every later criterion is passed to the comparator. The `length` of `array` is used as
|
|
37
|
+
* is, as in lodash.
|
|
38
|
+
*
|
|
39
|
+
* @param array - The array to iterate over.
|
|
40
|
+
* @param iteratee - The iteratee invoked per element to produce its criterion.
|
|
41
|
+
* @param comparator - Returns `true` when `current` should replace `computed` as the extremum.
|
|
42
|
+
* @returns Returns the extremum element, or `undefined` when there is none.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export function _baseExtremum(array, iteratee, comparator) {
|
|
46
|
+
const length = array.length;
|
|
47
|
+
let computed;
|
|
48
|
+
let result;
|
|
49
|
+
for (let index = 0; index < length; index++) {
|
|
50
|
+
const value = array[index];
|
|
51
|
+
const current = iteratee(value);
|
|
52
|
+
if (current == null) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const replaces = computed === undefined
|
|
56
|
+
? !Number.isNaN(current) && !_isSymbol(current)
|
|
57
|
+
: comparator(current, computed);
|
|
58
|
+
if (replaces) {
|
|
59
|
+
computed = current;
|
|
60
|
+
result = value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The base implementation of `get` without support for default values.
|
|
3
|
+
*
|
|
4
|
+
* @param object - The object to query.
|
|
5
|
+
* @param path - The path of the property to get.
|
|
6
|
+
* @returns Returns the resolved value, or `undefined` when the path is empty or cannot be followed.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function _baseGet(object: unknown, path: unknown): unknown;
|
|
10
|
+
//# sourceMappingURL=_baseGet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_baseGet.d.ts","sourceRoot":"","sources":["../../src/_/_baseGet.ts"],"names":[],"mappings":"AAoCA;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAUhE"}
|
|
@@ -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 { _castPath } from "./_castPath.js";
|
|
33
|
+
import { _toKey } from "./_toKey.js";
|
|
34
|
+
/**
|
|
35
|
+
* The base implementation of `get` without support for default values.
|
|
36
|
+
*
|
|
37
|
+
* @param object - The object to query.
|
|
38
|
+
* @param path - The path of the property to get.
|
|
39
|
+
* @returns Returns the resolved value, or `undefined` when the path is empty or cannot be followed.
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export function _baseGet(object, path) {
|
|
43
|
+
const keys = _castPath(path, object);
|
|
44
|
+
let current = object;
|
|
45
|
+
let index = 0;
|
|
46
|
+
while (current != null && index < keys.length) {
|
|
47
|
+
current = current[_toKey(keys[index++])];
|
|
48
|
+
}
|
|
49
|
+
return index && index === keys.length ? current : undefined;
|
|
50
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
3
|
+
*
|
|
4
|
+
* @param value - The value to query.
|
|
5
|
+
* @returns Returns the `toStringTag`.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare function _baseGetTag(value: unknown): string;
|
|
9
|
+
//# sourceMappingURL=_baseGetTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_baseGetTag.d.ts","sourceRoot":"","sources":["../../src/_/_baseGetTag.ts"],"names":[],"mappings":"AAuCA;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMlD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
/*!
|
|
3
|
+
* Portions of this file are derived from Lodash.
|
|
4
|
+
* https://github.com/lodash/lodash
|
|
5
|
+
*
|
|
6
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
7
|
+
*
|
|
8
|
+
* Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
9
|
+
* DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
10
|
+
*
|
|
11
|
+
* Modifications Copyright (c) 2026 GoodData Corporation
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
+
* a copy of this software and associated documentation files (the
|
|
15
|
+
* "Software"), to deal in the Software without restriction, including
|
|
16
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
+
* the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be
|
|
22
|
+
* included in all copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
27
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
28
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
29
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
import { _getRawTag } from "./_getRawTag.js";
|
|
33
|
+
/** `Object#toString` result references. */
|
|
34
|
+
const NULL_TAG = "[object Null]";
|
|
35
|
+
const UNDEFINED_TAG = "[object Undefined]";
|
|
36
|
+
/**
|
|
37
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
38
|
+
*
|
|
39
|
+
* @param value - The value to query.
|
|
40
|
+
* @returns Returns the `toStringTag`.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export function _baseGetTag(value) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value === undefined ? UNDEFINED_TAG : NULL_TAG;
|
|
46
|
+
}
|
|
47
|
+
return Symbol.toStringTag in Object(value) ? _getRawTag(value) : Object.prototype.toString.call(value);
|
|
48
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The base implementation of `_intersection`, `_intersectionBy` and `_intersectionWith`: creates an array of
|
|
3
|
+
* the values of the first array whose criterion appears in every other array, compared with SameValueZero,
|
|
4
|
+
* or with `comparator` when one is given. Each criterion is kept once, with the first value producing it, in
|
|
5
|
+
* the order of the first array and with `-0` normalised to `0` unless a comparator is used. Only array-like
|
|
6
|
+
* objects are inspected: any other first argument yields an empty array and any other argument counts as
|
|
7
|
+
* empty. As in lodash, the criteria of the other arrays are computed from the last array to the first, the
|
|
8
|
+
* other arrays are searched in that order too, and the first array is only walked until the result is as
|
|
9
|
+
* long as the shortest array.
|
|
10
|
+
*
|
|
11
|
+
* @param arrays - The arrays to inspect.
|
|
12
|
+
* @param iteratee - The iteratee invoked per element to produce its criterion. Defaults to identity.
|
|
13
|
+
* @param comparator - The comparator invoked per criterion with (arrayValue, otherValue); a truthy result
|
|
14
|
+
* is a match, and the result is also deduplicated through it.
|
|
15
|
+
* @returns Returns the new array of intersecting values.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function _baseIntersection<T>(arrays: unknown[], iteratee?: (value: unknown) => unknown, comparator?: (arrayValue: unknown, otherValue: unknown) => boolean): T[];
|
|
19
|
+
//# sourceMappingURL=_baseIntersection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_baseIntersection.d.ts","sourceRoot":"","sources":["../../src/_/_baseIntersection.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAC/B,MAAM,EAAE,OAAO,EAAE,EACjB,QAAQ,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAA0B,EACxD,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,KAAK,OAAO,GACnE,CAAC,EAAE,CAqDL"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
/*!
|
|
3
|
+
* Portions of this file are derived from Lodash.
|
|
4
|
+
* https://github.com/lodash/lodash
|
|
5
|
+
*
|
|
6
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
7
|
+
*
|
|
8
|
+
* Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
9
|
+
* DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
10
|
+
*
|
|
11
|
+
* Modifications Copyright (c) 2026 GoodData Corporation
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
+
* a copy of this software and associated documentation files (the
|
|
15
|
+
* "Software"), to deal in the Software without restriction, including
|
|
16
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
+
* the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be
|
|
22
|
+
* included in all copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
27
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
28
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
29
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
import { _isArrayLike } from "./isArrayLike.js";
|
|
33
|
+
import { _isObjectLike } from "./isObjectLike.js";
|
|
34
|
+
/**
|
|
35
|
+
* The base implementation of `_intersection`, `_intersectionBy` and `_intersectionWith`: creates an array of
|
|
36
|
+
* the values of the first array whose criterion appears in every other array, compared with SameValueZero,
|
|
37
|
+
* or with `comparator` when one is given. Each criterion is kept once, with the first value producing it, in
|
|
38
|
+
* the order of the first array and with `-0` normalised to `0` unless a comparator is used. Only array-like
|
|
39
|
+
* objects are inspected: any other first argument yields an empty array and any other argument counts as
|
|
40
|
+
* empty. As in lodash, the criteria of the other arrays are computed from the last array to the first, the
|
|
41
|
+
* other arrays are searched in that order too, and the first array is only walked until the result is as
|
|
42
|
+
* long as the shortest array.
|
|
43
|
+
*
|
|
44
|
+
* @param arrays - The arrays to inspect.
|
|
45
|
+
* @param iteratee - The iteratee invoked per element to produce its criterion. Defaults to identity.
|
|
46
|
+
* @param comparator - The comparator invoked per criterion with (arrayValue, otherValue); a truthy result
|
|
47
|
+
* is a match, and the result is also deduplicated through it.
|
|
48
|
+
* @returns Returns the new array of intersecting values.
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export function _baseIntersection(arrays, iteratee = (value) => value, comparator) {
|
|
52
|
+
const [first, ...others] = arrays;
|
|
53
|
+
if (!_isObjectLike(first) || !_isArrayLike(first)) {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
const source = first;
|
|
57
|
+
const otherCriteria = [];
|
|
58
|
+
let maxLength = source.length;
|
|
59
|
+
for (let position = others.length - 1; position >= 0; position--) {
|
|
60
|
+
const list = others[position];
|
|
61
|
+
const isList = _isObjectLike(list) && _isArrayLike(list);
|
|
62
|
+
const values = isList ? Array.from(list) : [];
|
|
63
|
+
maxLength = Math.min(maxLength, values.length);
|
|
64
|
+
otherCriteria.push(values.map((value) => iteratee(value)));
|
|
65
|
+
}
|
|
66
|
+
const otherSets = comparator ? [] : otherCriteria.map((criteria) => new Set(criteria));
|
|
67
|
+
const seen = new Set();
|
|
68
|
+
const result = [];
|
|
69
|
+
const resultCriteria = [];
|
|
70
|
+
for (let index = 0; index < source.length && result.length < maxLength; index++) {
|
|
71
|
+
const value = source[index];
|
|
72
|
+
const computed = iteratee(value);
|
|
73
|
+
if (comparator) {
|
|
74
|
+
const matches = (other) => comparator(computed, other);
|
|
75
|
+
if (resultCriteria.some(matches) || otherCriteria.some((criteria) => !criteria.some(matches))) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
resultCriteria.push(computed);
|
|
79
|
+
// lodash keeps `-0` as it is when a comparator is used
|
|
80
|
+
result.push(value);
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
if (seen.has(computed) || otherSets.some((set) => !set.has(computed))) {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
seen.add(computed);
|
|
87
|
+
// lodash normalises `-0` to `+0` in the result
|
|
88
|
+
result.push(value === 0 ? 0 : value);
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks objects currently being compared, each mapped to its counterpart on the other side, so that
|
|
3
|
+
* cyclic structures terminate: meeting an already-tracked pair again counts as equal.
|
|
4
|
+
*/
|
|
5
|
+
type _Stack = Map<object, object>;
|
|
6
|
+
/**
|
|
7
|
+
* How two values are compared.
|
|
8
|
+
*
|
|
9
|
+
* `unordered` makes array elements match in any order; it is switched on for the contents of maps
|
|
10
|
+
* and sets and, as in lodash, stays on for everything nested inside them.
|
|
11
|
+
*
|
|
12
|
+
* `partial` makes `value` a pattern that `other` only has to contain: arrays may be longer, objects
|
|
13
|
+
* may have extra keys, inherited keys count, and constructors are not compared. It is what the
|
|
14
|
+
* object and `[path, value]` iteratee shorthands use.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export type _CompareOptions = {
|
|
19
|
+
unordered: boolean;
|
|
20
|
+
partial: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The base implementation of `_isEqual` which tracks traversed objects.
|
|
24
|
+
*
|
|
25
|
+
* @param value - The value to compare.
|
|
26
|
+
* @param other - The other value to compare.
|
|
27
|
+
* @param options - See {@link _CompareOptions}; both flags default to `false`.
|
|
28
|
+
* @param stack - Tracks traversed `value` and `other` objects.
|
|
29
|
+
* @returns Returns `true` if the values are equivalent, else `false`.
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare function _baseIsEqual(value: unknown, other: unknown, options?: Partial<_CompareOptions>, stack?: _Stack): boolean;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=_baseIsEqual.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_baseIsEqual.d.ts","sourceRoot":"","sources":["../../src/_/_baseIsEqual.ts"],"names":[],"mappings":"AAuDA;;;GAGG;AACH,KAAK,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AAIF;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CACxB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,OAAO,CAAC,eAAe,CAAmB,EACnD,KAAK,GAAE,MAAkB,GAC1B,OAAO,CAaT"}
|