pepka 1.6.1 → 1.6.2
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/bundle.cjs +5 -1
- package/dist/bundle.d.ts +9 -10
- package/dist/bundle.mjs +5 -1
- package/package.json +1 -1
- package/src/quick.ts +4 -1
- package/src/types.ts +1 -1
package/dist/bundle.cjs
CHANGED
|
@@ -199,7 +199,11 @@ const qmap = curry2((pipe, arr) => {
|
|
|
199
199
|
arr[i] = pipe(arr[i], +i, arr);
|
|
200
200
|
return arr;
|
|
201
201
|
});
|
|
202
|
-
const qmapObj = curry2((pipe, o) =>
|
|
202
|
+
const qmapObj = curry2((pipe, o) => {
|
|
203
|
+
for (const k in o)
|
|
204
|
+
o[k] = pipe(o[k], k, o);
|
|
205
|
+
return o;
|
|
206
|
+
});
|
|
203
207
|
const qfilter = curry2((cond, data) => {
|
|
204
208
|
const isArr = isArray(data);
|
|
205
209
|
let indicies_offset, indicies2rm;
|
package/dist/bundle.d.ts
CHANGED
|
@@ -15,8 +15,7 @@ type StrLen<S extends string, Acc extends 0[] = [
|
|
|
15
15
|
0
|
|
16
16
|
]> : Acc["length"];
|
|
17
17
|
export type Cond = (x1?: any, x2?: any, x3?: any) => boolean;
|
|
18
|
-
export interface AnyObject {
|
|
19
|
-
[k: string]: any;
|
|
18
|
+
export interface AnyObject extends Record<any, any> {
|
|
20
19
|
}
|
|
21
20
|
export type Reducer<T = any> = (accum: T, cur: any, index: number) => T;
|
|
22
21
|
export type AnyFunc<ReturnT = any, Args extends AnyArgs = AnyArgs> = (...args: Args) => ReturnT;
|
|
@@ -439,10 +438,10 @@ export declare const map: {
|
|
|
439
438
|
(a: (s: any, i?: number, list?: any[]) => any, b: any[]): any[];
|
|
440
439
|
};
|
|
441
440
|
export declare const mapObj: {
|
|
442
|
-
(a: symbol, b: AnyObject): (a: (s: any, i?: string, list?: any[]) => any) => (b: AnyObject) =>
|
|
443
|
-
(a: (s: any, i?: string, list?: any[]) => any, b: symbol): (b: AnyObject) => (b: AnyObject) =>
|
|
444
|
-
(a: (s: any, i?: string, list?: any[]) => any): (b: AnyObject) => (b: AnyObject) =>
|
|
445
|
-
(a: (s: any, i?: string, list?: any[]) => any, b: AnyObject): (b: AnyObject) =>
|
|
441
|
+
(a: symbol, b: AnyObject): (a: (s: any, i?: string, list?: any[]) => any) => (b: AnyObject) => AnyObject;
|
|
442
|
+
(a: (s: any, i?: string, list?: any[]) => any, b: symbol): (b: AnyObject) => (b: AnyObject) => AnyObject;
|
|
443
|
+
(a: (s: any, i?: string, list?: any[]) => any): (b: AnyObject) => (b: AnyObject) => AnyObject;
|
|
444
|
+
(a: (s: any, i?: string, list?: any[]) => any, b: AnyObject): (b: AnyObject) => AnyObject;
|
|
446
445
|
};
|
|
447
446
|
export declare const join: {
|
|
448
447
|
(a: symbol, b: string[]): (a: string) => string;
|
|
@@ -612,10 +611,10 @@ export declare const qmap: {
|
|
|
612
611
|
(a: (s: any, i?: number, list?: any[]) => any, b: any[]): any[];
|
|
613
612
|
};
|
|
614
613
|
export declare const qmapObj: {
|
|
615
|
-
(a: symbol, b: AnyObject): (a: (s: any, k?: string,
|
|
616
|
-
(a: (s: any, k?: string,
|
|
617
|
-
(a: (s: any, k?: string,
|
|
618
|
-
(a: (s: any, k?: string,
|
|
614
|
+
(a: symbol, b: AnyObject): (a: (s: any, k?: string, o?: AnyObject) => any) => AnyObject;
|
|
615
|
+
(a: (s: any, k?: string, o?: AnyObject) => any, b: symbol): (b: AnyObject) => AnyObject;
|
|
616
|
+
(a: (s: any, k?: string, o?: AnyObject) => any): (b: AnyObject) => AnyObject;
|
|
617
|
+
(a: (s: any, k?: string, o?: AnyObject) => any, b: AnyObject): AnyObject;
|
|
619
618
|
};
|
|
620
619
|
export declare const qfilter: {
|
|
621
620
|
(a: symbol, b: any[] | AnyObject): (a: (v: any, k: string | number) => boolean) => any[] | AnyObject;
|
package/dist/bundle.mjs
CHANGED
|
@@ -197,7 +197,11 @@ const qmap = curry2((pipe, arr) => {
|
|
|
197
197
|
arr[i] = pipe(arr[i], +i, arr);
|
|
198
198
|
return arr;
|
|
199
199
|
});
|
|
200
|
-
const qmapObj = curry2((pipe, o) =>
|
|
200
|
+
const qmapObj = curry2((pipe, o) => {
|
|
201
|
+
for (const k in o)
|
|
202
|
+
o[k] = pipe(o[k], k, o);
|
|
203
|
+
return o;
|
|
204
|
+
});
|
|
201
205
|
const qfilter = curry2((cond, data) => {
|
|
202
206
|
const isArr = isArray(data);
|
|
203
207
|
let indicies_offset, indicies2rm;
|
package/package.json
CHANGED
package/src/quick.ts
CHANGED
|
@@ -69,7 +69,10 @@ export const qmap = curry2(
|
|
|
69
69
|
}
|
|
70
70
|
)
|
|
71
71
|
export const qmapObj = curry2(
|
|
72
|
-
(pipe: (s: any, k?: string,
|
|
72
|
+
(pipe: (s: any, k?: string, o?: AnyObject) => any, o: AnyObject) => {
|
|
73
|
+
for(const k in o) o[k] = pipe(o[k], k, o)
|
|
74
|
+
return o
|
|
75
|
+
}
|
|
73
76
|
)
|
|
74
77
|
export const qfilter = curry2(
|
|
75
78
|
<T extends any[] | AnyObject>(
|
package/src/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyArgs } from "./internal_types"
|
|
2
2
|
|
|
3
3
|
export type Cond = (x1?: any, x2?: any, x3?: any) => boolean
|
|
4
|
-
export interface AnyObject
|
|
4
|
+
export interface AnyObject extends Record<any, any> {}
|
|
5
5
|
export type Reducer<T=any> = (accum: T, cur: any, index: number) => T
|
|
6
6
|
export type AnyFunc<ReturnT = any, Args extends AnyArgs = AnyArgs> = (...args: Args) => ReturnT
|
|
7
7
|
export type Curried<Args extends AnyArgs = AnyArgs, ReturnT = any> = (arg: Args[number]) => Curried<Args> | ReturnT
|