pepka 0.12.3 → 0.13.0-b2

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/README.md CHANGED
@@ -1,23 +1,26 @@
1
1
  ![image](https://user-images.githubusercontent.com/7501201/122691868-ae59f800-d23a-11eb-97fa-c0fab3cb0808.png)
2
2
 
3
- HI! Meet pepka - JavaScript/TypeScript functional programming utilities library named after my paraqeet.
3
+ HI! Meet pepka - JavaScript/TypeScript functional programming utility library named after my parakeet.
4
4
 
5
5
  This lib is intended to be a functional toolkit more flexible than ramda is.
6
6
  Its' basic API is similimar to ramda's one.
7
7
  Other goals are:
8
- - Async pipes. They are not super-pure, but super handy.
9
- - Most flexible types as possible (Let'em be any better than crashing because of their failures. I'm currently working on full JSDocs and better basic types).
10
- - Tree-shakeble ans smallest possible. What could be native, is native.
11
- - Has "quick" alternatives of most computation-heavy functions with `q` prefix which are not completely safe by fp means.
8
+ - Async pipes. They are very handy, but are not 100% pure in terms of Haskell c:
9
+ - Most flexible types possible (Let'em be any better than crashing because of their failures. I'm currently working on full JSDocs and better basic types).
10
+ - Tree-shakeble and smallest possible. What could be native, is native.
11
+ - Has "quick" alternatives of most computation-heavy functions with `q` prefix which are not completely safe by fp means: most of them do mutations and it may be needed to `clone` or `cloneShallow` data in a first pipe of `compose(...)`.
12
+ - Has basic toolbelt-types like AnyObject and AnyFunc<ReturnType?, [...args]?> etc.
12
13
  - Has some basic additinal must-have stuff that ramda does not.
13
14
 
14
15
  Full docs are coming,
15
16
  please reference ramda's ones for most operations and examples: https://ramdajs.com/docs/
16
17
 
17
18
  Basic API differences:
19
+ - clone() clones deeply as possible any type possible.
20
+ - cloneShallow() clones only by 1st level of folding also any type possible.
18
21
  - mergeDeep - replaces arrays.
19
- - mergeDeepX - replaces elements with same indexes.
20
- - mergeDeepAdd - adds new element to arrays.
22
+ - mergeDeepX - replaces its' elements with same indexes.
23
+ - mergeDeepAdd - adds new elements to arrays.
21
24
  - type - returns type UpperCased of anything passed to it, including classes and typed arrays.
22
25
  - mapKeys - changes existing keys and data by map or function like usual mapper.
23
26
  - explore(label)(data) - `compose(explore('the number'))(42)` results in `'the number', 42` in console passing by the data.
package/dist/bundle.d.ts CHANGED
@@ -1,28 +1,74 @@
1
- // Generated by dts-bundle-generator v5.9.0
1
+ import {F as FT} from 'ts-toolbelt'
2
2
 
3
- export declare type Args = any[];
4
- declare const __: () => void;
5
- export declare const curry: (fn: Function) => (...args: Args) => any;
6
- export declare const toLower: (s: string) => string;
7
- export declare const toUpper: (s: string) => string;
8
- export declare const type: (s: any) => any;
3
+ // Generated by dts-bundle-generator v7.1.0
4
+
5
+ export type Cond = (...xs: any[]) => boolean;
9
6
  export interface AnyObject {
10
7
  [k: string]: any;
11
8
  }
12
- export declare type AnyFunc = (...args: any[]) => any;
13
- export declare const equals: (...args: any[]) => any;
14
- export declare const ifElse: (...args: any[]) => any;
15
- export declare const when: (...args: any[]) => any;
16
- export declare const compose: (...fns: Function[]) => (s?: any) => any;
17
- export declare const bind: (...args: any[]) => any;
18
- export declare const nth: (...args: any[]) => any;
19
- export declare const includes: (...args: any[]) => any;
20
- export declare const slice: (...args: any[]) => any;
21
- export declare const head: any;
22
- export declare const tail: any;
23
- export declare const add: (...args: any[]) => any;
24
- export declare const subtract: (...args: any[]) => any;
25
- export declare const flip: (fn: Function) => (...args: any[]) => any;
9
+ export type AnyArgs = any[];
10
+ export type Curried<Args extends AnyArgs = AnyArgs, ReturnT = any> = (arg: Args[number]) => Curried<Args> | ReturnT;
11
+ export type Reducer = <T = any>(accum: T, cur: any, index: number) => T;
12
+ export type AnyFunc<ReturnT = any, Args extends AnyArgs = AnyArgs> = (...args: Args) => ReturnT;
13
+ declare const __: unique symbol;
14
+ export type Placeholder = typeof __;
15
+ export declare const curry: <Func extends AnyFunc<any, AnyArgs>>(fn: AnyFunc) => FT.Curry<Func>;
16
+ export type Func2 = (a: any, b: any) => any;
17
+ export declare function curry2<Func extends Func2>(fn: Func): {
18
+ (a: Parameters<Func>[0]): (b: Parameters<Func>[1]) => ReturnType<Func>;
19
+ (a: Parameters<Func>[0], b: Parameters<Func>[1]): ReturnType<Func>;
20
+ (a: Placeholder, b: Parameters<Func>[1]): (a: Parameters<Func>[0]) => ReturnType<Func>;
21
+ (a: Parameters<Func>[0], b: Placeholder): (b: Parameters<Func>[1]) => ReturnType<Func>;
22
+ };
23
+ export type Func3 = (a: any, b: any, c: any) => any;
24
+ export declare function curry3<Func extends Func3>(fn: Func): FT.Curry<Func>;
25
+ export declare const uncurry: <Args extends any[] = any[], ReturnT = any>(fn: Curried<Args, any>) => AnyFunc;
26
+ export declare const toLower: (s: string) => string;
27
+ export declare const toUpper: (s: string) => string;
28
+ export declare const type: (s: any) => any;
29
+ export declare const equals: {
30
+ (a: any): (b: any) => boolean;
31
+ (a: any, b: any): boolean;
32
+ (a: typeof __, b: any): (a: any) => boolean;
33
+ (a: any, b: typeof __): (b: any) => boolean;
34
+ };
35
+ export declare const ifElse: FT.Curry<AnyFunc<any, AnyArgs>>;
36
+ export declare const when: FT.Curry<(cond: (s: any) => boolean, pipe: (s: any) => any, s: any) => any>;
37
+ export declare const compose: FT.Compose;
38
+ export declare const bind: {
39
+ (a: any): (b: any) => any;
40
+ (a: any, b: any): any;
41
+ (a: typeof __, b: any): (a: any) => any;
42
+ (a: any, b: typeof __): (b: any) => any;
43
+ };
44
+ export declare const nth: {
45
+ (a: number): (b: unknown[]) => unknown;
46
+ (a: number, b: unknown[]): unknown;
47
+ (a: typeof __, b: unknown[]): (a: number) => unknown;
48
+ (a: number, b: typeof __): (b: unknown[]) => unknown;
49
+ };
50
+ export declare const includes: {
51
+ (a: unknown): (b: unknown[]) => boolean;
52
+ (a: unknown, b: unknown[]): boolean;
53
+ (a: typeof __, b: unknown[]): (a: unknown) => boolean;
54
+ (a: unknown, b: typeof __): (b: unknown[]) => boolean;
55
+ };
56
+ export declare const slice: FT.Curry<(from: number, to: number, o: any[] | string) => string | any[]>;
57
+ export declare const head: (b: unknown[]) => unknown;
58
+ export declare const tail: FT.Curry<(o: string | any[]) => string | any[]>;
59
+ export declare const add: {
60
+ (a: number): (b: number) => number;
61
+ (a: number, b: number): number;
62
+ (a: typeof __, b: number): (a: number) => number;
63
+ (a: number, b: typeof __): (b: number) => number;
64
+ };
65
+ export declare const subtract: {
66
+ (a: number): (b: number) => number;
67
+ (a: number, b: number): number;
68
+ (a: typeof __, b: number): (a: number) => number;
69
+ (a: number, b: typeof __): (b: number) => number;
70
+ };
71
+ export declare const flip: (fn: Function) => FT.Curry<AnyFunc<any, AnyArgs>>;
26
72
  export declare const isNil: (s: any) => boolean;
27
73
  export declare const length: (s: any[] | string) => number;
28
74
  export declare const always: <T = any>(s: T) => () => T;
@@ -37,91 +83,436 @@ export declare const toPairs: (o: AnyObject | any[]) => [
37
83
  string,
38
84
  any
39
85
  ][];
40
- export declare const test: (...args: any[]) => any;
41
- export declare const tap: (...args: any[]) => any;
42
- export declare const append: (...args: any[]) => any;
43
- export declare const split: (...args: any[]) => any;
86
+ export declare const test: {
87
+ (a: RegExp): (b: string) => boolean;
88
+ (a: RegExp, b: string): boolean;
89
+ (a: typeof __, b: string): (a: RegExp) => boolean;
90
+ (a: RegExp, b: typeof __): (b: string) => boolean;
91
+ };
92
+ export declare const tap: {
93
+ (a: Function): (b: any) => any;
94
+ (a: Function, b: any): any;
95
+ (a: typeof __, b: any): (a: Function) => any;
96
+ (a: Function, b: typeof __): (b: any) => any;
97
+ };
98
+ export declare const append: {
99
+ (a: any): (b: any[]) => any[];
100
+ (a: any, b: any[]): any[];
101
+ (a: typeof __, b: any[]): (a: any) => any[];
102
+ (a: any, b: typeof __): (b: any[]) => any[];
103
+ };
104
+ export declare const split: {
105
+ (a: string): (b: string) => string[];
106
+ (a: string, b: string): string[];
107
+ (a: typeof __, b: string): (a: string) => string[];
108
+ (a: string, b: typeof __): (b: string) => string[];
109
+ };
44
110
  export declare const T: (...args: any[]) => true;
45
111
  export declare const F: (...args: any[]) => false;
46
112
  export declare const sizeof: (s: any[] | string | AnyObject) => number;
47
- export declare const range: (...args: any[]) => any;
113
+ export declare const range: {
114
+ (a: number): (b: number) => any[];
115
+ (a: number, b: number): any[];
116
+ (a: typeof __, b: number): (a: number) => any[];
117
+ (a: number, b: typeof __): (b: number) => any[];
118
+ };
48
119
  export declare const uniq: (xs: any[]) => any;
49
- export declare const intersection: (...args: any[]) => any;
50
- export declare const genBy: (...args: any[]) => any;
51
- export declare const once: <Func extends AnyFunc>(fn: Func) => (...args: Parameters<Func>) => any;
52
- export declare const reverse: (xs: any[]) => any;
53
- export declare const gt: (...args: any[]) => any;
54
- export declare const lt: (...args: any[]) => any;
55
- export declare const gte: (...args: any[]) => any;
56
- export declare const lte: (...args: any[]) => any;
57
- export declare const sort: (...args: any[]) => any;
58
- export declare const find: (...args: any[]) => any;
59
- export declare const findIndex: (...args: any[]) => any;
60
- export declare const indexOf: (...args: any[]) => any;
61
- export declare const explore: (caption: string, level?: string) => any;
62
- export declare const cond: (...args: any[]) => any;
63
- export declare const assoc: (...args: any[]) => any;
64
- export declare const assocPath: (...args: any[]) => any;
65
- export declare const all: (...args: any[]) => any;
66
- export declare const any: (...args: any[]) => any;
67
- export declare const allPass: (...args: any[]) => any;
68
- export declare const anyPass: (...args: any[]) => any;
69
- export declare const prop: (...args: any[]) => any;
70
- export declare const propEq: (...args: any[]) => any;
71
- export declare const propsEq: (...args: any[]) => any;
72
- export declare const pathOr: (...args: any[]) => any;
73
- export declare const path: any;
74
- export declare const pathEq: (...args: any[]) => any;
75
- export declare const pathsEq: (...args: any[]) => any;
76
- export declare const clone: (s: any) => any;
77
- export declare const reduce: (...args: any[]) => any;
78
- export declare const pickBy: (...args: any[]) => any;
79
- export declare const pick: (...args: any[]) => any;
80
- export declare const omit: (...args: any[]) => any;
120
+ export declare const intersection: {
121
+ (a: any[]): (b: any[]) => any[];
122
+ (a: any[], b: any[]): any[];
123
+ (a: typeof __, b: any[]): (a: any[]) => any[];
124
+ (a: any[], b: typeof __): (b: any[]) => any[];
125
+ };
126
+ export declare const genBy: {
127
+ (a: (i: number) => any): (b: number) => any[];
128
+ (a: (i: number) => any, b: number): any[];
129
+ (a: typeof __, b: number): (a: (i: number) => any) => any[];
130
+ (a: (i: number) => any, b: typeof __): (b: number) => any[];
131
+ };
132
+ export declare const once: <Func extends AnyFunc<any, AnyArgs>>(fn: Func) => (...args: Parameters<Func>) => any;
133
+ export declare const reverse: (xs: any[]) => FT.Curry<(fn: Reducer, accum: any, arr: any[]) => FT.Curry<(...p: [
134
+ ] | [
135
+ accum: any
136
+ ]) => any>>;
137
+ export declare const gt: {
138
+ (a: number): (b: number) => boolean;
139
+ (a: number, b: number): boolean;
140
+ (a: typeof __, b: number): (a: number) => boolean;
141
+ (a: number, b: typeof __): (b: number) => boolean;
142
+ };
143
+ export declare const lt: {
144
+ (a: number): (b: number) => boolean;
145
+ (a: number, b: number): boolean;
146
+ (a: typeof __, b: number): (a: number) => boolean;
147
+ (a: number, b: typeof __): (b: number) => boolean;
148
+ };
149
+ export declare const gte: {
150
+ (a: number): (b: number) => boolean;
151
+ (a: number, b: number): boolean;
152
+ (a: typeof __, b: number): (a: number) => boolean;
153
+ (a: number, b: typeof __): (b: number) => boolean;
154
+ };
155
+ export declare const lte: {
156
+ (a: number): (b: number) => boolean;
157
+ (a: number, b: number): boolean;
158
+ (a: typeof __, b: number): (a: number) => boolean;
159
+ (a: number, b: typeof __): (b: number) => boolean;
160
+ };
161
+ export declare const sort: {
162
+ (a: any): (b: any[]) => any[];
163
+ (a: any, b: any[]): any[];
164
+ (a: typeof __, b: any[]): (a: any) => any[];
165
+ (a: any, b: typeof __): (b: any[]) => any[];
166
+ };
167
+ export declare const find: {
168
+ (a: Cond): (b: any[]) => any;
169
+ (a: Cond, b: any[]): any;
170
+ (a: typeof __, b: any[]): (a: Cond) => any;
171
+ (a: Cond, b: typeof __): (b: any[]) => any;
172
+ };
173
+ export declare const findIndex: {
174
+ (a: Cond): (b: any[]) => number;
175
+ (a: Cond, b: any[]): number;
176
+ (a: typeof __, b: any[]): (a: Cond) => number;
177
+ (a: Cond, b: typeof __): (b: any[]) => number;
178
+ };
179
+ export declare const indexOf: {
180
+ (a: any): (b: any[]) => number;
181
+ (a: any, b: any[]): number;
182
+ (a: typeof __, b: any[]): (a: any) => number;
183
+ (a: any, b: typeof __): (b: any[]) => number;
184
+ };
185
+ export declare const explore: (caption: string, level?: string) => (b: any) => any;
186
+ export declare const cond: {
187
+ (a: [
188
+ Cond,
189
+ Function
190
+ ][]): (b: any) => any;
191
+ (a: [
192
+ Cond,
193
+ Function
194
+ ][], b: any): any;
195
+ (a: typeof __, b: any): (a: [
196
+ Cond,
197
+ Function
198
+ ][]) => any;
199
+ (a: [
200
+ Cond,
201
+ Function
202
+ ][], b: typeof __): (b: any) => any;
203
+ };
204
+ export declare const assoc: FT.Curry<(prop: string, v: any, obj: AnyObject) => {
205
+ [x: string]: any;
206
+ }>;
207
+ export declare const assocPath: any;
208
+ export declare const all: {
209
+ (a: Cond): (b: any[]) => boolean;
210
+ (a: Cond, b: any[]): boolean;
211
+ (a: typeof __, b: any[]): (a: Cond) => boolean;
212
+ (a: Cond, b: typeof __): (b: any[]) => boolean;
213
+ };
214
+ export declare const any: {
215
+ (a: Cond): (b: any[]) => boolean;
216
+ (a: Cond, b: any[]): boolean;
217
+ (a: typeof __, b: any[]): (a: Cond) => boolean;
218
+ (a: Cond, b: typeof __): (b: any[]) => boolean;
219
+ };
220
+ export declare const allPass: {
221
+ (a: Cond[]): (b: any) => boolean;
222
+ (a: Cond[], b: any): boolean;
223
+ (a: typeof __, b: any): (a: Cond[]) => boolean;
224
+ (a: Cond[], b: typeof __): (b: any) => boolean;
225
+ };
226
+ export declare const anyPass: {
227
+ (a: Cond[]): (b: any) => boolean;
228
+ (a: Cond[], b: any): boolean;
229
+ (a: typeof __, b: any): (a: Cond[]) => boolean;
230
+ (a: Cond[], b: typeof __): (b: any) => boolean;
231
+ };
232
+ export declare const prop: {
233
+ (a: string): (b: AnyObject) => any;
234
+ (a: string, b: AnyObject): any;
235
+ (a: typeof __, b: AnyObject): (a: string) => any;
236
+ (a: string, b: typeof __): (b: AnyObject) => any;
237
+ };
238
+ export declare const propEq: FT.Curry<(key: string, value: any, o: AnyObject) => boolean>;
239
+ export declare const propsEq: FT.Curry<(key: string, o1: any, o2: AnyObject) => boolean>;
240
+ export declare const pathOr: FT.Curry<(_default: any, path: string[], o: any) => any>;
241
+ export declare const path: FT.Curry<(path: string[], o: any) => any>;
242
+ export declare const pathEq: FT.Curry<(_path: string[], value: any, o: AnyObject) => boolean>;
243
+ export declare const pathsEq: FT.Curry<(_path: string[], o1: AnyObject, o2: AnyObject) => boolean>;
244
+ export declare const clone: (s: any, shallow?: boolean) => any;
245
+ export declare const cloneShallow: (s: any) => any;
246
+ export declare const reduce: FT.Curry<(fn: Reducer, accum: any, arr: any[]) => FT.Curry<(...p: [
247
+ ] | [
248
+ accum: any
249
+ ]) => any>>;
250
+ export declare const pickBy: {
251
+ (a: Cond): (b: AnyObject) => any;
252
+ (a: Cond, b: AnyObject): any;
253
+ (a: typeof __, b: AnyObject): (a: Cond) => any;
254
+ (a: Cond, b: typeof __): (b: AnyObject) => any;
255
+ };
256
+ export declare const pick: {
257
+ (a: string[]): (b: AnyObject) => {};
258
+ (a: string[], b: AnyObject): {};
259
+ (a: typeof __, b: AnyObject): (a: string[]) => {};
260
+ (a: string[], b: typeof __): (b: AnyObject) => {};
261
+ };
262
+ export declare const omit: {
263
+ (a: string[]): (b: AnyObject) => any;
264
+ (a: string[], b: AnyObject): any;
265
+ (a: typeof __, b: AnyObject): (a: string[]) => any;
266
+ (a: string[], b: typeof __): (b: AnyObject) => any;
267
+ };
81
268
  export declare const fromPairs: (pairs: [
82
269
  string,
83
270
  any
84
- ][]) => any;
85
- export declare const concat: (...args: any[]) => any;
86
- export declare const join: (...args: any[]) => any;
87
- export declare const map: (...args: any[]) => any;
88
- export declare const forEach: (...args: any[]) => any;
89
- export declare const both: (...args: any[]) => any;
271
+ ][]) => FT.Curry<(fn: Reducer, accum: any, arr: any[]) => FT.Curry<(...p: [
272
+ ] | [
273
+ accum: any
274
+ ]) => any>>;
275
+ export declare const concat: {
276
+ (a: string | any[]): (b: string | any[]) => string | any[];
277
+ (a: string | any[], b: string | any[]): string | any[];
278
+ (a: typeof __, b: string | any[]): (a: string | any[]) => string | any[];
279
+ (a: string | any[], b: typeof __): (b: string | any[]) => string | any[];
280
+ };
281
+ export declare const join: {
282
+ (a: string): (b: string[]) => string;
283
+ (a: string, b: string[]): string;
284
+ (a: typeof __, b: string[]): (a: string) => string;
285
+ (a: string, b: typeof __): (b: string[]) => string;
286
+ };
287
+ export declare const map: {
288
+ (a: (s: any) => any): (b: any[]) => any[];
289
+ (a: (s: any) => any, b: any[]): any[];
290
+ (a: typeof __, b: any[]): (a: (s: any) => any) => any[];
291
+ (a: (s: any) => any, b: typeof __): (b: any[]) => any[];
292
+ };
293
+ export declare const forEach: {
294
+ (a: (s: any) => any): (b: any[]) => void;
295
+ (a: (s: any) => any, b: any[]): void;
296
+ (a: typeof __, b: any[]): (a: (s: any) => any) => void;
297
+ (a: (s: any) => any, b: typeof __): (b: any[]) => void;
298
+ };
299
+ export declare const both: FT.Curry<(cond1: Cond, cond2: Cond, s: any) => boolean>;
90
300
  export declare const isEmpty: (s: any) => boolean | null;
