@gooddata/util 11.68.0-alpha.1 → 11.68.0-alpha.3
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/esm/_/_assignValue.d.ts +12 -0
- package/esm/_/_assignValue.d.ts.map +1 -0
- package/esm/_/_assignValue.js +53 -0
- package/esm/_/_baseClone.d.ts +15 -0
- package/esm/_/_baseClone.d.ts.map +1 -0
- package/esm/_/_baseClone.js +224 -0
- package/esm/_/_baseEach.d.ts +11 -0
- package/esm/_/_baseEach.d.ts.map +1 -0
- package/esm/_/_baseEach.js +62 -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/_/_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/_/_baseSet.d.ts +11 -0
- package/esm/_/_baseSet.d.ts.map +1 -0
- package/esm/_/_baseSet.js +68 -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/_/_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/_/_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/_/cloneDeep.d.ts +14 -0
- package/esm/_/cloneDeep.d.ts.map +1 -0
- package/esm/_/cloneDeep.js +47 -0
- package/esm/_/compact.d.ts +46 -0
- package/esm/_/compact.d.ts.map +1 -0
- package/esm/_/compact.js +23 -0
- package/esm/_/debounce.d.ts +70 -0
- package/esm/_/debounce.d.ts.map +1 -0
- package/esm/_/debounce.js +136 -0
- package/esm/_/eq.d.ts +41 -0
- package/esm/_/eq.d.ts.map +1 -0
- package/esm/_/eq.js +43 -0
- package/esm/_/groupBy.d.ts +19 -0
- package/esm/_/groupBy.d.ts.map +1 -0
- package/esm/_/groupBy.js +49 -0
- package/esm/_/isArguments.d.ts +9 -0
- package/esm/_/isArguments.d.ts.map +1 -0
- package/esm/_/isArguments.js +45 -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/_/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/_/omit.d.ts +31 -0
- package/esm/_/omit.d.ts.map +1 -0
- package/esm/_/omit.js +76 -0
- package/esm/_/range.d.ts +24 -0
- package/esm/_/range.d.ts.map +1 -0
- package/esm/_/range.js +56 -0
- package/esm/_/set.d.ts +25 -0
- package/esm/_/set.d.ts.map +1 -0
- package/esm/_/set.js +35 -0
- package/esm/_/toFinite.d.ts +40 -0
- package/esm/_/toFinite.d.ts.map +1 -0
- package/esm/_/toFinite.js +50 -0
- package/esm/_/types.d.ts +70 -0
- package/esm/_/types.d.ts.map +1 -0
- package/esm/_/types.js +2 -0
- package/esm/_/uniqBy.d.ts +13 -0
- package/esm/_/uniqBy.d.ts.map +1 -0
- package/esm/_/uniqBy.js +49 -0
- package/esm/index.d.ts +11 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +11 -0
- package/esm/util.d.ts +337 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isTypedArray.d.ts","sourceRoot":"","sources":["../../src/_/isTypedArray.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAErD"}
|
|
@@ -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
|
+
/**
|
|
33
|
+
* Checks if value is classified as a typed array.
|
|
34
|
+
*
|
|
35
|
+
* Unlike lodash, which matches against a fixed list of `Object#toString` tags and therefore misses
|
|
36
|
+
* `BigInt64Array`, `BigUint64Array` and `Float16Array`, this relies on `ArrayBuffer.isView`, which
|
|
37
|
+
* recognises every typed array in every realm. `DataView` is the only other view and is excluded.
|
|
38
|
+
*
|
|
39
|
+
* @param value - The value to check.
|
|
40
|
+
* @returns Returns true if value is correctly classified, else false.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export function _isTypedArray(value) {
|
|
44
|
+
return ArrayBuffer.isView(value) && !(value instanceof DataView);
|
|
45
|
+
}
|
package/esm/_/omit.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { _Many, _PropertyName } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export type _PartialObject<T> = Partial<T>;
|
|
6
|
+
/**
|
|
7
|
+
* The opposite of `pick`; this method creates an object composed of the own and inherited enumerable
|
|
8
|
+
* property paths of `object` that are not omitted.
|
|
9
|
+
*
|
|
10
|
+
* The result is always a new plain object. When any path is deep, every plain object reachable from
|
|
11
|
+
* the result is copied first so the source is left untouched; non-plain values such as arrays, class
|
|
12
|
+
* instances and dates are kept by reference and are therefore mutated by a deep path through them,
|
|
13
|
+
* exactly as lodash does.
|
|
14
|
+
*
|
|
15
|
+
* @param object - The source object.
|
|
16
|
+
* @param paths - The property paths to omit, given individually or in arrays.
|
|
17
|
+
* @returns Returns the new object.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare function _omit<T extends object, K extends _PropertyName[]>(object: T | null | undefined, ...paths: K): Pick<T, Exclude<keyof T, K[number]>>;
|
|
21
|
+
/**
|
|
22
|
+
* @see _omit
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function _omit<T extends object, K extends keyof T>(object: T | null | undefined, ...paths: Array<_Many<K>>): Omit<T, K>;
|
|
26
|
+
/**
|
|
27
|
+
* @see _omit
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare function _omit<T extends object>(object: T | null | undefined, ...paths: Array<_Many<_PropertyName>>): _PartialObject<T>;
|
|
31
|
+
//# sourceMappingURL=omit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omit.d.ts","sourceRoot":"","sources":["../../src/_/omit.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;AAI3C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,aAAa,EAAE,EAC7D,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC5B,GAAG,KAAK,EAAE,CAAC,GACZ,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACxC;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EACrD,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC5B,GAAG,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAC1B,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACd;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,EAClC,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC5B,GAAG,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,GACtC,cAAc,CAAC,CAAC,CAAC,CAAC"}
|
package/esm/_/omit.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
/*!
|
|
3
|
+
* Portions of this file are derived from Lodash.
|
|
4
|
+
* https://github.com/lodash/lodash
|
|
5
|
+
*
|
|
6
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
7
|
+
*
|
|
8
|
+
* Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
9
|
+
* DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
10
|
+
*
|
|
11
|
+
* Modifications Copyright (c) 2026 GoodData Corporation
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
+
* a copy of this software and associated documentation files (the
|
|
15
|
+
* "Software"), to deal in the Software without restriction, including
|
|
16
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
+
* the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be
|
|
22
|
+
* included in all copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
27
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
28
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
29
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
import { _assignValue } from "./_assignValue.js";
|
|
33
|
+
import { _baseUnset } from "./_baseUnset.js";
|
|
34
|
+
import { _castPath } from "./_castPath.js";
|
|
35
|
+
import { _getAllKeysIn } from "./_getAllKeysIn.js";
|
|
36
|
+
import { _isPlainObject } from "./isPlainObject.js";
|
|
37
|
+
export function _omit(object, ...paths) {
|
|
38
|
+
let result = {};
|
|
39
|
+
if (object == null) {
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
// paths may be given individually or in arrays; one level of arrays is flattened, as lodash does
|
|
43
|
+
const castPaths = paths.flat().map((path) => _castPath(path, object));
|
|
44
|
+
const isDeep = castPaths.some((path) => path.length > 1);
|
|
45
|
+
const source = object;
|
|
46
|
+
for (const key of _getAllKeysIn(source)) {
|
|
47
|
+
_assignValue(result, key, source[key]);
|
|
48
|
+
}
|
|
49
|
+
if (isDeep) {
|
|
50
|
+
result = _clonePlainObjects(result);
|
|
51
|
+
}
|
|
52
|
+
for (let index = castPaths.length - 1; index >= 0; index--) {
|
|
53
|
+
_baseUnset(result, castPaths[index]);
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Deep-copies the plain objects of `value` into new plain objects holding their own and inherited
|
|
59
|
+
* enumerable properties; anything that is not a plain object is kept by reference. Cycles are preserved.
|
|
60
|
+
*/
|
|
61
|
+
function _clonePlainObjects(value, stack = new Map()) {
|
|
62
|
+
if (!_isPlainObject(value)) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
const stacked = stack.get(value);
|
|
66
|
+
if (stacked) {
|
|
67
|
+
return stacked;
|
|
68
|
+
}
|
|
69
|
+
const source = value;
|
|
70
|
+
const result = {};
|
|
71
|
+
stack.set(source, result);
|
|
72
|
+
for (const key of _getAllKeysIn(source)) {
|
|
73
|
+
_assignValue(result, key, _clonePlainObjects(source[key], stack));
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
}
|
package/esm/_/range.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an array of numbers (positive and/or negative) progressing from `start` up to, but not
|
|
3
|
+
* including, `end`. A step of `-1` is used if a negative `start` is specified without an `end` or
|
|
4
|
+
* `step`. If `end` is not specified, it's set to `start` with `start` then set to `0`.
|
|
5
|
+
*
|
|
6
|
+
* **Note:** JavaScript follows the IEEE-754 standard for resolving floating-point values which can
|
|
7
|
+
* produce unexpected results.
|
|
8
|
+
*
|
|
9
|
+
* @param start - The start of the range.
|
|
10
|
+
* @param end - The end of the range.
|
|
11
|
+
* @param step - The value to increment or decrement by.
|
|
12
|
+
* @returns Returns the range of numbers.
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function _range(start: number, end?: number, step?: number): number[];
|
|
16
|
+
/**
|
|
17
|
+
* The iteratee form, so that `_range` can be passed straight to `map` and the like: the index and the
|
|
18
|
+
* collection are ignored and `end` alone defines the range.
|
|
19
|
+
*
|
|
20
|
+
* @see _range
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function _range(end: number, index: string | number, guard: object): number[];
|
|
24
|
+
//# sourceMappingURL=range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/_/range.ts"],"names":[],"mappings":"AAoCA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;AAC7E;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC"}
|
package/esm/_/range.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
/*!
|
|
3
|
+
* Portions of this file are derived from Lodash.
|
|
4
|
+
* https://github.com/lodash/lodash
|
|
5
|
+
*
|
|
6
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
7
|
+
*
|
|
8
|
+
* Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
9
|
+
* DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
10
|
+
*
|
|
11
|
+
* Modifications Copyright (c) 2026 GoodData Corporation
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
+
* a copy of this software and associated documentation files (the
|
|
15
|
+
* "Software"), to deal in the Software without restriction, including
|
|
16
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
+
* the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be
|
|
22
|
+
* included in all copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
27
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
28
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
29
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
import { _isIterateeCall } from "./_isIterateeCall.js";
|
|
33
|
+
import { _toFinite } from "./toFinite.js";
|
|
34
|
+
export function _range(start, end, step) {
|
|
35
|
+
if (step && typeof step !== "number" && _isIterateeCall(start, end, step)) {
|
|
36
|
+
end = step = undefined;
|
|
37
|
+
}
|
|
38
|
+
// `_toFinite` keeps the sign of `-0`
|
|
39
|
+
let from = _toFinite(start);
|
|
40
|
+
let to;
|
|
41
|
+
if (end === undefined) {
|
|
42
|
+
to = from;
|
|
43
|
+
from = 0;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
to = _toFinite(end);
|
|
47
|
+
}
|
|
48
|
+
const by = step === undefined ? (from < to ? 1 : -1) : _toFinite(step);
|
|
49
|
+
const length = Math.max(Math.ceil((to - from) / (by || 1)), 0);
|
|
50
|
+
const result = [];
|
|
51
|
+
for (let index = 0; index < length; index++) {
|
|
52
|
+
result.push(from);
|
|
53
|
+
from += by;
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
package/esm/_/set.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { _Many, _PropertyName } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export type _PropertyPath = _Many<_PropertyName>;
|
|
6
|
+
/**
|
|
7
|
+
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist, it's created. Arrays are
|
|
8
|
+
* created for missing index properties while objects are created for all other missing properties.
|
|
9
|
+
* The segments `__proto__`, `constructor` and `prototype` are refused, which prevents prototype pollution.
|
|
10
|
+
*
|
|
11
|
+
* **Note:** This method mutates `object`.
|
|
12
|
+
*
|
|
13
|
+
* @param object - The object to modify.
|
|
14
|
+
* @param path - The path of the property to set.
|
|
15
|
+
* @param value - The value to set.
|
|
16
|
+
* @returns Returns `object`.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function _set<T extends object>(object: T, path: _PropertyPath, value: unknown): T;
|
|
20
|
+
/**
|
|
21
|
+
* @see _set
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare function _set<TResult>(object: object, path: _PropertyPath, value: unknown): TResult;
|
|
25
|
+
//# sourceMappingURL=set.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../src/_/set.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAAC;AAC1F;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC"}
|
package/esm/_/set.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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 { _baseSet } from "./_baseSet.js";
|
|
33
|
+
export function _set(object, path, value) {
|
|
34
|
+
return object == null ? object : _baseSet(object, path, value);
|
|
35
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
* Converts `value` to a finite number: `NaN` and anything that does not convert become `0`, infinities
|
|
33
|
+
* become the largest finite number of their sign, and the sign of `-0` is kept.
|
|
34
|
+
*
|
|
35
|
+
* @param value - The value to convert.
|
|
36
|
+
* @returns Returns the converted number.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare function _toFinite(value: unknown): number;
|
|
40
|
+
//# sourceMappingURL=toFinite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toFinite.d.ts","sourceRoot":"","sources":["../../src/_/toFinite.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAahD"}
|
|
@@ -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
|
+
/**
|
|
33
|
+
* Converts `value` to a finite number: `NaN` and anything that does not convert become `0`, infinities
|
|
34
|
+
* become the largest finite number of their sign, and the sign of `-0` is kept.
|
|
35
|
+
*
|
|
36
|
+
* @param value - The value to convert.
|
|
37
|
+
* @returns Returns the converted number.
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export function _toFinite(value) {
|
|
41
|
+
if (!value) {
|
|
42
|
+
return value === 0 ? value : 0;
|
|
43
|
+
}
|
|
44
|
+
// a symbol cannot be converted; lodash maps it to NaN, which becomes 0 below
|
|
45
|
+
const number = typeof value === "symbol" ? NaN : Number(value);
|
|
46
|
+
if (number === Infinity || number === -Infinity) {
|
|
47
|
+
return Math.sign(number) * Number.MAX_VALUE;
|
|
48
|
+
}
|
|
49
|
+
return number === number ? number : 0;
|
|
50
|
+
}
|
package/esm/_/types.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export type _List<T> = ArrayLike<T>;
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export type _Many<T> = T | readonly T[];
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export type _PropertyName = string | number | symbol;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export type _Dictionary<T> = {
|
|
47
|
+
[index: string]: T;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
export type _NotVoid = unknown;
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
export type _PartialShallow<T> = {
|
|
57
|
+
[P in keyof T]?: T[P] extends object ? object : T[P];
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export type _IterateeShorthand<T> = _PropertyName | [_PropertyName, any] | _PartialShallow<T>;
|
|
63
|
+
/**
|
|
64
|
+
* An iteratee as lodash accepts it: a function, a property name or path, a `[path, value]` pair, or a
|
|
65
|
+
* partial object to match.
|
|
66
|
+
*
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
export type _ValueIteratee<T> = ((value: T) => _NotVoid) | _IterateeShorthand<T>;
|
|
70
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/_/types.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IACzB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;KAC5B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;CACvD,CAAC;AAEF;;GAEG;AAEH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,aAAa,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC"}
|
package/esm/_/types.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { _List, _ValueIteratee } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* This method is like `uniq` except that it accepts `iteratee` which is invoked for each element in
|
|
4
|
+
* `array` to generate the criterion by which uniqueness is computed. The order of result values is
|
|
5
|
+
* determined by the order they occur in the array. The iteratee is invoked with one argument: (value).
|
|
6
|
+
*
|
|
7
|
+
* @param array - The array to inspect.
|
|
8
|
+
* @param iteratee - The iteratee invoked per element.
|
|
9
|
+
* @returns Returns the new duplicate free array.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function _uniqBy<T>(array: _List<T> | null | undefined, iteratee: _ValueIteratee<T>): T[];
|
|
13
|
+
//# sourceMappingURL=uniqBy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniqBy.d.ts","sourceRoot":"","sources":["../../src/_/uniqBy.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAM/F"}
|
package/esm/_/uniqBy.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
/*!
|
|
3
|
+
* Portions of this file are derived from Lodash.
|
|
4
|
+
* https://github.com/lodash/lodash
|
|
5
|
+
*
|
|
6
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
7
|
+
*
|
|
8
|
+
* Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
9
|
+
* DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
10
|
+
*
|
|
11
|
+
* Modifications Copyright (c) 2026 GoodData Corporation
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
+
* a copy of this software and associated documentation files (the
|
|
15
|
+
* "Software"), to deal in the Software without restriction, including
|
|
16
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
+
* the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be
|
|
22
|
+
* included in all copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
27
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
28
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
29
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
import { _baseIteratee } from "./_baseIteratee.js";
|
|
33
|
+
import { _baseUniq } from "./_baseUniq.js";
|
|
34
|
+
/**
|
|
35
|
+
* This method is like `uniq` except that it accepts `iteratee` which is invoked for each element in
|
|
36
|
+
* `array` to generate the criterion by which uniqueness is computed. The order of result values is
|
|
37
|
+
* determined by the order they occur in the array. The iteratee is invoked with one argument: (value).
|
|
38
|
+
*
|
|
39
|
+
* @param array - The array to inspect.
|
|
40
|
+
* @param iteratee - The iteratee invoked per element.
|
|
41
|
+
* @returns Returns the new duplicate free array.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export function _uniqBy(array, iteratee) {
|
|
45
|
+
if (!array?.length) {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
return _baseUniq(array, _baseIteratee(iteratee));
|
|
49
|
+
}
|
package/esm/index.d.ts
CHANGED
|
@@ -12,4 +12,15 @@ export { type IShortenTextOptions, hashCodeString, randomString, shortenText, es
|
|
|
12
12
|
export { removeMetadata, sanitizeLocaleForMoment } from "./translationUtils.js";
|
|
13
13
|
export { type GuardType, type EmptyObject, combineGuards } from "./typesUtils.js";
|
|
14
14
|
export { type MatcherFunction, type ConsoleFunction, type Matcher, type SpecificMatcherFunction, type ConsoleType, type WaitForFn, delay, strictBarrel, suppressConsole, createTightWaitFor, } from "./testUtils.js";
|
|
15
|
+
export { _cloneDeep } from "./_/cloneDeep.js";
|
|
16
|
+
export { type _Falsey, _compact } from "./_/compact.js";
|
|
17
|
+
export { type _DebouncedFunc, type _DebouncedFuncLeading, type _DebounceSettings, type _DebounceSettingsLeading, _debounce, } from "./_/debounce.js";
|
|
18
|
+
export { _groupBy } from "./_/groupBy.js";
|
|
19
|
+
export { _isEqual } from "./_/isEqual.js";
|
|
20
|
+
export { type _EmptyObject, type _EmptyObjectOf, _isEmpty } from "./_/isEmpty.js";
|
|
21
|
+
export { type _PartialObject, _omit } from "./_/omit.js";
|
|
22
|
+
export { _range } from "./_/range.js";
|
|
23
|
+
export { type _PropertyPath, _set } from "./_/set.js";
|
|
24
|
+
export { _uniqBy } from "./_/uniqBy.js";
|
|
25
|
+
export type { _Dictionary, _IterateeShorthand, _List, _Many, _NotVoid, _PartialShallow, _PropertyName, _ValueIteratee, } from "./_/types.js";
|
|
15
26
|
//# sourceMappingURL=index.d.ts.map
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACH,KAAK,mBAAmB,EACxB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,kBAAkB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,EACL,YAAY,EACZ,eAAe,EACf,kBAAkB,GACrB,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACH,KAAK,mBAAmB,EACxB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,kBAAkB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,EACL,YAAY,EACZ,eAAe,EACf,kBAAkB,GACrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,KAAK,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,SAAS,GACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,aAAa,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EACR,WAAW,EACX,kBAAkB,EAClB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,eAAe,EACf,aAAa,EACb,cAAc,GACjB,MAAM,cAAc,CAAC"}
|
package/esm/index.js
CHANGED
|
@@ -14,3 +14,14 @@ export { hashCodeString, randomString, shortenText, escapeRegExp, simplifyText,
|
|
|
14
14
|
export { removeMetadata, sanitizeLocaleForMoment } from "./translationUtils.js";
|
|
15
15
|
export { combineGuards } from "./typesUtils.js";
|
|
16
16
|
export { delay, strictBarrel, suppressConsole, createTightWaitFor, } from "./testUtils.js";
|
|
17
|
+
// local functions from lodash-es
|
|
18
|
+
export { _cloneDeep } from "./_/cloneDeep.js";
|
|
19
|
+
export { _compact } from "./_/compact.js";
|
|
20
|
+
export { _debounce, } from "./_/debounce.js";
|
|
21
|
+
export { _groupBy } from "./_/groupBy.js";
|
|
22
|
+
export { _isEqual } from "./_/isEqual.js";
|
|
23
|
+
export { _isEmpty } from "./_/isEmpty.js";
|
|
24
|
+
export { _omit } from "./_/omit.js";
|
|
25
|
+
export { _range } from "./_/range.js";
|
|
26
|
+
export { _set } from "./_/set.js";
|
|
27
|
+
export { _uniqBy } from "./_/uniqBy.js";
|