@tidyjs/tidy 2.5.2 → 2.6.1
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/dist/es/addRows.js.map +1 -1
- package/dist/es/arrange.js +9 -5
- package/dist/es/arrange.js.map +1 -1
- package/dist/es/complete.js.map +1 -1
- package/dist/es/count.js +6 -2
- package/dist/es/count.js.map +1 -1
- package/dist/es/debug.js +4 -2
- package/dist/es/debug.js.map +1 -1
- package/dist/es/distinct.js +3 -3
- package/dist/es/distinct.js.map +1 -1
- package/dist/es/expand.js +18 -13
- package/dist/es/expand.js.map +1 -1
- package/dist/es/fill.js +10 -3
- package/dist/es/fill.js.map +1 -1
- package/dist/es/filter.js.map +1 -1
- package/dist/es/fullJoin.js +23 -20
- package/dist/es/fullJoin.js.map +1 -1
- package/dist/es/groupBy.js +56 -28
- package/dist/es/groupBy.js.map +1 -1
- package/dist/es/helpers/assignGroupKeys.js +4 -4
- package/dist/es/helpers/assignGroupKeys.js.map +1 -1
- package/dist/es/helpers/groupMap.js +2 -2
- package/dist/es/helpers/groupMap.js.map +1 -1
- package/dist/es/helpers/groupTraversal.js +5 -4
- package/dist/es/helpers/groupTraversal.js.map +1 -1
- package/dist/es/helpers/identity.js.map +1 -1
- package/dist/es/helpers/isObject.js.map +1 -1
- package/dist/es/helpers/keysFromItems.js +1 -2
- package/dist/es/helpers/keysFromItems.js.map +1 -1
- package/dist/es/helpers/singleOrArray.js.map +1 -1
- package/dist/es/helpers/summation.js +11 -3
- package/dist/es/helpers/summation.js.map +1 -1
- package/dist/es/innerJoin.js +37 -12
- package/dist/es/innerJoin.js.map +1 -1
- package/dist/es/item/rate.js +2 -3
- package/dist/es/item/rate.js.map +1 -1
- package/dist/es/leftJoin.js +13 -8
- package/dist/es/leftJoin.js.map +1 -1
- package/dist/es/map.js.map +1 -1
- package/dist/es/math/math.js.map +1 -1
- package/dist/es/mutate.js +1 -1
- package/dist/es/mutate.js.map +1 -1
- package/dist/es/mutateWithSummary.js +1 -1
- package/dist/es/mutateWithSummary.js.map +1 -1
- package/dist/es/pivotLonger.js +31 -7
- package/dist/es/pivotLonger.js.map +1 -1
- package/dist/es/pivotWider.js +24 -19
- package/dist/es/pivotWider.js.map +1 -1
- package/dist/es/rename.js.map +1 -1
- package/dist/es/replaceNully.js +1 -1
- package/dist/es/replaceNully.js.map +1 -1
- package/dist/es/select.js +3 -3
- package/dist/es/select.js.map +1 -1
- package/dist/es/selectors/contains.js.map +1 -1
- package/dist/es/selectors/endsWith.js.map +1 -1
- package/dist/es/selectors/everything.js.map +1 -1
- package/dist/es/selectors/matches.js.map +1 -1
- package/dist/es/selectors/negate.js +2 -2
- package/dist/es/selectors/negate.js.map +1 -1
- package/dist/es/selectors/numRange.js.map +1 -1
- package/dist/es/selectors/startsWith.js.map +1 -1
- package/dist/es/sequences/fullSeq.js +5 -1
- package/dist/es/sequences/fullSeq.js.map +1 -1
- package/dist/es/slice.js +2 -3
- package/dist/es/slice.js.map +1 -1
- package/dist/es/summarize.js +6 -4
- package/dist/es/summarize.js.map +1 -1
- package/dist/es/summary/deviation.js.map +1 -1
- package/dist/es/summary/first.js.map +1 -1
- package/dist/es/summary/last.js.map +1 -1
- package/dist/es/summary/max.js.map +1 -1
- package/dist/es/summary/mean.js.map +1 -1
- package/dist/es/summary/meanRate.js.map +1 -1
- package/dist/es/summary/median.js.map +1 -1
- package/dist/es/summary/min.js.map +1 -1
- package/dist/es/summary/n.js.map +1 -1
- package/dist/es/summary/nDistinct.js +2 -2
- package/dist/es/summary/nDistinct.js.map +1 -1
- package/dist/es/summary/sum.js.map +1 -1
- package/dist/es/summary/variance.js.map +1 -1
- package/dist/es/tally.js +4 -2
- package/dist/es/tally.js.map +1 -1
- package/dist/es/tidy.js.map +1 -1
- package/dist/es/total.js.map +1 -1
- package/dist/es/transmute.js.map +1 -1
- package/dist/es/vector/cumsum.js.map +1 -1
- package/dist/es/vector/lag.js +1 -1
- package/dist/es/vector/lag.js.map +1 -1
- package/dist/es/vector/lead.js +1 -1
- package/dist/es/vector/lead.js.map +1 -1
- package/dist/es/vector/roll.js +1 -1
- package/dist/es/vector/roll.js.map +1 -1
- package/dist/es/vector/rowNumber.js.map +1 -1
- package/dist/es/when.js +1 -2
- package/dist/es/when.js.map +1 -1
- package/dist/lib/addRows.js +0 -2
- package/dist/lib/addRows.js.map +1 -1
- package/dist/lib/arrange.js +9 -7
- package/dist/lib/arrange.js.map +1 -1
- package/dist/lib/complete.js +0 -2
- package/dist/lib/complete.js.map +1 -1
- package/dist/lib/count.js +6 -4
- package/dist/lib/count.js.map +1 -1
- package/dist/lib/debug.js +4 -4
- package/dist/lib/debug.js.map +1 -1
- package/dist/lib/distinct.js +3 -5
- package/dist/lib/distinct.js.map +1 -1
- package/dist/lib/expand.js +18 -15
- package/dist/lib/expand.js.map +1 -1
- package/dist/lib/fill.js +10 -5
- package/dist/lib/fill.js.map +1 -1
- package/dist/lib/filter.js +0 -2
- package/dist/lib/filter.js.map +1 -1
- package/dist/lib/fullJoin.js +22 -21
- package/dist/lib/fullJoin.js.map +1 -1
- package/dist/lib/groupBy.js +56 -30
- package/dist/lib/groupBy.js.map +1 -1
- package/dist/lib/helpers/assignGroupKeys.js +4 -6
- package/dist/lib/helpers/assignGroupKeys.js.map +1 -1
- package/dist/lib/helpers/groupMap.js +2 -4
- package/dist/lib/helpers/groupMap.js.map +1 -1
- package/dist/lib/helpers/groupTraversal.js +5 -6
- package/dist/lib/helpers/groupTraversal.js.map +1 -1
- package/dist/lib/helpers/identity.js +0 -2
- package/dist/lib/helpers/identity.js.map +1 -1
- package/dist/lib/helpers/isObject.js +0 -2
- package/dist/lib/helpers/isObject.js.map +1 -1
- package/dist/lib/helpers/keysFromItems.js +1 -4
- package/dist/lib/helpers/keysFromItems.js.map +1 -1
- package/dist/lib/helpers/singleOrArray.js +0 -2
- package/dist/lib/helpers/singleOrArray.js.map +1 -1
- package/dist/lib/helpers/summation.js +10 -4
- package/dist/lib/helpers/summation.js.map +1 -1
- package/dist/lib/index.js +0 -2
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/innerJoin.js +38 -14
- package/dist/lib/innerJoin.js.map +1 -1
- package/dist/lib/item/rate.js +2 -5
- package/dist/lib/item/rate.js.map +1 -1
- package/dist/lib/leftJoin.js +12 -9
- package/dist/lib/leftJoin.js.map +1 -1
- package/dist/lib/map.js +0 -2
- package/dist/lib/map.js.map +1 -1
- package/dist/lib/math/math.js +0 -2
- package/dist/lib/math/math.js.map +1 -1
- package/dist/lib/mutate.js +1 -3
- package/dist/lib/mutate.js.map +1 -1
- package/dist/lib/mutateWithSummary.js +1 -3
- package/dist/lib/mutateWithSummary.js.map +1 -1
- package/dist/lib/pivotLonger.js +31 -9
- package/dist/lib/pivotLonger.js.map +1 -1
- package/dist/lib/pivotWider.js +24 -21
- package/dist/lib/pivotWider.js.map +1 -1
- package/dist/lib/rename.js +0 -2
- package/dist/lib/rename.js.map +1 -1
- package/dist/lib/replaceNully.js +1 -3
- package/dist/lib/replaceNully.js.map +1 -1
- package/dist/lib/select.js +3 -5
- package/dist/lib/select.js.map +1 -1
- package/dist/lib/selectors/contains.js +0 -2
- package/dist/lib/selectors/contains.js.map +1 -1
- package/dist/lib/selectors/endsWith.js +0 -2
- package/dist/lib/selectors/endsWith.js.map +1 -1
- package/dist/lib/selectors/everything.js +0 -2
- package/dist/lib/selectors/everything.js.map +1 -1
- package/dist/lib/selectors/matches.js +0 -2
- package/dist/lib/selectors/matches.js.map +1 -1
- package/dist/lib/selectors/negate.js +2 -4
- package/dist/lib/selectors/negate.js.map +1 -1
- package/dist/lib/selectors/numRange.js +0 -2
- package/dist/lib/selectors/numRange.js.map +1 -1
- package/dist/lib/selectors/startsWith.js +0 -2
- package/dist/lib/selectors/startsWith.js.map +1 -1
- package/dist/lib/sequences/fullSeq.js +5 -3
- package/dist/lib/sequences/fullSeq.js.map +1 -1
- package/dist/lib/slice.js +2 -5
- package/dist/lib/slice.js.map +1 -1
- package/dist/lib/summarize.js +6 -6
- package/dist/lib/summarize.js.map +1 -1
- package/dist/lib/summary/deviation.js +0 -2
- package/dist/lib/summary/deviation.js.map +1 -1
- package/dist/lib/summary/first.js +0 -2
- package/dist/lib/summary/first.js.map +1 -1
- package/dist/lib/summary/last.js +0 -2
- package/dist/lib/summary/last.js.map +1 -1
- package/dist/lib/summary/max.js +0 -2
- package/dist/lib/summary/max.js.map +1 -1
- package/dist/lib/summary/mean.js +0 -2
- package/dist/lib/summary/mean.js.map +1 -1
- package/dist/lib/summary/meanRate.js +0 -2
- package/dist/lib/summary/meanRate.js.map +1 -1
- package/dist/lib/summary/median.js +0 -2
- package/dist/lib/summary/median.js.map +1 -1
- package/dist/lib/summary/min.js +0 -2
- package/dist/lib/summary/min.js.map +1 -1
- package/dist/lib/summary/n.js +0 -2
- package/dist/lib/summary/n.js.map +1 -1
- package/dist/lib/summary/nDistinct.js +2 -4
- package/dist/lib/summary/nDistinct.js.map +1 -1
- package/dist/lib/summary/sum.js +0 -2
- package/dist/lib/summary/sum.js.map +1 -1
- package/dist/lib/summary/variance.js +0 -2
- package/dist/lib/summary/variance.js.map +1 -1
- package/dist/lib/tally.js +4 -4
- package/dist/lib/tally.js.map +1 -1
- package/dist/lib/tidy.js +0 -2
- package/dist/lib/tidy.js.map +1 -1
- package/dist/lib/total.js +0 -2
- package/dist/lib/total.js.map +1 -1
- package/dist/lib/transmute.js +0 -2
- package/dist/lib/transmute.js.map +1 -1
- package/dist/lib/vector/cumsum.js +0 -2
- package/dist/lib/vector/cumsum.js.map +1 -1
- package/dist/lib/vector/lag.js +1 -3
- package/dist/lib/vector/lag.js.map +1 -1
- package/dist/lib/vector/lead.js +1 -3
- package/dist/lib/vector/lead.js.map +1 -1
- package/dist/lib/vector/roll.js +1 -3
- package/dist/lib/vector/roll.js.map +1 -1
- package/dist/lib/vector/rowNumber.js +0 -2
- package/dist/lib/vector/rowNumber.js.map +1 -1
- package/dist/lib/when.js +1 -4
- package/dist/lib/when.js.map +1 -1
- package/dist/tidy.d.ts +217 -1775
- package/dist/umd/tidy.js +307 -184
- package/dist/umd/tidy.js.map +1 -1
- package/dist/umd/tidy.min.js +1 -1
- package/dist/umd/tidy.min.js.map +1 -1
- package/genai-docs/api-core.md +357 -0
- package/genai-docs/api-grouping.md +400 -0
- package/genai-docs/api-joins.md +118 -0
- package/genai-docs/api-other.md +238 -0
- package/genai-docs/api-pivot.md +112 -0
- package/genai-docs/api-selectors.md +159 -0
- package/genai-docs/api-sequences.md +127 -0
- package/genai-docs/api-slice.md +137 -0
- package/genai-docs/api-summarize.md +528 -0
- package/genai-docs/api-vector.md +239 -0
- package/genai-docs/gotchas.md +193 -0
- package/genai-docs/index.md +44 -0
- package/genai-docs/mental-model.md +270 -0
- package/genai-docs/patterns.md +384 -0
- package/genai-docs/quick-reference.md +125 -0
- package/package.json +16 -10
- package/LICENSE +0 -21
package/dist/tidy.d.ts
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare type KeyOrFn<T> = keyof T | ((item: T) => unknown);
|
|
9
|
-
declare type Comparator<T> = (a: T, b: T) => number;
|
|
10
|
-
declare type Primitive = number | string | boolean | Date;
|
|
11
|
-
declare type NonFunctionValue = boolean | string | number | null | undefined | Array<any> | {
|
|
1
|
+
type Datum = Record<Key, any>;
|
|
2
|
+
type Vector<T, K extends keyof T = keyof T> = T[K][];
|
|
3
|
+
type Key = string | number;
|
|
4
|
+
type KeyOrFn<T> = keyof T | ((item: T) => unknown);
|
|
5
|
+
type Comparator<T> = (a: T, b: T) => number;
|
|
6
|
+
type Primitive = number | string | boolean | Date;
|
|
7
|
+
type NonFunctionValue = boolean | string | number | null | undefined | Array<any> | {
|
|
12
8
|
[key: string]: NonFunctionValue;
|
|
13
9
|
};
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
type GroupKey<K = any> = [string, K];
|
|
11
|
+
type Grouped<T> = Map<GroupKey<any>, T[] | Grouped<T>>;
|
|
16
12
|
interface TidyContext {
|
|
17
13
|
/** when grouped, tidy functions can access the grouping keys here */
|
|
18
14
|
groupKeys?: GroupKey[];
|
|
@@ -20,13 +16,13 @@ interface TidyContext {
|
|
|
20
16
|
/**
|
|
21
17
|
* Takes in array of items, outputs array of items
|
|
22
18
|
*/
|
|
23
|
-
|
|
19
|
+
type TidyFn<InputT extends object, OutputT = InputT> = (items: InputT[], context?: TidyContext) => OutputT[];
|
|
24
20
|
/**
|
|
25
21
|
* Takes in grouped items and outputs some modified version that
|
|
26
22
|
* will no longer be accepted in tidy flows.
|
|
27
23
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
type TidyGroupExportFn<InputT extends object, ExportedT> = (items: InputT[], context?: TidyContext) => ExportedT;
|
|
25
|
+
type Granularity = 's' | 'seconds' | 'second' | 'min' | 'minutes' | 'minute' | 'd' | 'days' | 'day' | 'w' | 'week' | 'weeks' | 'm' | 'month' | 'months' | 'y' | 'year' | 'years';
|
|
30
26
|
|
|
31
27
|
/**
|
|
32
28
|
* Forms a tidy pipeline that can be called with (items)
|
|
@@ -72,7 +68,7 @@ declare function when<T extends object>(predicate: ((items: T[]) => boolean) | b
|
|
|
72
68
|
*/
|
|
73
69
|
declare function map<T extends object, OutputT>(mapFn: (item: T, index: number, array: T[]) => OutputT): TidyFn<T, OutputT>;
|
|
74
70
|
|
|
75
|
-
|
|
71
|
+
type SingleOrArray<T> = T | T[];
|
|
76
72
|
|
|
77
73
|
/**
|
|
78
74
|
* Removes items with duplicate values for the specified keys.
|
|
@@ -107,37 +103,58 @@ declare function fixedOrder<T>(key: KeyOrFn<T>, order: Array<T[keyof T]>, option
|
|
|
107
103
|
position?: 'start' | 'end';
|
|
108
104
|
}): (a: T, b: T) => number;
|
|
109
105
|
|
|
110
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Flatten an intersection into a plain object type for better IntelliSense.
|
|
108
|
+
* Replaces A.Compute from ts-toolbelt.
|
|
109
|
+
*/
|
|
110
|
+
type Prettify<T> = {
|
|
111
|
+
[K in keyof T]: T[K];
|
|
112
|
+
} & {};
|
|
113
|
+
/**
|
|
114
|
+
* Merge two object types where A's properties take precedence over B's.
|
|
115
|
+
* Produces a flat object type (no leftover intersections) for clean
|
|
116
|
+
* resolution in both tsc and tsgo.
|
|
117
|
+
* Replaces O.Merge from ts-toolbelt (where first arg wins).
|
|
118
|
+
*/
|
|
119
|
+
type Merge<A, B> = Prettify<Omit<B, keyof A> & A>;
|
|
120
|
+
/**
|
|
121
|
+
* Find keys of T whose value type extends V.
|
|
122
|
+
* Replaces O.SelectKeys from ts-toolbelt.
|
|
123
|
+
*/
|
|
124
|
+
type KeysMatching<T, V> = {
|
|
125
|
+
[K in keyof T]-?: T[K] extends V ? K : never;
|
|
126
|
+
}[keyof T];
|
|
127
|
+
|
|
128
|
+
type SummarizeSpec<T> = Record<Key, (items: T[]) => any>;
|
|
111
129
|
interface SummarizeOptions<T = any> {
|
|
112
130
|
rest?: (key: keyof T) => (items: T[]) => any;
|
|
113
131
|
}
|
|
114
|
-
|
|
132
|
+
type SummarizedT<T extends object, SumSpec extends SummarizeSpec<T>, Options extends SummarizeOptions<T> | undefined> = {
|
|
115
133
|
[K in keyof SumSpec]: ReturnType<SumSpec[K]>;
|
|
116
|
-
} &
|
|
117
|
-
(NonNullable<Options>['rest'] extends Function ? Exclude<T, keyof SumSpec> : void);
|
|
134
|
+
} & (NonNullable<Options>['rest'] extends Function ? Omit<T, keyof SumSpec> : {});
|
|
118
135
|
/**
|
|
119
136
|
* summarizes items
|
|
120
137
|
*/
|
|
121
|
-
declare function summarize<T extends object, SummarizedSpec extends SummarizeSpec<T> = SummarizeSpec<T>, Options extends SummarizeOptions<T> = SummarizeOptions<T>>(summarizeSpec: SummarizedSpec, options?: Options): TidyFn<T,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
declare function summarizeAll<T extends object, F extends SummaryKeyFn<T>>(summaryFn: F): TidyFn<T,
|
|
125
|
-
declare function summarizeIf<T extends object, F extends SummaryKeyFn<T>>(predicateFn: (vector: Vector<T>) => boolean, summaryFn: F): TidyFn<T,
|
|
126
|
-
declare function summarizeAt<T extends object, Keys extends (keyof T)[], F extends SummaryKeyFn<T, Keys[number]>>(keys: Keys, summaryFn: F): TidyFn<T,
|
|
138
|
+
declare function summarize<T extends object, SummarizedSpec extends SummarizeSpec<T> = SummarizeSpec<T>, Options extends SummarizeOptions<T> = SummarizeOptions<T>>(summarizeSpec: SummarizedSpec, options?: Options): TidyFn<T, Prettify<SummarizedT<T, SummarizedSpec, Options>>>;
|
|
139
|
+
type SummaryKeyFn<T, K = keyof T> = (key: K) => (items: T[]) => any;
|
|
140
|
+
type SummaryFnOutput<T extends object, F extends SummaryKeyFn<T>> = ReturnType<ReturnType<F>>;
|
|
141
|
+
declare function summarizeAll<T extends object, F extends SummaryKeyFn<T>>(summaryFn: F): TidyFn<T, Prettify<Record<keyof T, SummaryFnOutput<T, F>>>>;
|
|
142
|
+
declare function summarizeIf<T extends object, F extends SummaryKeyFn<T>>(predicateFn: (vector: Vector<T>) => boolean, summaryFn: F): TidyFn<T, Prettify<Record<keyof T, SummaryFnOutput<T, F>>>>;
|
|
143
|
+
declare function summarizeAt<T extends object, Keys extends (keyof T)[], F extends SummaryKeyFn<T, Keys[number]>>(keys: Keys, summaryFn: F): TidyFn<T, Prettify<Record<Keys[number], SummaryFnOutput<T, F>>>>;
|
|
127
144
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
145
|
+
type MutateSpecValue$1<T, O = any> = ((item: T, index: number, array: Iterable<T>) => O) | NonFunctionValue;
|
|
146
|
+
type MutateSpec<T> = Record<Key, MutateSpecValue$1<T>>;
|
|
147
|
+
type ResolvedObj$1<Obj extends Record<Key, MutateSpecValue$1<any>>> = {
|
|
131
148
|
[K in keyof Obj]: Obj[K] extends (...args: any) => any ? ReturnType<Obj[K]> extends any[] ? ReturnType<Obj[K]>[number] : ReturnType<Obj[K]> : Obj[K];
|
|
132
149
|
};
|
|
133
|
-
|
|
134
|
-
|
|
150
|
+
type Mutated$1<T extends object, MSpec extends MutateSpec<T>> = Merge<ResolvedObj$1<MSpec>, T>;
|
|
151
|
+
type Compute$1<T> = Prettify<T>;
|
|
135
152
|
/**
|
|
136
153
|
* Mutates items, one item at a time. For mutating across multiple items,
|
|
137
154
|
* use mutateWithSummary.
|
|
138
155
|
* @param mutateSpec
|
|
139
156
|
*/
|
|
140
|
-
declare function mutate<T extends object, MSpec extends MutateSpec<T>>(mutateSpec: MSpec): TidyFn<T, Compute<Mutated<T, MSpec>>>;
|
|
157
|
+
declare function mutate<T extends object, MSpec extends MutateSpec<T>>(mutateSpec: MSpec): TidyFn<T, Compute$1<Mutated$1<T, MSpec>>>;
|
|
141
158
|
|
|
142
159
|
/**
|
|
143
160
|
* Adds a summarized total row
|
|
@@ -156,7 +173,7 @@ declare function totalIf<T extends object, F extends SummaryKeyFn<T>, MutSpec ex
|
|
|
156
173
|
*/
|
|
157
174
|
declare function totalAt<T extends object, Keys extends (keyof T)[], F extends SummaryKeyFn<T, Keys[number]>, MutSpec extends MutateSpec<T> = MutateSpec<T>>(keys: Keys, summaryFn: F, mutateSpec: MutSpec): TidyFn<T>;
|
|
158
175
|
|
|
159
|
-
|
|
176
|
+
type CountOptions = {
|
|
160
177
|
name?: string;
|
|
161
178
|
sort?: boolean;
|
|
162
179
|
wt?: string;
|
|
@@ -165,19 +182,19 @@ declare type CountOptions = {
|
|
|
165
182
|
* Tallies the number distinct values for the specified keys and adds
|
|
166
183
|
* the count as a new key (default `n`). Optionally sorts by the count.
|
|
167
184
|
*/
|
|
168
|
-
declare function count<T extends object, Keys extends SingleOrArray<KeyOrFn<T>>>(groupKeys: Keys, options?: CountOptions | null | undefined): (items: T[]) => (Keys extends keyof T ?
|
|
185
|
+
declare function count<T extends object, Keys extends SingleOrArray<KeyOrFn<T>>>(groupKeys: Keys, options?: CountOptions | null | undefined): (items: T[]) => ((Keys extends keyof T ? Omit<{
|
|
169
186
|
n: number;
|
|
170
|
-
},
|
|
187
|
+
}, Keys> & Pick<T, Keys> extends infer T_2 ? { [K_1 in keyof T_2]: T_2[K_1]; } : never : Keys extends (keyof T)[] ? Omit<{
|
|
171
188
|
n: number;
|
|
172
|
-
},
|
|
189
|
+
}, Keys[number]> & Pick<T, Keys[number]> extends infer T_3 ? { [K_2 in keyof T_3]: T_3[K_2]; } : never : {
|
|
173
190
|
n: number;
|
|
174
|
-
})[];
|
|
191
|
+
}) extends infer T_1 ? { [K in keyof T_1]: T_1[K]; } : never)[];
|
|
175
192
|
|
|
176
|
-
|
|
193
|
+
type TallyOptions = {
|
|
177
194
|
readonly name?: string;
|
|
178
195
|
readonly wt?: string;
|
|
179
196
|
};
|
|
180
|
-
|
|
197
|
+
type TallyOutput<Options extends TallyOptions> = Options['name'] extends string ? {
|
|
181
198
|
[K in Options['name']]: number;
|
|
182
199
|
} : {
|
|
183
200
|
n: number;
|
|
@@ -185,18 +202,18 @@ declare type TallyOutput<Options extends TallyOptions> = Options['name'] extends
|
|
|
185
202
|
declare function tally<T extends object, Options extends TallyOptions>(options?: Options): TidyFn<T, TallyOutput<Options>>;
|
|
186
203
|
|
|
187
204
|
/** [key, values] where values could be more nested entries */
|
|
188
|
-
|
|
189
|
-
|
|
205
|
+
type EntriesOutput = [any, any][];
|
|
206
|
+
type EntriesObjectOutput = {
|
|
190
207
|
key: Key;
|
|
191
208
|
values: any;
|
|
192
209
|
}[];
|
|
193
210
|
/** nested objects: { [key]: values } */
|
|
194
|
-
|
|
211
|
+
type ObjectOutput = Record<Key, any>;
|
|
195
212
|
/** nested keys: e.g. [key, key, key, [key, key, [key]]] */
|
|
196
|
-
|
|
213
|
+
type KeysOutput = any[];
|
|
197
214
|
/** nested values: e.g. [[value1_1, value1_2], [value2_1, value2_2]] */
|
|
198
|
-
|
|
199
|
-
|
|
215
|
+
type ValuesOutput = any[];
|
|
216
|
+
type LevelSpec = {
|
|
200
217
|
id?: string;
|
|
201
218
|
createEmptySubgroup: () => any;
|
|
202
219
|
addSubgroup: (parentGrouped: any, newSubgroup: any, key: any, level: number) => void;
|
|
@@ -235,1704 +252,127 @@ interface GroupByOptions {
|
|
|
235
252
|
/** [required for levels] specifies the export operation for each level of the grouping */
|
|
236
253
|
readonly levels?: ('entries' | 'entries-object' | 'object' | 'map' | 'keys' | 'values' | LevelSpec)[];
|
|
237
254
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
255
|
+
type GK<T extends object> = SingleOrArray<keyof T | ((d: T) => any)>;
|
|
256
|
+
type F<I extends object, O extends object> = TidyFn<I, O>;
|
|
257
|
+
type MergeGroupKeys<T extends object, Out extends object, Keys extends GK<T>> = Keys extends keyof T ? Merge<Pick<T, Keys>, Out> : Keys extends (keyof T)[] ? Merge<Pick<T, Keys[number]>, Out> : Out;
|
|
258
|
+
type WithGroupKeys<T extends object, Out extends object, Keys extends GK<T>, Opts extends GroupByOptions> = NonNullable<Opts>['addGroupKeys'] extends false ? Out : MergeGroupKeys<T, Out, Keys>;
|
|
242
259
|
/**
|
|
243
260
|
* output varies based on export options
|
|
244
261
|
*/
|
|
245
|
-
|
|
246
|
-
|
|
262
|
+
type GroupByOutput<T extends object, O extends object, Keys extends GK<T>, Opts extends GroupByOptions> = Prettify<NonNullable<Opts>['export'] extends 'grouped' ? Grouped<WithGroupKeys<T, O, Keys, Opts>> : NonNullable<Opts>['export'] extends 'entries' ? EntriesOutput : NonNullable<Opts>['export'] extends 'entries-object' ? EntriesObjectOutput : NonNullable<Opts>['export'] extends 'object' ? ObjectOutput : NonNullable<Opts>['export'] extends 'map' ? Map<any, any> : NonNullable<Opts>['export'] extends 'keys' ? KeysOutput : NonNullable<Opts>['export'] extends 'values' ? ValuesOutput : NonNullable<Opts>['export'] extends 'levels' ? any : WithGroupKeys<T, O, Keys, Opts>[]>;
|
|
263
|
+
type GroupByFn<T extends object, O extends object, Keys extends GK<T>, Opts extends GroupByOptions> = Opts['export'] extends 'grouped' | 'entries' | 'entries-object' | 'object' | 'map' | 'keys' | 'values' | 'levels' ? TidyGroupExportFn<T, GroupByOutput<T, O, Keys, Opts>> : TidyFn<T, Prettify<WithGroupKeys<T, O, Keys, Opts>>>;
|
|
247
264
|
/**
|
|
248
265
|
* Nests the data by the specified groupings
|
|
249
266
|
*/
|
|
250
|
-
declare function groupBy<T extends object, T1 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: F<T, T1>, options: Opts): GroupByFn<T, T1, Keys, Opts>;
|
|
251
|
-
declare
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
271
|
-
};
|
|
272
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
273
|
-
readonly export: "entries-object";
|
|
274
|
-
readonly flat?: boolean | undefined;
|
|
275
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
276
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
277
|
-
readonly single?: boolean | undefined;
|
|
278
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
279
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
280
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
281
|
-
};
|
|
282
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
283
|
-
readonly export: "object";
|
|
284
|
-
readonly flat?: boolean | undefined;
|
|
285
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
286
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
287
|
-
readonly single?: boolean | undefined;
|
|
288
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
289
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
290
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
291
|
-
};
|
|
292
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
293
|
-
readonly export: "map";
|
|
294
|
-
readonly flat?: boolean | undefined;
|
|
295
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
296
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
297
|
-
readonly single?: boolean | undefined;
|
|
298
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
299
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
300
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
301
|
-
};
|
|
302
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
303
|
-
readonly export: "keys";
|
|
304
|
-
readonly flat?: boolean | undefined;
|
|
305
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
306
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
307
|
-
readonly single?: boolean | undefined;
|
|
308
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
309
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
310
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
311
|
-
};
|
|
312
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
313
|
-
readonly export: "values";
|
|
314
|
-
readonly flat?: boolean | undefined;
|
|
315
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
316
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
317
|
-
readonly single?: boolean | undefined;
|
|
318
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
319
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
320
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
321
|
-
};
|
|
322
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
323
|
-
readonly export: "levels";
|
|
324
|
-
readonly flat?: boolean | undefined;
|
|
325
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
326
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
327
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
328
|
-
readonly single?: boolean | undefined;
|
|
329
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
330
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
331
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
declare function groupBy<T extends object, T1 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: F<T, T1>): GroupByFn<T, T1, Keys, GroupByOptions>;
|
|
335
|
-
declare namespace groupBy {
|
|
336
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
337
|
-
readonly export: "grouped";
|
|
338
|
-
readonly flat?: boolean | undefined;
|
|
339
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
340
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
341
|
-
readonly single?: boolean | undefined;
|
|
342
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
343
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
344
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
345
|
-
};
|
|
346
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
347
|
-
readonly export: "entries";
|
|
348
|
-
readonly flat?: boolean | undefined;
|
|
349
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
350
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
351
|
-
readonly single?: boolean | undefined;
|
|
352
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
353
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
354
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
355
|
-
};
|
|
356
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
357
|
-
readonly export: "entries-object";
|
|
358
|
-
readonly flat?: boolean | undefined;
|
|
359
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
360
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
361
|
-
readonly single?: boolean | undefined;
|
|
362
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
363
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
364
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
365
|
-
};
|
|
366
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
367
|
-
readonly export: "object";
|
|
368
|
-
readonly flat?: boolean | undefined;
|
|
369
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
370
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
371
|
-
readonly single?: boolean | undefined;
|
|
372
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
373
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
374
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
375
|
-
};
|
|
376
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
377
|
-
readonly export: "map";
|
|
378
|
-
readonly flat?: boolean | undefined;
|
|
379
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
380
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
381
|
-
readonly single?: boolean | undefined;
|
|
382
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
383
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
384
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
385
|
-
};
|
|
386
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
387
|
-
readonly export: "keys";
|
|
388
|
-
readonly flat?: boolean | undefined;
|
|
389
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
390
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
391
|
-
readonly single?: boolean | undefined;
|
|
392
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
393
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
394
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
395
|
-
};
|
|
396
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
397
|
-
readonly export: "values";
|
|
398
|
-
readonly flat?: boolean | undefined;
|
|
399
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
400
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
401
|
-
readonly single?: boolean | undefined;
|
|
402
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
403
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
404
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
405
|
-
};
|
|
406
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
407
|
-
readonly export: "levels";
|
|
408
|
-
readonly flat?: boolean | undefined;
|
|
409
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
410
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
411
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
412
|
-
readonly single?: boolean | undefined;
|
|
413
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
414
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
415
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, T7 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>, F<T6, T7>], options: Opts): GroupByFn<T, T7, Keys, Opts>;
|
|
419
|
-
declare namespace groupBy {
|
|
420
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
421
|
-
readonly export: "grouped";
|
|
422
|
-
readonly flat?: boolean | undefined;
|
|
423
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
424
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
425
|
-
readonly single?: boolean | undefined;
|
|
426
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
427
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
428
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
429
|
-
};
|
|
430
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
431
|
-
readonly export: "entries";
|
|
432
|
-
readonly flat?: boolean | undefined;
|
|
433
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
434
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
435
|
-
readonly single?: boolean | undefined;
|
|
436
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
437
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
438
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
439
|
-
};
|
|
440
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
441
|
-
readonly export: "entries-object";
|
|
442
|
-
readonly flat?: boolean | undefined;
|
|
443
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
444
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
445
|
-
readonly single?: boolean | undefined;
|
|
446
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
447
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
448
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
449
|
-
};
|
|
450
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
451
|
-
readonly export: "object";
|
|
452
|
-
readonly flat?: boolean | undefined;
|
|
453
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
454
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
455
|
-
readonly single?: boolean | undefined;
|
|
456
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
457
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
458
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
459
|
-
};
|
|
460
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
461
|
-
readonly export: "map";
|
|
462
|
-
readonly flat?: boolean | undefined;
|
|
463
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
464
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
465
|
-
readonly single?: boolean | undefined;
|
|
466
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
467
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
468
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
469
|
-
};
|
|
470
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
471
|
-
readonly export: "keys";
|
|
472
|
-
readonly flat?: boolean | undefined;
|
|
473
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
474
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
475
|
-
readonly single?: boolean | undefined;
|
|
476
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
477
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
478
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
479
|
-
};
|
|
480
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
481
|
-
readonly export: "values";
|
|
482
|
-
readonly flat?: boolean | undefined;
|
|
483
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
484
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
485
|
-
readonly single?: boolean | undefined;
|
|
486
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
487
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
488
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
489
|
-
};
|
|
490
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
491
|
-
readonly export: "levels";
|
|
492
|
-
readonly flat?: boolean | undefined;
|
|
493
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
494
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
495
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
496
|
-
readonly single?: boolean | undefined;
|
|
497
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
498
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
499
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, T7 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>, F<T6, T7>]): GroupByFn<T, T7, Keys, GroupByOptions>;
|
|
503
|
-
declare namespace groupBy {
|
|
504
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
505
|
-
readonly export: "grouped";
|
|
506
|
-
readonly flat?: boolean | undefined;
|
|
507
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
508
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
509
|
-
readonly single?: boolean | undefined;
|
|
510
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
511
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
512
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
513
|
-
};
|
|
514
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
515
|
-
readonly export: "entries";
|
|
516
|
-
readonly flat?: boolean | undefined;
|
|
517
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
518
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
519
|
-
readonly single?: boolean | undefined;
|
|
520
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
521
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
522
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
523
|
-
};
|
|
524
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
525
|
-
readonly export: "entries-object";
|
|
526
|
-
readonly flat?: boolean | undefined;
|
|
527
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
528
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
529
|
-
readonly single?: boolean | undefined;
|
|
530
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
531
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
532
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
533
|
-
};
|
|
534
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
535
|
-
readonly export: "object";
|
|
536
|
-
readonly flat?: boolean | undefined;
|
|
537
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
538
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
539
|
-
readonly single?: boolean | undefined;
|
|
540
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
541
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
542
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
543
|
-
};
|
|
544
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
545
|
-
readonly export: "map";
|
|
546
|
-
readonly flat?: boolean | undefined;
|
|
547
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
548
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
549
|
-
readonly single?: boolean | undefined;
|
|
550
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
551
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
552
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
553
|
-
};
|
|
554
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
555
|
-
readonly export: "keys";
|
|
556
|
-
readonly flat?: boolean | undefined;
|
|
557
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
558
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
559
|
-
readonly single?: boolean | undefined;
|
|
560
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
561
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
562
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
563
|
-
};
|
|
564
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
565
|
-
readonly export: "values";
|
|
566
|
-
readonly flat?: boolean | undefined;
|
|
567
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
568
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
569
|
-
readonly single?: boolean | undefined;
|
|
570
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
571
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
572
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
573
|
-
};
|
|
574
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
575
|
-
readonly export: "levels";
|
|
576
|
-
readonly flat?: boolean | undefined;
|
|
577
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
578
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
579
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
580
|
-
readonly single?: boolean | undefined;
|
|
581
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
582
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
583
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>], options: Opts): GroupByFn<T, T6, Keys, Opts>;
|
|
587
|
-
declare namespace groupBy {
|
|
588
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
589
|
-
readonly export: "grouped";
|
|
590
|
-
readonly flat?: boolean | undefined;
|
|
591
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
592
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
593
|
-
readonly single?: boolean | undefined;
|
|
594
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
595
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
596
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
597
|
-
};
|
|
598
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
599
|
-
readonly export: "entries";
|
|
600
|
-
readonly flat?: boolean | undefined;
|
|
601
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
602
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
603
|
-
readonly single?: boolean | undefined;
|
|
604
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
605
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
606
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
607
|
-
};
|
|
608
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
609
|
-
readonly export: "entries-object";
|
|
610
|
-
readonly flat?: boolean | undefined;
|
|
611
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
612
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
613
|
-
readonly single?: boolean | undefined;
|
|
614
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
615
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
616
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
617
|
-
};
|
|
618
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
619
|
-
readonly export: "object";
|
|
620
|
-
readonly flat?: boolean | undefined;
|
|
621
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
622
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
623
|
-
readonly single?: boolean | undefined;
|
|
624
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
625
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
626
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
627
|
-
};
|
|
628
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
629
|
-
readonly export: "map";
|
|
630
|
-
readonly flat?: boolean | undefined;
|
|
631
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
632
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
633
|
-
readonly single?: boolean | undefined;
|
|
634
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
635
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
636
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
637
|
-
};
|
|
638
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
639
|
-
readonly export: "keys";
|
|
640
|
-
readonly flat?: boolean | undefined;
|
|
641
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
642
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
643
|
-
readonly single?: boolean | undefined;
|
|
644
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
645
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
646
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
647
|
-
};
|
|
648
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
649
|
-
readonly export: "values";
|
|
650
|
-
readonly flat?: boolean | undefined;
|
|
651
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
652
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
653
|
-
readonly single?: boolean | undefined;
|
|
654
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
655
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
656
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
657
|
-
};
|
|
658
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
659
|
-
readonly export: "levels";
|
|
660
|
-
readonly flat?: boolean | undefined;
|
|
661
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
662
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
663
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
664
|
-
readonly single?: boolean | undefined;
|
|
665
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
666
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
667
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
668
|
-
};
|
|
669
|
-
}
|
|
670
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>]): GroupByFn<T, T6, Keys, GroupByOptions>;
|
|
671
|
-
declare namespace groupBy {
|
|
672
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
673
|
-
readonly export: "grouped";
|
|
674
|
-
readonly flat?: boolean | undefined;
|
|
675
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
676
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
677
|
-
readonly single?: boolean | undefined;
|
|
678
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
679
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
680
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
681
|
-
};
|
|
682
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
683
|
-
readonly export: "entries";
|
|
684
|
-
readonly flat?: boolean | undefined;
|
|
685
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
686
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
687
|
-
readonly single?: boolean | undefined;
|
|
688
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
689
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
690
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
691
|
-
};
|
|
692
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
693
|
-
readonly export: "entries-object";
|
|
694
|
-
readonly flat?: boolean | undefined;
|
|
695
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
696
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
697
|
-
readonly single?: boolean | undefined;
|
|
698
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
699
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
700
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
701
|
-
};
|
|
702
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
703
|
-
readonly export: "object";
|
|
704
|
-
readonly flat?: boolean | undefined;
|
|
705
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
706
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
707
|
-
readonly single?: boolean | undefined;
|
|
708
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
709
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
710
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
711
|
-
};
|
|
712
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
713
|
-
readonly export: "map";
|
|
714
|
-
readonly flat?: boolean | undefined;
|
|
715
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
716
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
717
|
-
readonly single?: boolean | undefined;
|
|
718
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
719
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
720
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
721
|
-
};
|
|
722
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
723
|
-
readonly export: "keys";
|
|
724
|
-
readonly flat?: boolean | undefined;
|
|
725
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
726
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
727
|
-
readonly single?: boolean | undefined;
|
|
728
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
729
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
730
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
731
|
-
};
|
|
732
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
733
|
-
readonly export: "values";
|
|
734
|
-
readonly flat?: boolean | undefined;
|
|
735
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
736
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
737
|
-
readonly single?: boolean | undefined;
|
|
738
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
739
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
740
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
741
|
-
};
|
|
742
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
743
|
-
readonly export: "levels";
|
|
744
|
-
readonly flat?: boolean | undefined;
|
|
745
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
746
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
747
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
748
|
-
readonly single?: boolean | undefined;
|
|
749
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
750
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
751
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
752
|
-
};
|
|
753
|
-
}
|
|
754
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>], options: Opts): GroupByFn<T, T5, Keys, Opts>;
|
|
755
|
-
declare namespace groupBy {
|
|
756
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
757
|
-
readonly export: "grouped";
|
|
758
|
-
readonly flat?: boolean | undefined;
|
|
759
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
760
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
761
|
-
readonly single?: boolean | undefined;
|
|
762
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
763
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
764
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
765
|
-
};
|
|
766
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
767
|
-
readonly export: "entries";
|
|
768
|
-
readonly flat?: boolean | undefined;
|
|
769
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
770
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
771
|
-
readonly single?: boolean | undefined;
|
|
772
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
773
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
774
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
775
|
-
};
|
|
776
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
777
|
-
readonly export: "entries-object";
|
|
778
|
-
readonly flat?: boolean | undefined;
|
|
779
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
780
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
781
|
-
readonly single?: boolean | undefined;
|
|
782
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
783
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
784
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
785
|
-
};
|
|
786
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
787
|
-
readonly export: "object";
|
|
788
|
-
readonly flat?: boolean | undefined;
|
|
789
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
790
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
791
|
-
readonly single?: boolean | undefined;
|
|
792
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
793
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
794
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
795
|
-
};
|
|
796
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
797
|
-
readonly export: "map";
|
|
798
|
-
readonly flat?: boolean | undefined;
|
|
799
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
800
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
801
|
-
readonly single?: boolean | undefined;
|
|
802
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
803
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
804
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
805
|
-
};
|
|
806
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
807
|
-
readonly export: "keys";
|
|
808
|
-
readonly flat?: boolean | undefined;
|
|
809
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
810
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
811
|
-
readonly single?: boolean | undefined;
|
|
812
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
813
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
814
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
815
|
-
};
|
|
816
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
817
|
-
readonly export: "values";
|
|
818
|
-
readonly flat?: boolean | undefined;
|
|
819
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
820
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
821
|
-
readonly single?: boolean | undefined;
|
|
822
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
823
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
824
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
825
|
-
};
|
|
826
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
827
|
-
readonly export: "levels";
|
|
828
|
-
readonly flat?: boolean | undefined;
|
|
829
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
830
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
831
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
832
|
-
readonly single?: boolean | undefined;
|
|
833
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
834
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
835
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>]): GroupByFn<T, T5, Keys, GroupByOptions>;
|
|
839
|
-
declare namespace groupBy {
|
|
840
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
841
|
-
readonly export: "grouped";
|
|
842
|
-
readonly flat?: boolean | undefined;
|
|
843
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
844
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
845
|
-
readonly single?: boolean | undefined;
|
|
846
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
847
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
848
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
849
|
-
};
|
|
850
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
851
|
-
readonly export: "entries";
|
|
852
|
-
readonly flat?: boolean | undefined;
|
|
853
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
854
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
855
|
-
readonly single?: boolean | undefined;
|
|
856
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
857
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
858
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
859
|
-
};
|
|
860
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
861
|
-
readonly export: "entries-object";
|
|
862
|
-
readonly flat?: boolean | undefined;
|
|
863
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
864
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
865
|
-
readonly single?: boolean | undefined;
|
|
866
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
867
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
868
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
869
|
-
};
|
|
870
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
871
|
-
readonly export: "object";
|
|
872
|
-
readonly flat?: boolean | undefined;
|
|
873
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
874
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
875
|
-
readonly single?: boolean | undefined;
|
|
876
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
877
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
878
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
879
|
-
};
|
|
880
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
881
|
-
readonly export: "map";
|
|
882
|
-
readonly flat?: boolean | undefined;
|
|
883
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
884
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
885
|
-
readonly single?: boolean | undefined;
|
|
886
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
887
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
888
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
889
|
-
};
|
|
890
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
891
|
-
readonly export: "keys";
|
|
892
|
-
readonly flat?: boolean | undefined;
|
|
893
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
894
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
895
|
-
readonly single?: boolean | undefined;
|
|
896
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
897
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
898
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
899
|
-
};
|
|
900
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
901
|
-
readonly export: "values";
|
|
902
|
-
readonly flat?: boolean | undefined;
|
|
903
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
904
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
905
|
-
readonly single?: boolean | undefined;
|
|
906
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
907
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
908
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
909
|
-
};
|
|
910
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
911
|
-
readonly export: "levels";
|
|
912
|
-
readonly flat?: boolean | undefined;
|
|
913
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
914
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
915
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
916
|
-
readonly single?: boolean | undefined;
|
|
917
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
918
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
919
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
920
|
-
};
|
|
921
|
-
}
|
|
922
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>], options: Opts): GroupByFn<T, T4, Keys, Opts>;
|
|
923
|
-
declare namespace groupBy {
|
|
924
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
925
|
-
readonly export: "grouped";
|
|
926
|
-
readonly flat?: boolean | undefined;
|
|
927
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
928
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
929
|
-
readonly single?: boolean | undefined;
|
|
930
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
931
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
932
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
933
|
-
};
|
|
934
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
935
|
-
readonly export: "entries";
|
|
936
|
-
readonly flat?: boolean | undefined;
|
|
937
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
938
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
939
|
-
readonly single?: boolean | undefined;
|
|
940
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
941
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
942
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
943
|
-
};
|
|
944
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
945
|
-
readonly export: "entries-object";
|
|
946
|
-
readonly flat?: boolean | undefined;
|
|
947
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
948
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
949
|
-
readonly single?: boolean | undefined;
|
|
950
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
951
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
952
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
953
|
-
};
|
|
954
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
955
|
-
readonly export: "object";
|
|
956
|
-
readonly flat?: boolean | undefined;
|
|
957
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
958
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
959
|
-
readonly single?: boolean | undefined;
|
|
960
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
961
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
962
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
963
|
-
};
|
|
964
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
965
|
-
readonly export: "map";
|
|
966
|
-
readonly flat?: boolean | undefined;
|
|
967
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
968
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
969
|
-
readonly single?: boolean | undefined;
|
|
970
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
971
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
972
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
973
|
-
};
|
|
974
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
975
|
-
readonly export: "keys";
|
|
976
|
-
readonly flat?: boolean | undefined;
|
|
977
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
978
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
979
|
-
readonly single?: boolean | undefined;
|
|
980
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
981
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
982
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
983
|
-
};
|
|
984
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
985
|
-
readonly export: "values";
|
|
986
|
-
readonly flat?: boolean | undefined;
|
|
987
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
988
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
989
|
-
readonly single?: boolean | undefined;
|
|
990
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
991
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
992
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
993
|
-
};
|
|
994
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
995
|
-
readonly export: "levels";
|
|
996
|
-
readonly flat?: boolean | undefined;
|
|
997
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
998
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
999
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1000
|
-
readonly single?: boolean | undefined;
|
|
1001
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1002
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1003
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1004
|
-
};
|
|
1005
|
-
}
|
|
1006
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>]): GroupByFn<T, T4, Keys, GroupByOptions>;
|
|
1007
|
-
declare namespace groupBy {
|
|
1008
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1009
|
-
readonly export: "grouped";
|
|
1010
|
-
readonly flat?: boolean | undefined;
|
|
1011
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1012
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1013
|
-
readonly single?: boolean | undefined;
|
|
1014
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1015
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1016
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1017
|
-
};
|
|
1018
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1019
|
-
readonly export: "entries";
|
|
1020
|
-
readonly flat?: boolean | undefined;
|
|
1021
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1022
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1023
|
-
readonly single?: boolean | undefined;
|
|
1024
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1025
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1026
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1027
|
-
};
|
|
1028
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1029
|
-
readonly export: "entries-object";
|
|
1030
|
-
readonly flat?: boolean | undefined;
|
|
1031
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1032
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1033
|
-
readonly single?: boolean | undefined;
|
|
1034
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1035
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1036
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1037
|
-
};
|
|
1038
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1039
|
-
readonly export: "object";
|
|
1040
|
-
readonly flat?: boolean | undefined;
|
|
1041
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1042
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1043
|
-
readonly single?: boolean | undefined;
|
|
1044
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1045
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1046
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1047
|
-
};
|
|
1048
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1049
|
-
readonly export: "map";
|
|
1050
|
-
readonly flat?: boolean | undefined;
|
|
1051
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1052
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1053
|
-
readonly single?: boolean | undefined;
|
|
1054
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1055
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1056
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1057
|
-
};
|
|
1058
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1059
|
-
readonly export: "keys";
|
|
1060
|
-
readonly flat?: boolean | undefined;
|
|
1061
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1062
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1063
|
-
readonly single?: boolean | undefined;
|
|
1064
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1065
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1066
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1067
|
-
};
|
|
1068
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1069
|
-
readonly export: "values";
|
|
1070
|
-
readonly flat?: boolean | undefined;
|
|
1071
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1072
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1073
|
-
readonly single?: boolean | undefined;
|
|
1074
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1075
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1076
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1077
|
-
};
|
|
1078
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1079
|
-
readonly export: "levels";
|
|
1080
|
-
readonly flat?: boolean | undefined;
|
|
1081
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1082
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1083
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1084
|
-
readonly single?: boolean | undefined;
|
|
1085
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1086
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1087
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1088
|
-
};
|
|
1089
|
-
}
|
|
1090
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>], options: Opts): GroupByFn<T, T3, Keys, Opts>;
|
|
1091
|
-
declare namespace groupBy {
|
|
1092
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1093
|
-
readonly export: "grouped";
|
|
1094
|
-
readonly flat?: boolean | undefined;
|
|
1095
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1096
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1097
|
-
readonly single?: boolean | undefined;
|
|
1098
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1099
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1100
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1101
|
-
};
|
|
1102
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1103
|
-
readonly export: "entries";
|
|
1104
|
-
readonly flat?: boolean | undefined;
|
|
1105
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1106
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1107
|
-
readonly single?: boolean | undefined;
|
|
1108
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1109
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1110
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1111
|
-
};
|
|
1112
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1113
|
-
readonly export: "entries-object";
|
|
1114
|
-
readonly flat?: boolean | undefined;
|
|
1115
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1116
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1117
|
-
readonly single?: boolean | undefined;
|
|
1118
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1119
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1120
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1121
|
-
};
|
|
1122
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1123
|
-
readonly export: "object";
|
|
1124
|
-
readonly flat?: boolean | undefined;
|
|
1125
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1126
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1127
|
-
readonly single?: boolean | undefined;
|
|
1128
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1129
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1130
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1131
|
-
};
|
|
1132
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1133
|
-
readonly export: "map";
|
|
1134
|
-
readonly flat?: boolean | undefined;
|
|
1135
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1136
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1137
|
-
readonly single?: boolean | undefined;
|
|
1138
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1139
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1140
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1141
|
-
};
|
|
1142
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1143
|
-
readonly export: "keys";
|
|
1144
|
-
readonly flat?: boolean | undefined;
|
|
1145
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1146
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1147
|
-
readonly single?: boolean | undefined;
|
|
1148
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1149
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1150
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1151
|
-
};
|
|
1152
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1153
|
-
readonly export: "values";
|
|
1154
|
-
readonly flat?: boolean | undefined;
|
|
1155
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1156
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1157
|
-
readonly single?: boolean | undefined;
|
|
1158
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1159
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1160
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1161
|
-
};
|
|
1162
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1163
|
-
readonly export: "levels";
|
|
1164
|
-
readonly flat?: boolean | undefined;
|
|
1165
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1166
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1167
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1168
|
-
readonly single?: boolean | undefined;
|
|
1169
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1170
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1171
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1172
|
-
};
|
|
1173
|
-
}
|
|
1174
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>]): GroupByFn<T, T3, Keys, GroupByOptions>;
|
|
267
|
+
declare function groupBy<T extends object, T1 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: F<T, T1>, options: Opts): GroupByFn<T, T1, Keys, Opts>;
|
|
268
|
+
declare function groupBy<T extends object, T1 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: F<T, T1>): GroupByFn<T, T1, Keys, GroupByOptions>;
|
|
269
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, T7 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>, F<T6, T7>], options: Opts): GroupByFn<T, T7, Keys, Opts>;
|
|
270
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, T7 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>, F<T6, T7>]): GroupByFn<T, T7, Keys, GroupByOptions>;
|
|
271
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>], options: Opts): GroupByFn<T, T6, Keys, Opts>;
|
|
272
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>]): GroupByFn<T, T6, Keys, GroupByOptions>;
|
|
273
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>], options: Opts): GroupByFn<T, T5, Keys, Opts>;
|
|
274
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>]): GroupByFn<T, T5, Keys, GroupByOptions>;
|
|
275
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>], options: Opts): GroupByFn<T, T4, Keys, Opts>;
|
|
276
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>]): GroupByFn<T, T4, Keys, GroupByOptions>;
|
|
277
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>], options: Opts): GroupByFn<T, T3, Keys, Opts>;
|
|
278
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>]): GroupByFn<T, T3, Keys, GroupByOptions>;
|
|
279
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>], options: Opts): GroupByFn<T, T2, Keys, Opts>;
|
|
280
|
+
declare function groupBy<T extends object, T1 extends object, T2 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>]): GroupByFn<T, T2, Keys, GroupByOptions>;
|
|
281
|
+
declare function groupBy<T extends object, T1 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>], options: Opts): GroupByFn<T, T1, Keys, Opts>;
|
|
282
|
+
declare function groupBy<T extends object, T1 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>]): GroupByFn<T, T1, Keys, GroupByOptions>;
|
|
283
|
+
declare function groupBy<T extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [], options: Opts): GroupByFn<T, T, Keys, Opts>;
|
|
284
|
+
declare function groupBy<T extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: []): GroupByFn<T, T, Keys, GroupByOptions>;
|
|
285
|
+
declare function groupBy<T extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, options: Opts): GroupByFn<T, T, Keys, Opts>;
|
|
286
|
+
declare function groupBy<T extends object, const Keys extends GK<T>>(groupKeys: Keys): GroupByFn<T, T, Keys, GroupByOptions>;
|
|
1175
287
|
declare namespace groupBy {
|
|
1176
|
-
var grouped: (options?: Omit<GroupByOptions, "
|
|
288
|
+
var grouped: (options?: Omit<GroupByOptions, "export" | "levels">) => {
|
|
1177
289
|
readonly export: "grouped";
|
|
1178
|
-
readonly
|
|
1179
|
-
readonly
|
|
1180
|
-
readonly compositeKey?: (
|
|
1181
|
-
readonly single?: boolean
|
|
1182
|
-
readonly mapLeaf?: (
|
|
1183
|
-
readonly mapLeaves?: (
|
|
1184
|
-
readonly mapEntry?: (
|
|
1185
|
-
};
|
|
1186
|
-
var entries: (options?: Omit<GroupByOptions, "
|
|
290
|
+
readonly addGroupKeys?: boolean;
|
|
291
|
+
readonly flat?: boolean;
|
|
292
|
+
readonly compositeKey?: (keys: any[]) => string;
|
|
293
|
+
readonly single?: boolean;
|
|
294
|
+
readonly mapLeaf?: (value: any) => any;
|
|
295
|
+
readonly mapLeaves?: (values: any[]) => any;
|
|
296
|
+
readonly mapEntry?: (entry: [any, any], level: number) => any;
|
|
297
|
+
};
|
|
298
|
+
var entries: (options?: Omit<GroupByOptions, "export" | "levels">) => {
|
|
1187
299
|
readonly export: "entries";
|
|
1188
|
-
readonly
|
|
1189
|
-
readonly
|
|
1190
|
-
readonly compositeKey?: (
|
|
1191
|
-
readonly single?: boolean
|
|
1192
|
-
readonly mapLeaf?: (
|
|
1193
|
-
readonly mapLeaves?: (
|
|
1194
|
-
readonly mapEntry?: (
|
|
1195
|
-
};
|
|
1196
|
-
var entriesObject: (options?: Omit<GroupByOptions, "
|
|
300
|
+
readonly addGroupKeys?: boolean;
|
|
301
|
+
readonly flat?: boolean;
|
|
302
|
+
readonly compositeKey?: (keys: any[]) => string;
|
|
303
|
+
readonly single?: boolean;
|
|
304
|
+
readonly mapLeaf?: (value: any) => any;
|
|
305
|
+
readonly mapLeaves?: (values: any[]) => any;
|
|
306
|
+
readonly mapEntry?: (entry: [any, any], level: number) => any;
|
|
307
|
+
};
|
|
308
|
+
var entriesObject: (options?: Omit<GroupByOptions, "export" | "levels">) => {
|
|
1197
309
|
readonly export: "entries-object";
|
|
1198
|
-
readonly
|
|
1199
|
-
readonly
|
|
1200
|
-
readonly compositeKey?: (
|
|
1201
|
-
readonly single?: boolean
|
|
1202
|
-
readonly mapLeaf?: (
|
|
1203
|
-
readonly mapLeaves?: (
|
|
1204
|
-
readonly mapEntry?: (
|
|
1205
|
-
};
|
|
1206
|
-
var object: (options?: Omit<GroupByOptions, "
|
|
310
|
+
readonly addGroupKeys?: boolean;
|
|
311
|
+
readonly flat?: boolean;
|
|
312
|
+
readonly compositeKey?: (keys: any[]) => string;
|
|
313
|
+
readonly single?: boolean;
|
|
314
|
+
readonly mapLeaf?: (value: any) => any;
|
|
315
|
+
readonly mapLeaves?: (values: any[]) => any;
|
|
316
|
+
readonly mapEntry?: (entry: [any, any], level: number) => any;
|
|
317
|
+
};
|
|
318
|
+
var object: (options?: Omit<GroupByOptions, "export" | "levels">) => {
|
|
1207
319
|
readonly export: "object";
|
|
1208
|
-
readonly
|
|
1209
|
-
readonly
|
|
1210
|
-
readonly compositeKey?: (
|
|
1211
|
-
readonly single?: boolean
|
|
1212
|
-
readonly mapLeaf?: (
|
|
1213
|
-
readonly mapLeaves?: (
|
|
1214
|
-
readonly mapEntry?: (
|
|
1215
|
-
};
|
|
1216
|
-
var map: (options?: Omit<GroupByOptions, "
|
|
320
|
+
readonly addGroupKeys?: boolean;
|
|
321
|
+
readonly flat?: boolean;
|
|
322
|
+
readonly compositeKey?: (keys: any[]) => string;
|
|
323
|
+
readonly single?: boolean;
|
|
324
|
+
readonly mapLeaf?: (value: any) => any;
|
|
325
|
+
readonly mapLeaves?: (values: any[]) => any;
|
|
326
|
+
readonly mapEntry?: (entry: [any, any], level: number) => any;
|
|
327
|
+
};
|
|
328
|
+
var map: (options?: Omit<GroupByOptions, "export" | "levels">) => {
|
|
1217
329
|
readonly export: "map";
|
|
1218
|
-
readonly
|
|
1219
|
-
readonly
|
|
1220
|
-
readonly compositeKey?: (
|
|
1221
|
-
readonly single?: boolean
|
|
1222
|
-
readonly mapLeaf?: (
|
|
1223
|
-
readonly mapLeaves?: (
|
|
1224
|
-
readonly mapEntry?: (
|
|
1225
|
-
};
|
|
1226
|
-
var keys: (options?: Omit<GroupByOptions, "
|
|
330
|
+
readonly addGroupKeys?: boolean;
|
|
331
|
+
readonly flat?: boolean;
|
|
332
|
+
readonly compositeKey?: (keys: any[]) => string;
|
|
333
|
+
readonly single?: boolean;
|
|
334
|
+
readonly mapLeaf?: (value: any) => any;
|
|
335
|
+
readonly mapLeaves?: (values: any[]) => any;
|
|
336
|
+
readonly mapEntry?: (entry: [any, any], level: number) => any;
|
|
337
|
+
};
|
|
338
|
+
var keys: (options?: Omit<GroupByOptions, "export" | "levels">) => {
|
|
1227
339
|
readonly export: "keys";
|
|
1228
|
-
readonly
|
|
1229
|
-
readonly
|
|
1230
|
-
readonly compositeKey?: (
|
|
1231
|
-
readonly single?: boolean
|
|
1232
|
-
readonly mapLeaf?: (
|
|
1233
|
-
readonly mapLeaves?: (
|
|
1234
|
-
readonly mapEntry?: (
|
|
1235
|
-
};
|
|
1236
|
-
var values: (options?: Omit<GroupByOptions, "
|
|
340
|
+
readonly addGroupKeys?: boolean;
|
|
341
|
+
readonly flat?: boolean;
|
|
342
|
+
readonly compositeKey?: (keys: any[]) => string;
|
|
343
|
+
readonly single?: boolean;
|
|
344
|
+
readonly mapLeaf?: (value: any) => any;
|
|
345
|
+
readonly mapLeaves?: (values: any[]) => any;
|
|
346
|
+
readonly mapEntry?: (entry: [any, any], level: number) => any;
|
|
347
|
+
};
|
|
348
|
+
var values: (options?: Omit<GroupByOptions, "export" | "levels">) => {
|
|
1237
349
|
readonly export: "values";
|
|
1238
|
-
readonly
|
|
1239
|
-
readonly
|
|
1240
|
-
readonly compositeKey?: (
|
|
1241
|
-
readonly single?: boolean
|
|
1242
|
-
readonly mapLeaf?: (
|
|
1243
|
-
readonly mapLeaves?: (
|
|
1244
|
-
readonly mapEntry?: (
|
|
1245
|
-
};
|
|
1246
|
-
var levels: (options?: Omit<GroupByOptions, "export">
|
|
350
|
+
readonly addGroupKeys?: boolean;
|
|
351
|
+
readonly flat?: boolean;
|
|
352
|
+
readonly compositeKey?: (keys: any[]) => string;
|
|
353
|
+
readonly single?: boolean;
|
|
354
|
+
readonly mapLeaf?: (value: any) => any;
|
|
355
|
+
readonly mapLeaves?: (values: any[]) => any;
|
|
356
|
+
readonly mapEntry?: (entry: [any, any], level: number) => any;
|
|
357
|
+
};
|
|
358
|
+
var levels: (options?: Omit<GroupByOptions, "export">) => {
|
|
1247
359
|
readonly export: "levels";
|
|
1248
|
-
readonly
|
|
1249
|
-
readonly
|
|
1250
|
-
readonly
|
|
1251
|
-
readonly compositeKey?: (
|
|
1252
|
-
readonly single?: boolean
|
|
1253
|
-
readonly mapLeaf?: (
|
|
1254
|
-
readonly mapLeaves?: (
|
|
1255
|
-
readonly mapEntry?: (
|
|
1256
|
-
};
|
|
1257
|
-
}
|
|
1258
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>], options: Opts): GroupByFn<T, T2, Keys, Opts>;
|
|
1259
|
-
declare namespace groupBy {
|
|
1260
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1261
|
-
readonly export: "grouped";
|
|
1262
|
-
readonly flat?: boolean | undefined;
|
|
1263
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1264
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1265
|
-
readonly single?: boolean | undefined;
|
|
1266
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1267
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1268
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1269
|
-
};
|
|
1270
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1271
|
-
readonly export: "entries";
|
|
1272
|
-
readonly flat?: boolean | undefined;
|
|
1273
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1274
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1275
|
-
readonly single?: boolean | undefined;
|
|
1276
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1277
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1278
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1279
|
-
};
|
|
1280
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1281
|
-
readonly export: "entries-object";
|
|
1282
|
-
readonly flat?: boolean | undefined;
|
|
1283
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1284
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1285
|
-
readonly single?: boolean | undefined;
|
|
1286
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1287
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1288
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1289
|
-
};
|
|
1290
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1291
|
-
readonly export: "object";
|
|
1292
|
-
readonly flat?: boolean | undefined;
|
|
1293
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1294
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1295
|
-
readonly single?: boolean | undefined;
|
|
1296
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1297
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1298
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1299
|
-
};
|
|
1300
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1301
|
-
readonly export: "map";
|
|
1302
|
-
readonly flat?: boolean | undefined;
|
|
1303
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1304
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1305
|
-
readonly single?: boolean | undefined;
|
|
1306
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1307
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1308
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1309
|
-
};
|
|
1310
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1311
|
-
readonly export: "keys";
|
|
1312
|
-
readonly flat?: boolean | undefined;
|
|
1313
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1314
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1315
|
-
readonly single?: boolean | undefined;
|
|
1316
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1317
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1318
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1319
|
-
};
|
|
1320
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1321
|
-
readonly export: "values";
|
|
1322
|
-
readonly flat?: boolean | undefined;
|
|
1323
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1324
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1325
|
-
readonly single?: boolean | undefined;
|
|
1326
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1327
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1328
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1329
|
-
};
|
|
1330
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1331
|
-
readonly export: "levels";
|
|
1332
|
-
readonly flat?: boolean | undefined;
|
|
1333
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1334
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1335
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1336
|
-
readonly single?: boolean | undefined;
|
|
1337
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1338
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1339
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1340
|
-
};
|
|
1341
|
-
}
|
|
1342
|
-
declare function groupBy<T extends object, T1 extends object, T2 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>]): GroupByFn<T, T2, Keys, GroupByOptions>;
|
|
1343
|
-
declare namespace groupBy {
|
|
1344
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1345
|
-
readonly export: "grouped";
|
|
1346
|
-
readonly flat?: boolean | undefined;
|
|
1347
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1348
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1349
|
-
readonly single?: boolean | undefined;
|
|
1350
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1351
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1352
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1353
|
-
};
|
|
1354
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1355
|
-
readonly export: "entries";
|
|
1356
|
-
readonly flat?: boolean | undefined;
|
|
1357
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1358
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1359
|
-
readonly single?: boolean | undefined;
|
|
1360
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1361
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1362
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1363
|
-
};
|
|
1364
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1365
|
-
readonly export: "entries-object";
|
|
1366
|
-
readonly flat?: boolean | undefined;
|
|
1367
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1368
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1369
|
-
readonly single?: boolean | undefined;
|
|
1370
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1371
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1372
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1373
|
-
};
|
|
1374
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1375
|
-
readonly export: "object";
|
|
1376
|
-
readonly flat?: boolean | undefined;
|
|
1377
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1378
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1379
|
-
readonly single?: boolean | undefined;
|
|
1380
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1381
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1382
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1383
|
-
};
|
|
1384
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1385
|
-
readonly export: "map";
|
|
1386
|
-
readonly flat?: boolean | undefined;
|
|
1387
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1388
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1389
|
-
readonly single?: boolean | undefined;
|
|
1390
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1391
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1392
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1393
|
-
};
|
|
1394
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1395
|
-
readonly export: "keys";
|
|
1396
|
-
readonly flat?: boolean | undefined;
|
|
1397
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1398
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1399
|
-
readonly single?: boolean | undefined;
|
|
1400
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1401
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1402
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1403
|
-
};
|
|
1404
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1405
|
-
readonly export: "values";
|
|
1406
|
-
readonly flat?: boolean | undefined;
|
|
1407
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1408
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1409
|
-
readonly single?: boolean | undefined;
|
|
1410
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1411
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1412
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1413
|
-
};
|
|
1414
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1415
|
-
readonly export: "levels";
|
|
1416
|
-
readonly flat?: boolean | undefined;
|
|
1417
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1418
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1419
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1420
|
-
readonly single?: boolean | undefined;
|
|
1421
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1422
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1423
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1424
|
-
};
|
|
1425
|
-
}
|
|
1426
|
-
declare function groupBy<T extends object, T1 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>], options: Opts): GroupByFn<T, T1, Keys, Opts>;
|
|
1427
|
-
declare namespace groupBy {
|
|
1428
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1429
|
-
readonly export: "grouped";
|
|
1430
|
-
readonly flat?: boolean | undefined;
|
|
1431
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1432
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1433
|
-
readonly single?: boolean | undefined;
|
|
1434
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1435
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1436
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1437
|
-
};
|
|
1438
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1439
|
-
readonly export: "entries";
|
|
1440
|
-
readonly flat?: boolean | undefined;
|
|
1441
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1442
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1443
|
-
readonly single?: boolean | undefined;
|
|
1444
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1445
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1446
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1447
|
-
};
|
|
1448
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1449
|
-
readonly export: "entries-object";
|
|
1450
|
-
readonly flat?: boolean | undefined;
|
|
1451
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1452
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1453
|
-
readonly single?: boolean | undefined;
|
|
1454
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1455
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1456
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1457
|
-
};
|
|
1458
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1459
|
-
readonly export: "object";
|
|
1460
|
-
readonly flat?: boolean | undefined;
|
|
1461
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1462
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1463
|
-
readonly single?: boolean | undefined;
|
|
1464
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1465
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1466
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1467
|
-
};
|
|
1468
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1469
|
-
readonly export: "map";
|
|
1470
|
-
readonly flat?: boolean | undefined;
|
|
1471
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1472
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1473
|
-
readonly single?: boolean | undefined;
|
|
1474
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1475
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1476
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1477
|
-
};
|
|
1478
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1479
|
-
readonly export: "keys";
|
|
1480
|
-
readonly flat?: boolean | undefined;
|
|
1481
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1482
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1483
|
-
readonly single?: boolean | undefined;
|
|
1484
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1485
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1486
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1487
|
-
};
|
|
1488
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1489
|
-
readonly export: "values";
|
|
1490
|
-
readonly flat?: boolean | undefined;
|
|
1491
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1492
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1493
|
-
readonly single?: boolean | undefined;
|
|
1494
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1495
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1496
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1497
|
-
};
|
|
1498
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1499
|
-
readonly export: "levels";
|
|
1500
|
-
readonly flat?: boolean | undefined;
|
|
1501
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1502
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1503
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1504
|
-
readonly single?: boolean | undefined;
|
|
1505
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1506
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1507
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1508
|
-
};
|
|
1509
|
-
}
|
|
1510
|
-
declare function groupBy<T extends object, T1 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>]): GroupByFn<T, T1, Keys, GroupByOptions>;
|
|
1511
|
-
declare namespace groupBy {
|
|
1512
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1513
|
-
readonly export: "grouped";
|
|
1514
|
-
readonly flat?: boolean | undefined;
|
|
1515
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1516
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1517
|
-
readonly single?: boolean | undefined;
|
|
1518
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1519
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1520
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1521
|
-
};
|
|
1522
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1523
|
-
readonly export: "entries";
|
|
1524
|
-
readonly flat?: boolean | undefined;
|
|
1525
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1526
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1527
|
-
readonly single?: boolean | undefined;
|
|
1528
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1529
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1530
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1531
|
-
};
|
|
1532
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1533
|
-
readonly export: "entries-object";
|
|
1534
|
-
readonly flat?: boolean | undefined;
|
|
1535
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1536
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1537
|
-
readonly single?: boolean | undefined;
|
|
1538
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1539
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1540
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1541
|
-
};
|
|
1542
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1543
|
-
readonly export: "object";
|
|
1544
|
-
readonly flat?: boolean | undefined;
|
|
1545
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1546
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1547
|
-
readonly single?: boolean | undefined;
|
|
1548
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1549
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1550
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1551
|
-
};
|
|
1552
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1553
|
-
readonly export: "map";
|
|
1554
|
-
readonly flat?: boolean | undefined;
|
|
1555
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1556
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1557
|
-
readonly single?: boolean | undefined;
|
|
1558
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1559
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1560
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1561
|
-
};
|
|
1562
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1563
|
-
readonly export: "keys";
|
|
1564
|
-
readonly flat?: boolean | undefined;
|
|
1565
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1566
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1567
|
-
readonly single?: boolean | undefined;
|
|
1568
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1569
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1570
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1571
|
-
};
|
|
1572
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1573
|
-
readonly export: "values";
|
|
1574
|
-
readonly flat?: boolean | undefined;
|
|
1575
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1576
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1577
|
-
readonly single?: boolean | undefined;
|
|
1578
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1579
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1580
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1581
|
-
};
|
|
1582
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1583
|
-
readonly export: "levels";
|
|
1584
|
-
readonly flat?: boolean | undefined;
|
|
1585
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1586
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1587
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1588
|
-
readonly single?: boolean | undefined;
|
|
1589
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1590
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1591
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
declare function groupBy<T extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [], options: Opts): GroupByFn<T, T, Keys, Opts>;
|
|
1595
|
-
declare namespace groupBy {
|
|
1596
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1597
|
-
readonly export: "grouped";
|
|
1598
|
-
readonly flat?: boolean | undefined;
|
|
1599
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1600
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1601
|
-
readonly single?: boolean | undefined;
|
|
1602
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1603
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1604
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1605
|
-
};
|
|
1606
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1607
|
-
readonly export: "entries";
|
|
1608
|
-
readonly flat?: boolean | undefined;
|
|
1609
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1610
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1611
|
-
readonly single?: boolean | undefined;
|
|
1612
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1613
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1614
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1615
|
-
};
|
|
1616
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1617
|
-
readonly export: "entries-object";
|
|
1618
|
-
readonly flat?: boolean | undefined;
|
|
1619
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1620
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1621
|
-
readonly single?: boolean | undefined;
|
|
1622
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1623
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1624
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1625
|
-
};
|
|
1626
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1627
|
-
readonly export: "object";
|
|
1628
|
-
readonly flat?: boolean | undefined;
|
|
1629
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1630
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1631
|
-
readonly single?: boolean | undefined;
|
|
1632
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1633
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1634
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1635
|
-
};
|
|
1636
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1637
|
-
readonly export: "map";
|
|
1638
|
-
readonly flat?: boolean | undefined;
|
|
1639
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1640
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1641
|
-
readonly single?: boolean | undefined;
|
|
1642
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1643
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1644
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1645
|
-
};
|
|
1646
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1647
|
-
readonly export: "keys";
|
|
1648
|
-
readonly flat?: boolean | undefined;
|
|
1649
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1650
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1651
|
-
readonly single?: boolean | undefined;
|
|
1652
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1653
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1654
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1655
|
-
};
|
|
1656
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1657
|
-
readonly export: "values";
|
|
1658
|
-
readonly flat?: boolean | undefined;
|
|
1659
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1660
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1661
|
-
readonly single?: boolean | undefined;
|
|
1662
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1663
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1664
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1665
|
-
};
|
|
1666
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1667
|
-
readonly export: "levels";
|
|
1668
|
-
readonly flat?: boolean | undefined;
|
|
1669
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1670
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1671
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1672
|
-
readonly single?: boolean | undefined;
|
|
1673
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1674
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1675
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
declare function groupBy<T extends object, Keys extends GK<T>>(groupKeys: Keys, fns: []): GroupByFn<T, T, Keys, GroupByOptions>;
|
|
1679
|
-
declare namespace groupBy {
|
|
1680
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1681
|
-
readonly export: "grouped";
|
|
1682
|
-
readonly flat?: boolean | undefined;
|
|
1683
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1684
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1685
|
-
readonly single?: boolean | undefined;
|
|
1686
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1687
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1688
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1689
|
-
};
|
|
1690
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1691
|
-
readonly export: "entries";
|
|
1692
|
-
readonly flat?: boolean | undefined;
|
|
1693
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1694
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1695
|
-
readonly single?: boolean | undefined;
|
|
1696
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1697
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1698
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1699
|
-
};
|
|
1700
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1701
|
-
readonly export: "entries-object";
|
|
1702
|
-
readonly flat?: boolean | undefined;
|
|
1703
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1704
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1705
|
-
readonly single?: boolean | undefined;
|
|
1706
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1707
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1708
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1709
|
-
};
|
|
1710
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1711
|
-
readonly export: "object";
|
|
1712
|
-
readonly flat?: boolean | undefined;
|
|
1713
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1714
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1715
|
-
readonly single?: boolean | undefined;
|
|
1716
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1717
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1718
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1719
|
-
};
|
|
1720
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1721
|
-
readonly export: "map";
|
|
1722
|
-
readonly flat?: boolean | undefined;
|
|
1723
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1724
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1725
|
-
readonly single?: boolean | undefined;
|
|
1726
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1727
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1728
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1729
|
-
};
|
|
1730
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1731
|
-
readonly export: "keys";
|
|
1732
|
-
readonly flat?: boolean | undefined;
|
|
1733
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1734
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1735
|
-
readonly single?: boolean | undefined;
|
|
1736
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1737
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1738
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1739
|
-
};
|
|
1740
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1741
|
-
readonly export: "values";
|
|
1742
|
-
readonly flat?: boolean | undefined;
|
|
1743
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1744
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1745
|
-
readonly single?: boolean | undefined;
|
|
1746
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1747
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1748
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1749
|
-
};
|
|
1750
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1751
|
-
readonly export: "levels";
|
|
1752
|
-
readonly flat?: boolean | undefined;
|
|
1753
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1754
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1755
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1756
|
-
readonly single?: boolean | undefined;
|
|
1757
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1758
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1759
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1760
|
-
};
|
|
1761
|
-
}
|
|
1762
|
-
declare function groupBy<T extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, options: Opts): GroupByFn<T, T, Keys, Opts>;
|
|
1763
|
-
declare namespace groupBy {
|
|
1764
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1765
|
-
readonly export: "grouped";
|
|
1766
|
-
readonly flat?: boolean | undefined;
|
|
1767
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1768
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1769
|
-
readonly single?: boolean | undefined;
|
|
1770
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1771
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1772
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1773
|
-
};
|
|
1774
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1775
|
-
readonly export: "entries";
|
|
1776
|
-
readonly flat?: boolean | undefined;
|
|
1777
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1778
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1779
|
-
readonly single?: boolean | undefined;
|
|
1780
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1781
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1782
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1783
|
-
};
|
|
1784
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1785
|
-
readonly export: "entries-object";
|
|
1786
|
-
readonly flat?: boolean | undefined;
|
|
1787
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1788
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1789
|
-
readonly single?: boolean | undefined;
|
|
1790
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1791
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1792
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1793
|
-
};
|
|
1794
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1795
|
-
readonly export: "object";
|
|
1796
|
-
readonly flat?: boolean | undefined;
|
|
1797
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1798
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1799
|
-
readonly single?: boolean | undefined;
|
|
1800
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1801
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1802
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1803
|
-
};
|
|
1804
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1805
|
-
readonly export: "map";
|
|
1806
|
-
readonly flat?: boolean | undefined;
|
|
1807
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1808
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1809
|
-
readonly single?: boolean | undefined;
|
|
1810
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1811
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1812
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1813
|
-
};
|
|
1814
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1815
|
-
readonly export: "keys";
|
|
1816
|
-
readonly flat?: boolean | undefined;
|
|
1817
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1818
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1819
|
-
readonly single?: boolean | undefined;
|
|
1820
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1821
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1822
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1823
|
-
};
|
|
1824
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1825
|
-
readonly export: "values";
|
|
1826
|
-
readonly flat?: boolean | undefined;
|
|
1827
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1828
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1829
|
-
readonly single?: boolean | undefined;
|
|
1830
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1831
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1832
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1833
|
-
};
|
|
1834
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1835
|
-
readonly export: "levels";
|
|
1836
|
-
readonly flat?: boolean | undefined;
|
|
1837
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1838
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1839
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1840
|
-
readonly single?: boolean | undefined;
|
|
1841
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1842
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1843
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1844
|
-
};
|
|
1845
|
-
}
|
|
1846
|
-
declare function groupBy<T extends object, Keys extends GK<T>>(groupKeys: Keys): GroupByFn<T, T, Keys, GroupByOptions>;
|
|
1847
|
-
declare namespace groupBy {
|
|
1848
|
-
var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1849
|
-
readonly export: "grouped";
|
|
1850
|
-
readonly flat?: boolean | undefined;
|
|
1851
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1852
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1853
|
-
readonly single?: boolean | undefined;
|
|
1854
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1855
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1856
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1857
|
-
};
|
|
1858
|
-
var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1859
|
-
readonly export: "entries";
|
|
1860
|
-
readonly flat?: boolean | undefined;
|
|
1861
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1862
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1863
|
-
readonly single?: boolean | undefined;
|
|
1864
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1865
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1866
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1867
|
-
};
|
|
1868
|
-
var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1869
|
-
readonly export: "entries-object";
|
|
1870
|
-
readonly flat?: boolean | undefined;
|
|
1871
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1872
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1873
|
-
readonly single?: boolean | undefined;
|
|
1874
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1875
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1876
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1877
|
-
};
|
|
1878
|
-
var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1879
|
-
readonly export: "object";
|
|
1880
|
-
readonly flat?: boolean | undefined;
|
|
1881
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1882
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1883
|
-
readonly single?: boolean | undefined;
|
|
1884
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1885
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1886
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1887
|
-
};
|
|
1888
|
-
var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1889
|
-
readonly export: "map";
|
|
1890
|
-
readonly flat?: boolean | undefined;
|
|
1891
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1892
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1893
|
-
readonly single?: boolean | undefined;
|
|
1894
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1895
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1896
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1897
|
-
};
|
|
1898
|
-
var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1899
|
-
readonly export: "keys";
|
|
1900
|
-
readonly flat?: boolean | undefined;
|
|
1901
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1902
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1903
|
-
readonly single?: boolean | undefined;
|
|
1904
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1905
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1906
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1907
|
-
};
|
|
1908
|
-
var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
|
|
1909
|
-
readonly export: "values";
|
|
1910
|
-
readonly flat?: boolean | undefined;
|
|
1911
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1912
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1913
|
-
readonly single?: boolean | undefined;
|
|
1914
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1915
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1916
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
1917
|
-
};
|
|
1918
|
-
var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
|
|
1919
|
-
readonly export: "levels";
|
|
1920
|
-
readonly flat?: boolean | undefined;
|
|
1921
|
-
readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
|
|
1922
|
-
readonly addGroupKeys?: boolean | undefined;
|
|
1923
|
-
readonly compositeKey?: ((keys: any[]) => string) | undefined;
|
|
1924
|
-
readonly single?: boolean | undefined;
|
|
1925
|
-
readonly mapLeaf?: ((value: any) => any) | undefined;
|
|
1926
|
-
readonly mapLeaves?: ((values: any[]) => any) | undefined;
|
|
1927
|
-
readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
|
|
360
|
+
readonly levels?: ("entries" | "entries-object" | "object" | "map" | "keys" | "values" | LevelSpec)[];
|
|
361
|
+
readonly addGroupKeys?: boolean;
|
|
362
|
+
readonly flat?: boolean;
|
|
363
|
+
readonly compositeKey?: (keys: any[]) => string;
|
|
364
|
+
readonly single?: boolean;
|
|
365
|
+
readonly mapLeaf?: (value: any) => any;
|
|
366
|
+
readonly mapLeaves?: (values: any[]) => any;
|
|
367
|
+
readonly mapEntry?: (entry: [any, any], level: number) => any;
|
|
1928
368
|
};
|
|
1929
369
|
}
|
|
1930
370
|
|
|
1931
|
-
|
|
371
|
+
type RenameSpec<T> = Partial<{
|
|
1932
372
|
[K in keyof T]: string;
|
|
1933
373
|
}>;
|
|
1934
|
-
|
|
1935
|
-
[NewKey in Exclude<Spec[keyof Spec], undefined>]: T[
|
|
374
|
+
type OutputT<T extends object, Spec extends RenameSpec<T>> = Merge<Omit<T, keyof Spec>, {
|
|
375
|
+
[NewKey in Exclude<Spec[keyof Spec], undefined>]: T[KeysMatching<Spec, NewKey> & keyof T];
|
|
1936
376
|
}>;
|
|
1937
377
|
/**
|
|
1938
378
|
* Renames properties/columns in collection
|
|
@@ -1948,11 +388,11 @@ declare function slice<T extends object>(start: number, end?: number): TidyFn<T>
|
|
|
1948
388
|
/**
|
|
1949
389
|
* Truncates the array to the first N items
|
|
1950
390
|
*/
|
|
1951
|
-
declare const sliceHead: <T extends object>(n: number) => TidyFn<T
|
|
391
|
+
declare const sliceHead: <T extends object>(n: number) => TidyFn<T>;
|
|
1952
392
|
/**
|
|
1953
393
|
* Truncates the array to the last N items
|
|
1954
394
|
*/
|
|
1955
|
-
declare const sliceTail: <T extends object>(n: number) => TidyFn<T
|
|
395
|
+
declare const sliceTail: <T extends object>(n: number) => TidyFn<T>;
|
|
1956
396
|
/**
|
|
1957
397
|
* Truncates the array to the first N items ordered by some key
|
|
1958
398
|
*/
|
|
@@ -1961,7 +401,7 @@ declare function sliceMin<T extends object>(n: number, orderBy: SingleOrArray<Ke
|
|
|
1961
401
|
* Truncates the array to the last N items ordered by some key
|
|
1962
402
|
*/
|
|
1963
403
|
declare function sliceMax<T extends object>(n: number, orderBy: SingleOrArray<Key | Comparator<T>>): TidyFn<T>;
|
|
1964
|
-
|
|
404
|
+
type SampleOptions = {
|
|
1965
405
|
replace?: boolean;
|
|
1966
406
|
};
|
|
1967
407
|
/**
|
|
@@ -1969,60 +409,60 @@ declare type SampleOptions = {
|
|
|
1969
409
|
*/
|
|
1970
410
|
declare function sliceSample<T extends object>(n: number, options?: SampleOptions | null | undefined): TidyFn<T>;
|
|
1971
411
|
|
|
1972
|
-
|
|
1973
|
-
|
|
412
|
+
type ByMap<JoinT extends Datum, T extends Datum> = Partial<Record<keyof JoinT, keyof T>>;
|
|
413
|
+
type JoinOptions<JoinT extends Datum, T extends Datum> = {
|
|
1974
414
|
by?: keyof T | (keyof T)[] | ByMap<JoinT, T>;
|
|
1975
415
|
};
|
|
1976
416
|
/**
|
|
1977
417
|
* Performs an inner join on two collections
|
|
1978
418
|
* @param itemsToJoin The rows/items to be appended to end of collection
|
|
1979
419
|
*/
|
|
1980
|
-
declare function innerJoin<T extends object, JoinT extends object>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T,
|
|
420
|
+
declare function innerJoin<T extends object, JoinT extends object>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T, Merge<T, JoinT>>;
|
|
1981
421
|
|
|
1982
422
|
/**
|
|
1983
423
|
* Performs a left join on two collections
|
|
1984
424
|
* @param itemsToJoin The rows/items to be appended to end of collection
|
|
1985
425
|
*/
|
|
1986
|
-
declare function leftJoin<T extends Datum, JoinT extends Datum>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T,
|
|
426
|
+
declare function leftJoin<T extends Datum, JoinT extends Datum>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T, Merge<T, Partial<JoinT>>>;
|
|
1987
427
|
|
|
1988
428
|
/**
|
|
1989
429
|
* Performs a full join on two collections
|
|
1990
430
|
* @param itemsToJoin The rows/items to be appended to end of collection
|
|
1991
431
|
*/
|
|
1992
|
-
declare function fullJoin<T extends Datum, JoinT extends Datum>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T,
|
|
432
|
+
declare function fullJoin<T extends Datum, JoinT extends Datum>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T, Merge<T, Partial<JoinT>>>;
|
|
1993
433
|
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
434
|
+
type MutateSpecValue<T, O = any> = ((items: T[]) => O[] | O) | NonFunctionValue;
|
|
435
|
+
type MutateSummarySpec<T> = Record<Key, MutateSpecValue<T>>;
|
|
436
|
+
type ResolvedObj<Obj extends Record<Key, MutateSpecValue<any>>> = {
|
|
1997
437
|
[K in keyof Obj]: Obj[K] extends (...args: any) => any ? ReturnType<Obj[K]> extends any[] ? ReturnType<Obj[K]>[number] : ReturnType<Obj[K]> extends Float64Array ? number : ReturnType<Obj[K]> : Obj[K];
|
|
1998
438
|
};
|
|
1999
|
-
|
|
2000
|
-
|
|
439
|
+
type Mutated<T, MSpec extends MutateSummarySpec<T>> = T & ResolvedObj<MSpec>;
|
|
440
|
+
type Compute<T> = Prettify<T>;
|
|
2001
441
|
/**
|
|
2002
442
|
* Mutates items, looking at multiple items at a time to enable summarization.
|
|
2003
443
|
* For simpler, item by item mutations, use mutate.
|
|
2004
444
|
* @param mutateSpec
|
|
2005
445
|
*/
|
|
2006
|
-
declare function mutateWithSummary<T extends object, MSpec extends MutateSummarySpec<T>>(mutateSpec: MSpec): TidyFn<T, Compute
|
|
446
|
+
declare function mutateWithSummary<T extends object, MSpec extends MutateSummarySpec<T>>(mutateSpec: MSpec): TidyFn<T, Compute<Mutated<T, MSpec>>>;
|
|
2007
447
|
|
|
2008
448
|
/**
|
|
2009
449
|
* Transmutes items
|
|
2010
450
|
* @param mutateSpec
|
|
2011
451
|
*/
|
|
2012
|
-
declare function transmute<T extends object, MSpec extends MutateSpec<T>>(mutateSpec: MSpec): TidyFn<T,
|
|
452
|
+
declare function transmute<T extends object, MSpec extends MutateSpec<T>>(mutateSpec: MSpec): TidyFn<T, Prettify<ResolvedObj$1<MSpec>>>;
|
|
2013
453
|
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
[TK in keyof T]: `-${
|
|
2018
|
-
}[keyof T]> : KS extends readonly Key[] ?
|
|
2019
|
-
[TK in keyof T]: `-${
|
|
2020
|
-
}[keyof T]> : KS extends Key ?
|
|
454
|
+
type DropKey<T extends object> = keyof T extends string | number ? `-${keyof T}` : never;
|
|
455
|
+
type KeysInput<T extends object> = (Key | ((items: T[]) => Key[]))[] | readonly DropKey<T>[] | readonly (keyof T)[] | DropKey<T> | keyof T;
|
|
456
|
+
type Output$1<T extends object, KS extends KeysInput<T>> = KS extends readonly DropKey<T>[] ? Pick<T, {
|
|
457
|
+
[TK in keyof T]: `-${Extract<TK, string>}` extends KS[number] ? never : TK;
|
|
458
|
+
}[keyof T]> : KS extends readonly Key[] ? Pick<T, Extract<KS[number], keyof T>> : KS extends DropKey<T> ? Pick<T, {
|
|
459
|
+
[TK in keyof T]: `-${Extract<TK, string>}` extends KS ? never : TK;
|
|
460
|
+
}[keyof T]> : KS extends Key ? Pick<T, Extract<KS, keyof T>> : T;
|
|
2021
461
|
/**
|
|
2022
462
|
* selects subparts of the objects (aka pick)
|
|
2023
463
|
* @param selectFn Returns true to keep the item, false to select out
|
|
2024
464
|
*/
|
|
2025
|
-
declare function select<T extends object, Keys extends KeysInput<T>>(selectKeys: Keys): TidyFn<T, Output<T, Keys>>;
|
|
465
|
+
declare function select<T extends object, Keys extends KeysInput<T>>(selectKeys: Keys): TidyFn<T, Output$1<T, Keys>>;
|
|
2026
466
|
|
|
2027
467
|
/**
|
|
2028
468
|
* adds items to the end of the collection
|
|
@@ -2030,34 +470,34 @@ declare function select<T extends object, Keys extends KeysInput<T>>(selectKeys:
|
|
|
2030
470
|
*/
|
|
2031
471
|
declare function addRows<T extends object>(itemsToAdd: SingleOrArray<T> | ((items: T[]) => SingleOrArray<T>)): TidyFn<T>;
|
|
2032
472
|
|
|
2033
|
-
|
|
2034
|
-
|
|
473
|
+
type PivotOutput$1 = Record<Key, any>;
|
|
474
|
+
type PivotWiderOptions<T extends object> = {
|
|
2035
475
|
namesFrom: SingleOrArray<keyof T>;
|
|
2036
476
|
namesSep?: string;
|
|
2037
477
|
valuesFrom: SingleOrArray<keyof T>;
|
|
2038
478
|
valuesFill?: any;
|
|
2039
479
|
valuesFillMap?: Partial<Record<Key, any>>;
|
|
2040
480
|
};
|
|
2041
|
-
declare function pivotWider<T extends object>(options: PivotWiderOptions<T>): TidyFn<T, PivotOutput>;
|
|
481
|
+
declare function pivotWider<T extends object>(options: PivotWiderOptions<T>): TidyFn<T, PivotOutput$1>;
|
|
2042
482
|
|
|
2043
|
-
|
|
483
|
+
type PivotLongerOptions = {
|
|
2044
484
|
cols?: any;
|
|
2045
485
|
namesTo: SingleOrArray<Key>;
|
|
2046
486
|
namesSep?: string;
|
|
2047
487
|
valuesTo: SingleOrArray<Key>;
|
|
2048
488
|
};
|
|
2049
|
-
|
|
2050
|
-
declare function pivotLonger<T extends object>(options: PivotLongerOptions): TidyFn<T, PivotOutput
|
|
489
|
+
type PivotOutput = Record<Key, any>;
|
|
490
|
+
declare function pivotLonger<T extends object>(options: PivotLongerOptions): TidyFn<T, PivotOutput>;
|
|
2051
491
|
|
|
2052
|
-
|
|
492
|
+
type KeyMap<T extends object = any> = Partial<{
|
|
2053
493
|
[key in keyof T]: keyof T | Array<T[key]> | ((items: T[]) => T[key][]);
|
|
2054
494
|
}>;
|
|
2055
495
|
/**
|
|
2056
496
|
* Expands a set of items to include all combinations of the specified keys.
|
|
2057
497
|
*/
|
|
2058
|
-
declare function expand<T extends object = any, K extends keyof T = keyof T>(expandKeys: K): TidyFn<T,
|
|
2059
|
-
declare function expand<T extends object = any, K extends (keyof T)[] = (keyof T)[]>(expandKeys: K): TidyFn<T,
|
|
2060
|
-
declare function expand<T extends object = any, K extends KeyMap<T> = KeyMap<T>>(expandKeys: K): TidyFn<T,
|
|
498
|
+
declare function expand<T extends object = any, K extends keyof T = keyof T>(expandKeys: K): TidyFn<T, Prettify<Pick<T, K>>>;
|
|
499
|
+
declare function expand<T extends object = any, K extends (keyof T)[] = (keyof T)[]>(expandKeys: K): TidyFn<T, Prettify<Pick<T, K[number]>>>;
|
|
500
|
+
declare function expand<T extends object = any, K extends KeyMap<T> = KeyMap<T>>(expandKeys: K): TidyFn<T, Pick<T, Extract<keyof K, keyof T>>>;
|
|
2061
501
|
|
|
2062
502
|
/**
|
|
2063
503
|
* Create a full sequence given a vector of values
|
|
@@ -2076,16 +516,16 @@ declare function fullSeq<T extends object>(key: keyof T | ((d: T) => number), pe
|
|
|
2076
516
|
declare function fullSeqDate<T extends object>(key: keyof T | ((d: T) => Date), granularity?: Granularity | null | undefined, period?: number | null | undefined): (items: T[]) => Date[];
|
|
2077
517
|
declare function fullSeqDateISOString<T extends object>(key: keyof T | ((d: T) => string), granularity?: Granularity | null | undefined, period?: number | null | undefined): (items: T[]) => string[];
|
|
2078
518
|
|
|
2079
|
-
|
|
519
|
+
type Spec<T extends object> = {
|
|
2080
520
|
[K in keyof T]: T[K];
|
|
2081
521
|
};
|
|
2082
|
-
|
|
522
|
+
type Output<T extends object, ReplaceSpec extends Partial<Spec<T>>> = Merge<Omit<T, keyof ReplaceSpec>, {
|
|
2083
523
|
[K in keyof ReplaceSpec]: K extends keyof T ? Exclude<T[K], null | undefined> | ReplaceSpec[K] : ReplaceSpec[K];
|
|
2084
524
|
}>;
|
|
2085
525
|
/**
|
|
2086
526
|
* Replaces nully values with what is specified in the spec
|
|
2087
527
|
*/
|
|
2088
|
-
declare function replaceNully<T extends object, ReplaceSpec extends Spec<Partial<T>> = Spec<Partial<T>>>(replaceSpec: ReplaceSpec): TidyFn<T, Output
|
|
528
|
+
declare function replaceNully<T extends object, ReplaceSpec extends Spec<Partial<T>> = Spec<Partial<T>>>(replaceSpec: ReplaceSpec): TidyFn<T, Output<T, ReplaceSpec>>;
|
|
2089
529
|
|
|
2090
530
|
/**
|
|
2091
531
|
* Complete a collection with missing combinations of data
|
|
@@ -2099,7 +539,7 @@ declare function complete<T extends object>(expandKeys: SingleOrArray<Key> | Key
|
|
|
2099
539
|
*/
|
|
2100
540
|
declare function fill<T extends object>(keys: SingleOrArray<Key>): TidyFn<T>;
|
|
2101
541
|
|
|
2102
|
-
|
|
542
|
+
type Options = {
|
|
2103
543
|
limit?: number | null;
|
|
2104
544
|
output?: 'log' | 'table';
|
|
2105
545
|
};
|
|
@@ -2108,7 +548,7 @@ declare type Options = {
|
|
|
2108
548
|
*/
|
|
2109
549
|
declare function debug<T extends object>(label?: string | null | undefined, options?: Options | null | undefined): TidyFn<T>;
|
|
2110
550
|
|
|
2111
|
-
|
|
551
|
+
type RateOptions<T> = {
|
|
2112
552
|
predicate?: (d: T, index: number, array: Iterable<T>) => boolean;
|
|
2113
553
|
allowDivideByZero?: boolean;
|
|
2114
554
|
};
|
|
@@ -2116,11 +556,11 @@ declare type RateOptions<T> = {
|
|
|
2116
556
|
* Returns a function that computes a rate (numerator / denominator), setting the value to
|
|
2117
557
|
* 0 if denominator = 0 and numerator = 0.
|
|
2118
558
|
*/
|
|
2119
|
-
declare function rate<T extends object>(numerator: keyof T | ((d: T, index: number, array: Iterable<T>) => number), denominator: keyof T | ((d: T, index: number, array: Iterable<T>) => number), options?: RateOptions<T>): (d: T, index: number, array: Iterable<T>) => number | undefined;
|
|
559
|
+
declare function rate$1<T extends object>(numerator: keyof T | ((d: T, index: number, array: Iterable<T>) => number), denominator: keyof T | ((d: T, index: number, array: Iterable<T>) => number), options?: RateOptions<T>): (d: T, index: number, array: Iterable<T>) => number | undefined;
|
|
2120
560
|
|
|
2121
|
-
declare function cumsum<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => number | null | undefined)): (items: T[]) => Float64Array
|
|
561
|
+
declare function cumsum<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => number | null | undefined)): (items: T[]) => Float64Array<ArrayBufferLike>;
|
|
2122
562
|
|
|
2123
|
-
|
|
563
|
+
type RollOptions = {
|
|
2124
564
|
partial?: boolean;
|
|
2125
565
|
/** which direction the window is aligned to (default: right, looking back)
|
|
2126
566
|
* - right: current row is the last item [1,2,**3**]
|
|
@@ -2138,7 +578,7 @@ declare type RollOptions = {
|
|
|
2138
578
|
*/
|
|
2139
579
|
declare function roll<T extends object>(width: number, rollFn: (itemsInWindow: T[], endIndex: number) => any, options?: RollOptions | undefined | null): (items: any[]) => any[];
|
|
2140
580
|
|
|
2141
|
-
|
|
581
|
+
type LagOptions = {
|
|
2142
582
|
/** Number of positions to lag by (default: 1) */
|
|
2143
583
|
n?: number;
|
|
2144
584
|
/** The default value for non-existent rows. */
|
|
@@ -2152,7 +592,7 @@ declare type LagOptions = {
|
|
|
2152
592
|
*/
|
|
2153
593
|
declare function lag<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => any), options?: LagOptions | undefined | null): (items: T[]) => any[];
|
|
2154
594
|
|
|
2155
|
-
|
|
595
|
+
type LeadOptions = {
|
|
2156
596
|
/** Number of positions to lead by (default: 1) */
|
|
2157
597
|
n?: number;
|
|
2158
598
|
/** The default value for non-existent rows. */
|
|
@@ -2166,7 +606,7 @@ declare type LeadOptions = {
|
|
|
2166
606
|
*/
|
|
2167
607
|
declare function lead<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => any), options?: LeadOptions | undefined | null): (items: T[]) => any[];
|
|
2168
608
|
|
|
2169
|
-
|
|
609
|
+
type RowNumberOptions = {
|
|
2170
610
|
/** what to start row numbers at, default is 0 */
|
|
2171
611
|
startAt?: number;
|
|
2172
612
|
};
|
|
@@ -2175,7 +615,7 @@ declare type RowNumberOptions = {
|
|
|
2175
615
|
*/
|
|
2176
616
|
declare function rowNumber<T>(options?: RowNumberOptions): (items: T[]) => number[];
|
|
2177
617
|
|
|
2178
|
-
|
|
618
|
+
type SumOptions<T> = {
|
|
2179
619
|
predicate?: (d: T, index: number, array: Iterable<T>) => boolean;
|
|
2180
620
|
};
|
|
2181
621
|
/**
|
|
@@ -2227,7 +667,7 @@ declare function deviation<T extends object>(key: keyof T | ((d: T, index: numbe
|
|
|
2227
667
|
*/
|
|
2228
668
|
declare function variance<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => number)): (items: T[]) => number | undefined;
|
|
2229
669
|
|
|
2230
|
-
|
|
670
|
+
type NOptions<T> = {
|
|
2231
671
|
predicate?: (d: T, index: number, array: Iterable<T>) => boolean;
|
|
2232
672
|
};
|
|
2233
673
|
/**
|
|
@@ -2295,18 +735,20 @@ declare function negate<T extends object>(selectors: SingleOrArray<keyof T | ((i
|
|
|
2295
735
|
|
|
2296
736
|
/** Tidy math helpers */
|
|
2297
737
|
/** Compute a fraction while handling common edge cases */
|
|
2298
|
-
declare function rate
|
|
738
|
+
declare function rate(numerator: number | null | undefined, denominator: number | null | undefined, allowDivideByZero?: boolean): number | undefined;
|
|
2299
739
|
declare function subtract(a: number | null | undefined, b: number | null | undefined, nullyZero?: boolean): number | undefined;
|
|
2300
740
|
declare function add(a: number | null | undefined, b: number | null | undefined, nullyZero?: boolean): number | undefined;
|
|
2301
741
|
|
|
2302
|
-
declare const math_subtract: typeof subtract;
|
|
2303
742
|
declare const math_add: typeof add;
|
|
743
|
+
declare const math_rate: typeof rate;
|
|
744
|
+
declare const math_subtract: typeof subtract;
|
|
2304
745
|
declare namespace math {
|
|
2305
746
|
export {
|
|
2306
|
-
rate$1 as rate,
|
|
2307
|
-
math_subtract as subtract,
|
|
2308
747
|
math_add as add,
|
|
748
|
+
math_rate as rate,
|
|
749
|
+
math_subtract as subtract,
|
|
2309
750
|
};
|
|
2310
751
|
}
|
|
2311
752
|
|
|
2312
|
-
export {
|
|
753
|
+
export { math as TMath, addRows as addItems, addRows, arrange, asc, complete, contains, count, cumsum, debug, desc, deviation, distinct, endsWith, everything, expand, fill, filter, first, fixedOrder, fullJoin, fullSeq, fullSeqDate, fullSeqDateISOString, groupBy, innerJoin, lag, last, lead, leftJoin, map, matches, max, mean, meanRate, median, min, mutate, mutateWithSummary, n, nDistinct, negate, numRange, select as pick, pivotLonger, pivotWider, rate$1 as rate, rename, replaceNully, roll, rowNumber, select, slice, sliceHead, sliceMax, sliceMin, sliceSample, sliceTail, arrange as sort, startsWith, sum, summarize, summarizeAll, summarizeAt, summarizeIf, tally, tidy, total, totalAll, totalAt, totalIf, transmute, variance, vectorSeq, vectorSeqDate, when };
|
|
754
|
+
export type { Comparator, Datum, Granularity, GroupKey, Grouped, Key, KeyOrFn, LevelSpec, NonFunctionValue, Primitive, SummarizeOptions, SummarizeSpec, TidyContext, TidyFn, TidyGroupExportFn, Vector };
|