91
301
  export declare const empty: (s: any) => {} | undefined;
92
- export declare const replace: (...args: any[]) => any;
93
- export declare const filter: (...args: any[]) => any;
302
+ export declare const replace: FT.Curry<(a: string | RegExp, b: string, where: string) => string>;
303
+ export declare const filter: any;
94
304
  export declare const memoize: (fn: Function) => () => any;
95
- export declare const mergeShallow: (...args: any[]) => any;
96
- export declare const mergeDeep: (...args: any[]) => any;
97
- export declare const mergeDeepX: (...args: any[]) => any;
98
- export declare const mergeDeepAdd: (...args: any[]) => any;
99
- export declare const overProp: (...args: any[]) => any;
305
+ export declare const mergeShallow: {
306
+ (a: AnyObject): (b: AnyObject) => AnyObject;
307
+ (a: AnyObject, b: AnyObject): AnyObject;
308
+ (a: typeof __, b: AnyObject): (a: AnyObject) => AnyObject;
309
+ (a: AnyObject, b: typeof __): (b: AnyObject) => AnyObject;
310
+ };
311
+ export declare const mergeDeep: {
312
+ (a: AnyObject): (b: AnyObject) => FT.Curry<(...p: [
313
+ ] | [
314
+ o1: AnyObject,
315
+ o2: AnyObject
316
+ ] | [
317
+ o2: AnyObject
318
+ ] | [
319
+ o1: AnyObject
320
+ ]) => any>;
321
+ (a: AnyObject, b: AnyObject): FT.Curry<(...p: [
322
+ ] | [
323
+ o1: AnyObject,
324
+ o2: AnyObject
325
+ ] | [
326
+ o2: AnyObject
327
+ ] | [
328
+ o1: AnyObject
329
+ ]) => any>;
330
+ (a: typeof __, b: AnyObject): (a: AnyObject) => FT.Curry<(...p: [
331
+ ] | [
332
+ o1: AnyObject,
333
+ o2: AnyObject
334
+ ] | [
335
+ o2: AnyObject
336
+ ] | [
337
+ o1: AnyObject
338
+ ]) => any>;
339
+ (a: AnyObject, b: typeof __): (b: AnyObject) => FT.Curry<(...p: [
340
+ ] | [
341
+ o1: AnyObject,
342
+ o2: AnyObject
343
+ ] | [
344
+ o2: AnyObject
345
+ ] | [
346
+ o1: AnyObject
347
+ ]) => any>;
348
+ };
349
+ export declare const mergeDeepX: {
350
+ (a: AnyObject): (b: AnyObject) => FT.Curry<(...p: [
351
+ ] | [
352
+ o1: AnyObject,
353
+ o2: AnyObject
354
+ ] | [
355
+ o2: AnyObject
356
+ ] | [
357
+ o1: AnyObject
358
+ ]) => any>;
359
+ (a: AnyObject, b: AnyObject): FT.Curry<(...p: [
360
+ ] | [
361
+ o1: AnyObject,
362
+ o2: AnyObject
363
+ ] | [
364
+ o2: AnyObject
365
+ ] | [
366
+ o1: AnyObject
367
+ ]) => any>;
368
+ (a: typeof __, b: AnyObject): (a: AnyObject) => FT.Curry<(...p: [
369
+ ] | [
370
+ o1: AnyObject,
371
+ o2: AnyObject
372
+ ] | [
373
+ o2: AnyObject
374
+ ] | [
375
+ o1: AnyObject
376
+ ]) => any>;
377
+ (a: AnyObject, b: typeof __): (b: AnyObject) => FT.Curry<(...p: [
378
+ ] | [
379
+ o1: AnyObject,
380
+ o2: AnyObject
381
+ ] | [
382
+ o2: AnyObject
383
+ ] | [
384
+ o1: AnyObject
385
+ ]) => any>;
386
+ };
387
+ export declare const mergeDeepAdd: {
388
+ (a: AnyObject): (b: AnyObject) => FT.Curry<(...p: [
389
+ ] | [
390
+ o1: AnyObject,
391
+ o2: AnyObject
392
+ ] | [
393
+ o2: AnyObject
394
+ ] | [
395
+ o1: AnyObject
396
+ ]) => any>;
397
+ (a: AnyObject, b: AnyObject): FT.Curry<(...p: [
398
+ ] | [
399
+ o1: AnyObject,
400
+ o2: AnyObject
401
+ ] | [
402
+ o2: AnyObject
403
+ ] | [
404
+ o1: AnyObject
405
+ ]) => any>;
406
+ (a: typeof __, b: AnyObject): (a: AnyObject) => FT.Curry<(...p: [
407
+ ] | [
408
+ o1: AnyObject,
409
+ o2: AnyObject
410
+ ] | [
411
+ o2: AnyObject
412
+ ] | [
413
+ o1: AnyObject
414
+ ]) => any>;
415
+ (a: AnyObject, b: typeof __): (b: AnyObject) => FT.Curry<(...p: [
416
+ ] | [
417
+ o1: AnyObject,
418
+ o2: AnyObject
419
+ ] | [
420
+ o2: AnyObject
421
+ ] | [
422
+ o1: AnyObject
423
+ ]) => any>;
424
+ };
425
+ export declare const overProp: FT.Curry<(prop: string, pipe: AnyFunc, data: any) => FT.Curry<(...p: [
426
+ ] | [
427
+ v: any,
428
+ obj: AnyObject
429
+ ] | [
430
+ obj: AnyObject
431
+ ] | [
432
+ v: any
433
+ ]) => any>>;
100
434
  /** mapKeys({ a: 'b' }, { a: 44 }) -> { b: 44 } */
