@gooddata/util 11.68.0-alpha.5 → 11.68.0-alpha.7
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 +177 -0
- package/esm/_/_assignValue.d.ts.map +1 -1
- package/esm/_/_assignValue.js +2 -6
- 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.map +1 -1
- package/esm/_/_baseClone.js +3 -30
- package/esm/_/_baseMerge.d.ts +15 -0
- package/esm/_/_baseMerge.d.ts.map +1 -0
- package/esm/_/_baseMerge.js +137 -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/_/_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 +49 -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/_/_initCloneObject.d.ts +10 -0
- package/esm/_/_initCloneObject.d.ts.map +1 -0
- package/esm/_/_initCloneObject.js +48 -0
- package/esm/_/_unicode.d.ts +27 -0
- package/esm/_/_unicode.d.ts.map +1 -0
- package/esm/_/_unicode.js +120 -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/_/deburr.d.ts +10 -0
- package/esm/_/deburr.d.ts.map +1 -0
- package/esm/_/deburr.js +243 -0
- package/esm/_/difference.d.ts +14 -0
- package/esm/_/difference.d.ts.map +1 -0
- package/esm/_/difference.js +67 -0
- package/esm/_/escape.d.ts +13 -0
- package/esm/_/escape.d.ts.map +1 -0
- package/esm/_/escape.js +56 -0
- package/esm/_/has.d.ts +23 -0
- package/esm/_/has.d.ts.map +1 -0
- package/esm/_/has.js +35 -0
- package/esm/_/isArray.d.ts +61 -0
- package/esm/_/isArray.d.ts.map +1 -0
- package/esm/_/isArray.js +62 -0
- package/esm/_/isPlainObject.d.ts +1 -1
- package/esm/_/isPlainObject.d.ts.map +1 -1
- 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/_/keysIn.d.ts +10 -0
- package/esm/_/keysIn.d.ts.map +1 -0
- package/esm/_/keysIn.js +54 -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/_/omit.d.ts +1 -5
- package/esm/_/omit.d.ts.map +1 -1
- 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/_/sortBy.d.ts +17 -0
- package/esm/_/sortBy.d.ts.map +1 -0
- package/esm/_/sortBy.js +46 -0
- package/esm/_/throttle.d.ts +76 -0
- package/esm/_/throttle.d.ts.map +1 -0
- package/esm/_/throttle.js +45 -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 +64 -0
- package/esm/_/types.d.ts.map +1 -1
- package/esm/_/union.d.ts +11 -0
- package/esm/_/union.d.ts.map +1 -0
- package/esm/_/union.js +55 -0
- package/esm/_/uniq.d.ts +12 -0
- package/esm/_/uniq.d.ts.map +1 -0
- package/esm/_/uniq.js +47 -0
- package/esm/_/uniqWith.d.ts +14 -0
- package/esm/_/uniqWith.d.ts.map +1 -0
- package/esm/_/uniqWith.js +59 -0
- package/esm/_/upperFirst.d.ts +10 -0
- package/esm/_/upperFirst.d.ts.map +1 -0
- package/esm/_/upperFirst.js +46 -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 +23 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +21 -0
- package/esm/util.d.ts +549 -0
- package/package.json +5 -4
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c) 2020-
|
|
1
|
+
Copyright (c) 2020-2026 GoodData Corporation
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/NOTICE
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Copyright (c) 2017-2026 GoodData Corporation
|
|
2
|
+
|
|
3
|
+
This product includes a number of subcomponents with separate copyright notices and license terms below. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license. This GoodData project does not necessarily use all the open source software referred to below and may also only use portions of a given package. With respect to the open source software listed in this document, if you (i) have any questions, (ii) wish to receive source code for packages under licenses that require their source code to be made available (such as the GNU Lesser Public License), or (iii) discover any errors or omissions in the licensing information provided, please contact us at legal@gooddata.com. Please identify in source code requests: (i) the packages for which you are requesting corresponding source, (ii) the GoodData product (including any available version) with which the package was provided; and (iii) an email address (if available) or postal address at which GoodData may contact you.
|
|
4
|
+
|
|
5
|
+
--------------------------------------------------------------------------------
|
|
6
|
+
Attribution Notice for @gooddata/util (11.68.0-alpha.7)
|
|
7
|
+
Package License: MIT
|
|
8
|
+
Own License File: LICENSE
|
|
9
|
+
|
|
10
|
+
This notice lists the components that @gooddata/util depends on, directly or through other
|
|
11
|
+
packages, with the license and copyright information reported for each of them.
|
|
12
|
+
The license of @gooddata/util itself is stated in its LICENSE file. Each component below is
|
|
13
|
+
subject to its own license terms, given in its entry; the license of @gooddata/util does not
|
|
14
|
+
change those terms.
|
|
15
|
+
--------------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
Dependencies
|
|
18
|
+
|
|
19
|
+
Local GoodData SDK components
|
|
20
|
+
No local SDK dependencies selected.
|
|
21
|
+
|
|
22
|
+
External components
|
|
23
|
+
- lodash-es (4.18.1) [CC0-1.0, MIT] — Direct
|
|
24
|
+
- ts-invariant (0.10.3) [MIT] — Direct
|
|
25
|
+
- tslib (2.8.1) [ISC] — Direct
|
|
26
|
+
|
|
27
|
+
================================================================================
|
|
28
|
+
External components
|
|
29
|
+
================================================================================
|
|
30
|
+
|
|
31
|
+
--------------------------------------------------------------------------------
|
|
32
|
+
Package Title: lodash-es (4.18.1)
|
|
33
|
+
Package Locator: npm+lodash-es$4.18.1
|
|
34
|
+
Package Depth: Direct
|
|
35
|
+
--------------------------------------------------------------------------------
|
|
36
|
+
|
|
37
|
+
* Declared Licenses *
|
|
38
|
+
CC0-1.0, MIT
|
|
39
|
+
|
|
40
|
+
* CC0-1.0 *
|
|
41
|
+
|
|
42
|
+
* License Header *
|
|
43
|
+
Creative Commons Legal Code
|
|
44
|
+
CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
|
|
45
|
+
Statement of Purpose
|
|
46
|
+
The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
|
|
47
|
+
Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
|
|
48
|
+
For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
|
|
49
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
|
|
50
|
+
i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
|
|
51
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
52
|
+
iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
|
|
53
|
+
iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
|
|
54
|
+
v. rights protecting the extraction, dissemination, use and reuse of data in a Work;
|
|
55
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
|
|
56
|
+
vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
|
|
57
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
|
|
58
|
+
3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
|
|
59
|
+
4. Limitations and Disclaimers.
|
|
60
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
|
|
61
|
+
b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
|
|
62
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
|
|
63
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
|
|
64
|
+
|
|
65
|
+
* MIT *
|
|
66
|
+
|
|
67
|
+
* License Header *
|
|
68
|
+
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
69
|
+
|
|
70
|
+
Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
71
|
+
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
72
|
+
|
|
73
|
+
This software consists of voluntary contributions made by many
|
|
74
|
+
individuals. For exact contribution history, see the revision history
|
|
75
|
+
available at https://github.com/lodash/lodash
|
|
76
|
+
|
|
77
|
+
The following license applies to all parts of this software except as
|
|
78
|
+
documented below:
|
|
79
|
+
|
|
80
|
+
====
|
|
81
|
+
|
|
82
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
83
|
+
a copy of this software and associated documentation files (the
|
|
84
|
+
"Software"), to deal in the Software without restriction, including
|
|
85
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
86
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
87
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
88
|
+
the following conditions:
|
|
89
|
+
|
|
90
|
+
The above copyright notice and this permission notice shall be
|
|
91
|
+
included in all copies or substantial portions of the Software.
|
|
92
|
+
|
|
93
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
94
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
95
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
96
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
97
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
98
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
99
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
100
|
+
|
|
101
|
+
====
|
|
102
|
+
|
|
103
|
+
Copyright and related rights for sample code are waived via CC0. Sample
|
|
104
|
+
code is defined as all source code displayed within the prose of the
|
|
105
|
+
documentation.
|
|
106
|
+
|
|
107
|
+
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
|
108
|
+
|
|
109
|
+
====
|
|
110
|
+
|
|
111
|
+
Files located in the node_modules and vendor directories are externally
|
|
112
|
+
maintained libraries used by this software which have their own
|
|
113
|
+
licenses; we recommend you read them, as their terms may differ from the
|
|
114
|
+
terms above.
|
|
115
|
+
|
|
116
|
+
* Copyrights *
|
|
117
|
+
MIT
|
|
118
|
+
- Copyright (c) OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
119
|
+
|
|
120
|
+
--------------------------------------------------------------------------------
|
|
121
|
+
Package Title: ts-invariant (0.10.3)
|
|
122
|
+
Package Locator: npm+ts-invariant$0.10.3
|
|
123
|
+
Package Depth: Direct
|
|
124
|
+
--------------------------------------------------------------------------------
|
|
125
|
+
|
|
126
|
+
* Declared Licenses *
|
|
127
|
+
MIT
|
|
128
|
+
|
|
129
|
+
* License Header *
|
|
130
|
+
MIT License
|
|
131
|
+
|
|
132
|
+
Copyright (c) 2019 Apollo GraphQL
|
|
133
|
+
|
|
134
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
135
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
136
|
+
in the Software without restriction, including without limitation the rights
|
|
137
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
138
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
139
|
+
furnished to do so, subject to the following conditions:
|
|
140
|
+
|
|
141
|
+
The above copyright notice and this permission notice shall be included in all
|
|
142
|
+
copies or substantial portions of the Software.
|
|
143
|
+
|
|
144
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
145
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
146
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
147
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
148
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
149
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
150
|
+
SOFTWARE.
|
|
151
|
+
|
|
152
|
+
* Copyrights *
|
|
153
|
+
MIT
|
|
154
|
+
- Copyright (c) 2019 Apollo GraphQL
|
|
155
|
+
|
|
156
|
+
--------------------------------------------------------------------------------
|
|
157
|
+
Package Title: tslib (2.8.1)
|
|
158
|
+
Package Locator: npm+tslib$2.8.1
|
|
159
|
+
Package Depth: Direct
|
|
160
|
+
--------------------------------------------------------------------------------
|
|
161
|
+
|
|
162
|
+
* Declared Licenses *
|
|
163
|
+
ISC
|
|
164
|
+
|
|
165
|
+
* License Header *
|
|
166
|
+
Copyright (c) Microsoft Corporation.
|
|
167
|
+
|
|
168
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
169
|
+
purpose with or without fee is hereby granted.
|
|
170
|
+
|
|
171
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
172
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
173
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
174
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
175
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
176
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
177
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_assignValue.d.ts","sourceRoot":"","sources":["../../src/_/_assignValue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_assignValue.d.ts","sourceRoot":"","sources":["../../src/_/_assignValue.ts"],"names":[],"mappings":"AAoCA;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAMzG"}
|
package/esm/_/_assignValue.js
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
30
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
31
|
*/
|
|
32
|
+
import { _baseAssignValue } from "./_baseAssignValue.js";
|
|
32
33
|
import { _eq } from "./eq.js";
|
|
33
34
|
/**
|
|
34
35
|
* Assigns `value` to `key` of `object` unless an own property with an equivalent value already exists.
|
|
@@ -44,10 +45,5 @@ export function _assignValue(object, key, value) {
|
|
|
44
45
|
if (Object.hasOwn(object, key) && _eq(object[key], value) && !(value === undefined && !(key in object))) {
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
Object.defineProperty(object, key, { configurable: true, enumerable: true, value, writable: true });
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
object[key] = value;
|
|
52
|
-
}
|
|
48
|
+
_baseAssignValue(object, key, value);
|
|
53
49
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Portions of this file are derived from Lodash.
|
|
3
|
+
* https://github.com/lodash/lodash
|
|
4
|
+
*
|
|
5
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
6
|
+
*
|
|
7
|
+
* Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
8
|
+
* DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
9
|
+
*
|
|
10
|
+
* Modifications Copyright (c) 2026 GoodData Corporation
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
13
|
+
* a copy of this software and associated documentation files (the
|
|
14
|
+
* "Software"), to deal in the Software without restriction, including
|
|
15
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
16
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
17
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
18
|
+
* the following conditions:
|
|
19
|
+
*
|
|
20
|
+
* The above copyright notice and this permission notice shall be
|
|
21
|
+
* included in all copies or substantial portions of the Software.
|
|
22
|
+
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
24
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
25
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
26
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
27
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
28
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
29
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The base implementation of `_assignValue` without value checks. A `__proto__` key is defined as an own
|
|
33
|
+
* property, so it never changes the prototype of `object`.
|
|
34
|
+
*
|
|
35
|
+
* @param object - The object to modify.
|
|
36
|
+
* @param key - The key of the property to assign.
|
|
37
|
+
* @param value - The value to assign.
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export declare function _baseAssignValue(object: Record<PropertyKey, unknown>, key: PropertyKey, value: unknown): void;
|
|
41
|
+
//# sourceMappingURL=_baseAssignValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_baseAssignValue.d.ts","sourceRoot":"","sources":["../../src/_/_baseAssignValue.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACpC,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,OAAO,GACf,IAAI,CAMN"}
|
|
@@ -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
|
+
/**
|
|
33
|
+
* The base implementation of `_assignValue` without value checks. A `__proto__` key is defined as an own
|
|
34
|
+
* property, so it never changes the prototype of `object`.
|
|
35
|
+
*
|
|
36
|
+
* @param object - The object to modify.
|
|
37
|
+
* @param key - The key of the property to assign.
|
|
38
|
+
* @param value - The value to assign.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export function _baseAssignValue(object, key, value) {
|
|
42
|
+
if (key === "__proto__") {
|
|
43
|
+
Object.defineProperty(object, key, { configurable: true, enumerable: true, value, writable: true });
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
object[key] = value;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_baseClone.d.ts","sourceRoot":"","sources":["../../src/_/_baseClone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_baseClone.d.ts","sourceRoot":"","sources":["../../src/_/_baseClone.ts"],"names":[],"mappings":"AA4EA,kGAAkG;AAClG,KAAK,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAMnC;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,MAAkB,EAAE,MAAM,UAAQ,GAAG,OAAO,CAiE7F"}
|
package/esm/_/_baseClone.js
CHANGED
|
@@ -31,9 +31,11 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { _assignValue } from "./_assignValue.js";
|
|
33
33
|
import { _baseGetTag } from "./_baseGetTag.js";
|
|
34
|
+
import { _cloneArrayBuffer } from "./_cloneArrayBuffer.js";
|
|
35
|
+
import { _cloneTypedArray } from "./_cloneTypedArray.js";
|
|
34
36
|
import { _getAllKeys } from "./_getAllKeys.js";
|
|
37
|
+
import { _initCloneObject } from "./_initCloneObject.js";
|
|
35
38
|
import { _isIndex } from "./_isIndex.js";
|
|
36
|
-
import { _isPrototype } from "./_isPrototype.js";
|
|
37
39
|
import { _isObject } from "./isObject.js";
|
|
38
40
|
import { _isTypedArray } from "./isTypedArray.js";
|
|
39
41
|
/** `Object#toString` result references. */
|
|
@@ -66,8 +68,6 @@ const CLONEABLE_TAGS = new Set([
|
|
|
66
68
|
]);
|
|
67
69
|
/** Used to match `RegExp` flags from their coerced string values. */
|
|
68
70
|
const RE_FLAGS = /\w*$/;
|
|
69
|
-
/** Node's `Buffer`, when present; typed structurally because this package has no Node typings. */
|
|
70
|
-
const NodeBuffer = globalThis.Buffer;
|
|
71
71
|
/**
|
|
72
72
|
* The base implementation of `_cloneDeep` which tracks traversed objects.
|
|
73
73
|
*
|
|
@@ -162,17 +162,6 @@ function _initCloneArray(array) {
|
|
|
162
162
|
}
|
|
163
163
|
return result;
|
|
164
164
|
}
|
|
165
|
-
/**
|
|
166
|
-
* Initializes a plain-object clone with the same prototype. Prototype objects and objects without a
|
|
167
|
-
* constructor function, such as null-prototype objects, clone into ordinary `Object` instances.
|
|
168
|
-
*/
|
|
169
|
-
function _initCloneObject(object) {
|
|
170
|
-
if (typeof object.constructor !== "function" || _isPrototype(object)) {
|
|
171
|
-
return {};
|
|
172
|
-
}
|
|
173
|
-
const proto = Object.getPrototypeOf(object);
|
|
174
|
-
return _isObject(proto) ? Object.create(proto) : {};
|
|
175
|
-
}
|
|
176
165
|
/**
|
|
177
166
|
* Initializes a clone of a value by its `toStringTag`. Collections come back empty and are filled by
|
|
178
167
|
* the caller; everything else is complete on return.
|
|
@@ -206,19 +195,3 @@ function _initCloneByTag(object, tag) {
|
|
|
206
195
|
}
|
|
207
196
|
return _cloneTypedArray(object);
|
|
208
197
|
}
|
|
209
|
-
function _cloneArrayBuffer(arrayBuffer) {
|
|
210
|
-
const result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
211
|
-
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
|
212
|
-
return result;
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Clones a typed array of any class, keeping its view offset and length over a copy of the whole buffer.
|
|
216
|
-
* A Node `Buffer` is copied through `Buffer.from`, since constructing one directly is deprecated.
|
|
217
|
-
*/
|
|
218
|
-
function _cloneTypedArray(typedArray) {
|
|
219
|
-
if (NodeBuffer?.isBuffer(typedArray)) {
|
|
220
|
-
return NodeBuffer.from(typedArray);
|
|
221
|
-
}
|
|
222
|
-
const Ctor = typedArray.constructor;
|
|
223
|
-
return new Ctor(_cloneArrayBuffer(typedArray.buffer), typedArray.byteOffset, typedArray.length);
|
|
224
|
-
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type _AnyRecord = Record<PropertyKey, unknown>;
|
|
2
|
+
/** Tracks each traversed source value and its merged counterpart, so cycles and shared references are kept. */
|
|
3
|
+
type _Stack = Map<unknown, unknown>;
|
|
4
|
+
/**
|
|
5
|
+
* The base implementation of `_merge` for a single source: merges the own and inherited enumerable string
|
|
6
|
+
* keyed properties of `source` into `object`.
|
|
7
|
+
*
|
|
8
|
+
* @param object - The destination object.
|
|
9
|
+
* @param source - The source object.
|
|
10
|
+
* @param stack - Tracks traversed source values and their merged counterparts.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function _baseMerge(object: _AnyRecord, source: _AnyRecord, stack: _Stack): void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=_baseMerge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_baseMerge.d.ts","sourceRoot":"","sources":["../../src/_/_baseMerge.ts"],"names":[],"mappings":"AA6CA,KAAK,UAAU,GAAG,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAE/C,+GAA+G;AAC/G,KAAK,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAEpC;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CActF"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
/*!
|
|
3
|
+
* Portions of this file are derived from Lodash.
|
|
4
|
+
* https://github.com/lodash/lodash
|
|
5
|
+
*
|
|
6
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
7
|
+
*
|
|
8
|
+
* Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
9
|
+
* DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
10
|
+
*
|
|
11
|
+
* Modifications Copyright (c) 2026 GoodData Corporation
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
+
* a copy of this software and associated documentation files (the
|
|
15
|
+
* "Software"), to deal in the Software without restriction, including
|
|
16
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
+
* the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be
|
|
22
|
+
* included in all copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
27
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
28
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
29
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
import { _baseAssignValue } from "./_baseAssignValue.js";
|
|
33
|
+
import { _cloneTypedArray } from "./_cloneTypedArray.js";
|
|
34
|
+
import { _initCloneObject } from "./_initCloneObject.js";
|
|
35
|
+
import { _eq } from "./eq.js";
|
|
36
|
+
import { _isArguments } from "./isArguments.js";
|
|
37
|
+
import { _isArrayLike } from "./isArrayLike.js";
|
|
38
|
+
import { _isObject } from "./isObject.js";
|
|
39
|
+
import { _isObjectLike } from "./isObjectLike.js";
|
|
40
|
+
import { _isPlainObject } from "./isPlainObject.js";
|
|
41
|
+
import { _isTypedArray } from "./isTypedArray.js";
|
|
42
|
+
import { _keysIn } from "./keysIn.js";
|
|
43
|
+
/**
|
|
44
|
+
* The base implementation of `_merge` for a single source: merges the own and inherited enumerable string
|
|
45
|
+
* keyed properties of `source` into `object`.
|
|
46
|
+
*
|
|
47
|
+
* @param object - The destination object.
|
|
48
|
+
* @param source - The source object.
|
|
49
|
+
* @param stack - Tracks traversed source values and their merged counterparts.
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
export function _baseMerge(object, source, stack) {
|
|
53
|
+
if (object === source) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
for (const key of _keysIn(source)) {
|
|
57
|
+
const srcValue = source[key];
|
|
58
|
+
if (_isObject(srcValue)) {
|
|
59
|
+
_mergeDeep(object, source, key, stack);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
_assignMergeValue(object, key, srcValue);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Merges the object value at `key`: arrays and plain objects are merged recursively into the destination
|
|
68
|
+
* value, typed arrays are copied, and any other object is assigned by reference.
|
|
69
|
+
*/
|
|
70
|
+
function _mergeDeep(object, source, key, stack) {
|
|
71
|
+
const objValue = _safeGet(object, key);
|
|
72
|
+
const srcValue = _safeGet(source, key);
|
|
73
|
+
const stacked = stack.get(srcValue);
|
|
74
|
+
if (stacked) {
|
|
75
|
+
_assignMergeValue(object, key, stacked);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
let newValue = srcValue;
|
|
79
|
+
// whether `srcValue` still has to be merged into `newValue`
|
|
80
|
+
let isCommon = true;
|
|
81
|
+
const isArr = Array.isArray(srcValue);
|
|
82
|
+
const isTyped = !isArr && _isTypedArray(srcValue);
|
|
83
|
+
if (isArr || isTyped) {
|
|
84
|
+
if (Array.isArray(objValue)) {
|
|
85
|
+
newValue = objValue;
|
|
86
|
+
}
|
|
87
|
+
else if (_isObjectLike(objValue) && _isArrayLike(objValue)) {
|
|
88
|
+
newValue = Array.from(objValue);
|
|
89
|
+
}
|
|
90
|
+
else if (isTyped) {
|
|
91
|
+
isCommon = false;
|
|
92
|
+
newValue = _cloneTypedArray(srcValue);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
newValue = [];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else if (_isPlainObject(srcValue) || _isArguments(srcValue)) {
|
|
99
|
+
newValue = objValue;
|
|
100
|
+
if (_isArguments(objValue)) {
|
|
101
|
+
newValue = _toPlainObject(objValue);
|
|
102
|
+
}
|
|
103
|
+
else if (!_isObject(objValue) || typeof objValue === "function") {
|
|
104
|
+
newValue = _initCloneObject(srcValue);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
isCommon = false;
|
|
109
|
+
}
|
|
110
|
+
if (isCommon) {
|
|
111
|
+
stack.set(srcValue, newValue);
|
|
112
|
+
_baseMerge(newValue, srcValue, stack);
|
|
113
|
+
stack.delete(srcValue);
|
|
114
|
+
}
|
|
115
|
+
_assignMergeValue(object, key, newValue);
|
|
116
|
+
}
|
|
117
|
+
/** Assigns `value` unless it equals the current value, or is `undefined` while the key already exists. */
|
|
118
|
+
function _assignMergeValue(object, key, value) {
|
|
119
|
+
if ((value !== undefined && !_eq(object[key], value)) || (value === undefined && !(key in object))) {
|
|
120
|
+
_baseAssignValue(object, key, value);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** Reads `object[key]`, except for `__proto__` and a `constructor` function, which are never merged. */
|
|
124
|
+
function _safeGet(object, key) {
|
|
125
|
+
if (key === "__proto__" || (key === "constructor" && typeof object[key] === "function")) {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
return object[key];
|
|
129
|
+
}
|
|
130
|
+
/** Copies the own and inherited enumerable string keyed properties of `value` into a new plain object. */
|
|
131
|
+
function _toPlainObject(value) {
|
|
132
|
+
const result = {};
|
|
133
|
+
for (const key of _keysIn(value)) {
|
|
134
|
+
_baseAssignValue(result, key, value[key]);
|
|
135
|
+
}
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The base implementation of `_sortBy` without param guards: sorts the values of `collection` in ascending
|
|
3
|
+
* order by the results of each iteratee, comparing the results of the first iteratee first.
|
|
4
|
+
*
|
|
5
|
+
* @param collection - The collection to iterate over.
|
|
6
|
+
* @param iteratees - The iteratees to sort by; an array iteratee is a property path.
|
|
7
|
+
* @returns Returns the new sorted array.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function _baseOrderBy(collection: unknown, iteratees: unknown[]): unknown[];
|
|
11
|
+
//# sourceMappingURL=_baseOrderBy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_baseOrderBy.d.ts","sourceRoot":"","sources":["../../src/_/_baseOrderBy.ts"],"names":[],"mappings":"AA2CA;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAYjF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { _baseEach } from "./_baseEach.js";
|
|
33
|
+
import { _baseGet } from "./_baseGet.js";
|
|
34
|
+
import { _baseIteratee } from "./_baseIteratee.js";
|
|
35
|
+
import { _compareAscending } from "./_compareAscending.js";
|
|
36
|
+
/**
|
|
37
|
+
* The base implementation of `_sortBy` without param guards: sorts the values of `collection` in ascending
|
|
38
|
+
* order by the results of each iteratee, comparing the results of the first iteratee first.
|
|
39
|
+
*
|
|
40
|
+
* @param collection - The collection to iterate over.
|
|
41
|
+
* @param iteratees - The iteratees to sort by; an array iteratee is a property path.
|
|
42
|
+
* @returns Returns the new sorted array.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export function _baseOrderBy(collection, iteratees) {
|
|
46
|
+
const getters = iteratees.length ? iteratees.map(_toGetter) : [(value) => value];
|
|
47
|
+
const entries = [];
|
|
48
|
+
_baseEach(collection, (value) => {
|
|
49
|
+
entries.push({ criteria: getters.map((getter) => getter(value)), value });
|
|
50
|
+
});
|
|
51
|
+
// `Array#sort` is stable, so elements with equal criteria keep their input order
|
|
52
|
+
entries.sort(_compareEntries);
|
|
53
|
+
return entries.map((entry) => entry.value);
|
|
54
|
+
}
|
|
55
|
+
/** An array iteratee is a property path; a one-element path is read as its single key. */
|
|
56
|
+
function _toGetter(iteratee) {
|
|
57
|
+
if (Array.isArray(iteratee)) {
|
|
58
|
+
return (value) => _baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
59
|
+
}
|
|
60
|
+
return _baseIteratee(iteratee);
|
|
61
|
+
}
|
|
62
|
+
function _compareEntries(entry, other) {
|
|
63
|
+
for (let index = 0; index < entry.criteria.length; index++) {
|
|
64
|
+
const result = _compareAscending(entry.criteria[index], other.criteria[index]);
|
|
65
|
+
if (result) {
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return 0;
|
|
70
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type _AnyRecord = Record<PropertyKey, unknown>;
|
|
2
|
+
/**
|
|
3
|
+
* The base implementation of `_pickBy`: creates an object composed of the own and inherited enumerable
|
|
4
|
+
* string and symbol keyed properties of `object` that `predicate` returns truthy for. The predicate is
|
|
5
|
+
* invoked with two arguments: (value, key). Picked values are kept by reference.
|
|
6
|
+
*
|
|
7
|
+
* @param object - The source object.
|
|
8
|
+
* @param predicate - The function invoked per property.
|
|
9
|
+
* @returns Returns the new object.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function _basePickBy(object: unknown, predicate: (value: unknown, key: string | symbol) => unknown): _AnyRecord;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=_basePickBy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_basePickBy.d.ts","sourceRoot":"","sources":["../../src/_/_basePickBy.ts"],"names":[],"mappings":"AAmCA,KAAK,UAAU,GAAG,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAE/C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACvB,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,GAC7D,UAAU,CAmBZ"}
|