101
- export declare const mapKeys: (...args: any[]) => any;
435
+ export declare const mapKeys: {
436
+ (a: {
437
+ [oldKey: string]: string;
438
+ }): (b: AnyObject) => AnyObject;
439
+ (a: {
440
+ [oldKey: string]: string;
441
+ }, b: AnyObject): AnyObject;
442
+ (a: typeof __, b: AnyObject): (a: {
443
+ [oldKey: string]: string;
444
+ }) => AnyObject;
445
+ (a: {
446
+ [oldKey: string]: string;
447
+ }, b: typeof __): (b: AnyObject) => AnyObject;
448
+ };
102
449
  /** One promise waits for another. */
103
- export declare const forEachSerial: (...args: any[]) => any;
450
+ export declare const forEachSerial: {
451
+ (a: AnyFunc<any, AnyArgs>): (b: any[]) => Promise<void>;
452
+ (a: AnyFunc<any, AnyArgs>, b: any[]): Promise<void>;
453
+ (a: typeof __, b: any[]): (a: AnyFunc<any, AnyArgs>) => Promise<void>;
454
+ (a: AnyFunc<any, AnyArgs>, b: typeof __): (b: any[]) => Promise<void>;
455
+ };
104
456
  /** Promise.all wrapper for functional pipelining. */
105
457
  export declare const waitAll: (promises: Promise<any>[]) => Promise<any[]>;
458
+ export declare const waitTap: {
459
+ (a: Function): (b: any) => Promise<any>;
460
+ (a: Function, b: any): Promise<any>;
461
+ (a: typeof __, b: any): (a: Function) => Promise<any>;
462
+ (a: Function, b: typeof __): (b: any) => Promise<any>;
463
+ };
106
464
  /** Waits for all promises mapped by the fn. */
107
- export declare const forEachAsync: (...args: any[]) => any;
465
+ export declare const forEachAsync: {
466
+ (a: (item: any) => Promise<any>): (b: any[]) => Promise<any[]>;
467
+ (a: (item: any) => Promise<any>, b: any[]): Promise<any[]>;
468
+ (a: typeof __, b: any[]): (a: (item: any) => Promise<any>) => Promise<any[]>;
469
+ (a: (item: any) => Promise<any>, b: typeof __): (b: any[]) => Promise<any[]>;
470
+ };
108
471
  /** The same as compose, but waits for promises in chains and returns a Promise. */
109
- export declare const composeAsync: <T = any>(...fns: AnyFunc[]) => (data?: any) => Promise<T>;
472
+ export declare const composeAsync: import("ts-toolbelt/out/Function/Compose/Multi/Async").ComposeMultiAsync;
110
473
  export declare const mirror: (s: any) => any;
111
474
  export declare const reflect: (s: any) => any;
112
475
  export declare const echo: (s: any) => any;
113
- export declare const qappend: (...args: any[]) => any;
114
- export declare const qassoc: (...args: any[]) => any;
115
- export declare const qreduce: (...args: any[]) => any;
116
- export declare const qmergeDeep: any;
117
- export declare const qmergeDeepX: any;
118
- export declare const qmergeDeepAdd: any;
476
+ export declare const qappend: {
477
+ (a: any): (b: any[]) => any[];
478
+ (a: any, b: any[]): any[];
479
+ (a: typeof __, b: any[]): (a: any) => any[];
480
+ (a: any, b: typeof __): (b: any[]) => any[];
481
+ };
482
+ export declare const qassoc: import("ts-toolbelt/out/Function/Curry").Curry<(prop: string, v: any, obj: AnyObject) => AnyObject>;
483
+ export declare const qreduce: import("ts-toolbelt/out/Function/Curry").Curry<(<T>(fn: Reducer, accum: any, arr: T[]) => any)>;
484
+ export declare const qmergeDeep: import("ts-toolbelt/out/Function/Curry").Curry<(o1: AnyObject, o2: AnyObject) => AnyObject>;
485
+ export declare const qmergeDeepX: import("ts-toolbelt/out/Function/Curry").Curry<(o1: AnyObject, o2: AnyObject) => AnyObject>;
486
+ export declare const qmergeDeepAdd: import("ts-toolbelt/out/Function/Curry").Curry<(o1: AnyObject, o2: AnyObject) => AnyObject>;
119
487
  /** qmapKeys({ a: 'b' }, { a: 44 }) -> { b: 44 } */
120
- export declare const qmapKeys: (...args: any[]) => any;
121
- export declare const qfilter: (...args: any[]) => any;
488
+ export declare const qmapKeys: {
489
+ (a: {
490
+ [oldKey: string]: string;
491
+ }): (b: AnyObject) => AnyObject;
492
+ (a: {
493
+ [oldKey: string]: string;
494
+ }, b: AnyObject): AnyObject;
495
+ (a: typeof __, b: AnyObject): (a: {
496
+ [oldKey: string]: string;
497
+ }) => AnyObject;
498
+ (a: {
499
+ [oldKey: string]: string;
500
+ }, b: typeof __): (b: AnyObject) => AnyObject;
501
+ };
502
+ export declare const qfilter: {
503
+ (a: (v: any, k: string | number) => boolean): (b: any[] | AnyObject) => any[] | AnyObject;
504
+ (a: (v: any, k: string | number) => boolean, b: any[] | AnyObject): any[] | AnyObject;
505
+ (a: typeof __, b: any[] | AnyObject): (a: (v: any, k: string | number) => boolean) => any[] | AnyObject;
506
+ (a: (v: any, k: string | number) => boolean, b: typeof __): (b: any[] | AnyObject) => any[] | AnyObject;
507
+ };
122
508
  /** @deprecated */
123
- export declare const qindexOf: (...args: any[]) => any;
124
- export declare type StrTmpl = ((data: AnyObject) => string);
509
+ export declare const qindexOf: {
510
+ (a: any): (b: any[]) => number;
511
+ (a: any, b: any[]): number;
512
+ (a: typeof __, b: any[]): (a: any) => number;
513
+ (a: any, b: typeof __): (b: any[]) => number;
514
+ };
515
+ export type StrTmpl = ((data: AnyObject) => string);
125
516
  export declare const getTmpl: (tmpl: string) => StrTmpl;
126
517
 
127
518
  export {};