pepka 0.14.0-beta7 → 0.14.0-beta9
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.d.ts +8 -8
- package/package.json +78 -78
- package/src/safe.ts +2 -2
- package/src/types.ts +1 -1
package/dist/bundle.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface AnyObject {
|
|
|
9
9
|
}
|
|
10
10
|
export type AnyArgs = any[];
|
|
11
11
|
export type Curried<Args extends AnyArgs = AnyArgs, ReturnT = any> = (arg: Args[number]) => Curried<Args> | ReturnT;
|
|
12
|
-
export type Reducer
|
|
12
|
+
export type Reducer<T = any> = (accum: T, cur: any, index: number) => T;
|
|
13
13
|
export type AnyFunc<ReturnT = any, Args extends AnyArgs = AnyArgs> = (...args: Args) => ReturnT;
|
|
14
14
|
export type Placeholder = symbol;
|
|
15
15
|
declare const __: Placeholder;
|
|
@@ -266,10 +266,10 @@ export declare const pathEq: FT.Curry<(_path: string[], value: any, o: AnyObject
|
|
|
266
266
|
export declare const pathsEq: FT.Curry<(_path: string[], o1: AnyObject, o2: AnyObject) => (a: any) => boolean>;
|
|
267
267
|
export declare const clone: (s: any, shallow?: boolean) => any;
|
|
268
268
|
export declare const cloneShallow: (s: any) => any;
|
|
269
|
-
export declare const reduce: FT.Curry<(fn: Reducer
|
|
269
|
+
export declare const reduce: FT.Curry<(<T = any>(fn: Reducer<T>, accum: T, arr: any[]) => FT.Curry<(...p: [
|
|
270
270
|
] | [
|
|
271
271
|
accum: any
|
|
272
|
-
]) => any
|
|
272
|
+
]) => any>)>;
|
|
273
273
|
export declare const pickBy: {
|
|
274
274
|
(a: symbol, b: AnyObject): (a: Cond) => any;
|
|
275
275
|
(a: Cond, b: symbol): (b: AnyObject) => any;
|
|
@@ -291,7 +291,7 @@ export declare const omit: {
|
|
|
291
291
|
export declare const fromPairs: (pairs: [
|
|
292
292
|
string,
|
|
293
293
|
any
|
|
294
|
-
][]) => FT.Curry<(fn: Reducer
|
|
294
|
+
][]) => FT.Curry<(fn: Reducer<unknown>, accum: unknown, arr: any[]) => FT.Curry<(...p: [
|
|
295
295
|
] | [
|
|
296
296
|
accum: any
|
|
297
297
|
]) => any>>;
|
|
@@ -308,10 +308,10 @@ export declare const join: {
|
|
|
308
308
|
(a: string, b: string[]): string;
|
|
309
309
|
};
|
|
310
310
|
export declare const map: {
|
|
311
|
-
(a: symbol, b:
|
|
312
|
-
(a: (s:
|
|
313
|
-
(a: (s:
|
|
314
|
-
(a: (s:
|
|
311
|
+
(a: symbol, b: any[]): (a: (s: any, i?: number, list?: any[]) => any) => any[];
|
|
312
|
+
(a: (s: any, i?: number, list?: any[]) => any, b: symbol): (b: any[]) => any[];
|
|
313
|
+
(a: (s: any, i?: number, list?: any[]) => any): (b: any[]) => any[];
|
|
314
|
+
(a: (s: any, i?: number, list?: any[]) => any, b: any[]): any[];
|
|
315
315
|
};
|
|
316
316
|
export declare const forEach: {
|
|
317
317
|
(a: symbol, b: any[]): (a: (s: any) => any) => void;
|
package/package.json
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
{
|
|
2
|
-
"author": {
|
|
3
|
-
"name": "Michael houd1ni Akiliev"
|
|
4
|
-
},
|
|
5
|
-
"bugs": {
|
|
6
|
-
"url": "https://github.com/houd1ni/pepka/issues"
|
|
7
|
-
},
|
|
8
|
-
"bundleDependencies": [],
|
|
9
|
-
"deprecated": false,
|
|
10
|
-
"description": "An ultra lightweight or unsafe-speedy ramda alternative.",
|
|
11
|
-
"homepage": "https://houd1ni.github.io/pepka/",
|
|
12
|
-
"keywords": [
|
|
13
|
-
"ramda",
|
|
14
|
-
"functional",
|
|
15
|
-
"fp",
|
|
16
|
-
"pure",
|
|
17
|
-
"strongly-typed",
|
|
18
|
-
"typescript",
|
|
19
|
-
"d.ts"
|
|
20
|
-
],
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"type": "module",
|
|
23
|
-
"exports": {
|
|
24
|
-
".": {
|
|
25
|
-
"module": "./dist/bundle.mjs",
|
|
26
|
-
"require": "./dist/bundle.cjs"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"name": "pepka",
|
|
30
|
-
"repository": {
|
|
31
|
-
"type": "git",
|
|
32
|
-
"url": "git+https://github.com/houd1ni/pepka.git"
|
|
33
|
-
},
|
|
34
|
-
"scripts": {
|
|
35
|
-
"lint": "tslint src/*.ts",
|
|
36
|
-
"test": "npm run gentypes && npm run prod:cjs && ava",
|
|
37
|
-
"test:report": "nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && codecov",
|
|
38
|
-
"test:lazy": "ava",
|
|
39
|
-
"dts-fix": "node dts-fix.js",
|
|
40
|
-
"gentypes": "dts-bundle-generator --no-check -o dist/bundle.d.ts src/index.ts && npm run dts-fix",
|
|
41
|
-
"dev": "cross-env NODE_ENV=development BUILD=es rollup -c",
|
|
42
|
-
"prod:cjs": "cross-env NODE_ENV=production BUILD=cjs rollup -c",
|
|
43
|
-
"prod:es": "cross-env NODE_ENV=production BUILD=es rollup -c",
|
|
44
|
-
"prod": "npm run gentypes && npm run prod:es && npm run prod:cjs",
|
|
45
|
-
"all": "npm run dev && npm run prod"
|
|
46
|
-
},
|
|
47
|
-
"version": "0.14.0-
|
|
48
|
-
"ava": {
|
|
49
|
-
"files": [ "./test/specs/*.ts" ],
|
|
50
|
-
"failFast": true,
|
|
51
|
-
"timeout": "2m",
|
|
52
|
-
"extensions": [ "ts" ],
|
|
53
|
-
"require": [ "ts-node/register" ]
|
|
54
|
-
},
|
|
55
|
-
"dependencies": {
|
|
56
|
-
"ts-toolbelt": "^9.6.0"
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"@rollup/plugin-commonjs": "^23.0.3",
|
|
60
|
-
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
61
|
-
"@rollup/plugin-replace": "^5.0.1",
|
|
62
|
-
"@rollup/plugin-terser": "^0.1.0",
|
|
63
|
-
"@types/node": "^18.11.11",
|
|
64
|
-
"ava": "^5.1.0",
|
|
65
|
-
"codecov": "^3.8.2",
|
|
66
|
-
"cross-env": "^7.0.3",
|
|
67
|
-
"dts-bundle-generator": "^7.1.0",
|
|
68
|
-
"nyc": "^15.1.0",
|
|
69
|
-
"prepend": "^1.0.2",
|
|
70
|
-
"rollup": "^3.6.0",
|
|
71
|
-
"rollup-plugin-typescript2": "^0.34.1",
|
|
72
|
-
"ts-node": "^10.9.1",
|
|
73
|
-
"tslint": "^6.1.0",
|
|
74
|
-
"typescript": "^4.9.4"
|
|
75
|
-
},
|
|
76
|
-
"types": "./dist/bundle.d.ts",
|
|
77
|
-
"sideEffects": false
|
|
78
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"author": {
|
|
3
|
+
"name": "Michael houd1ni Akiliev"
|
|
4
|
+
},
|
|
5
|
+
"bugs": {
|
|
6
|
+
"url": "https://github.com/houd1ni/pepka/issues"
|
|
7
|
+
},
|
|
8
|
+
"bundleDependencies": [],
|
|
9
|
+
"deprecated": false,
|
|
10
|
+
"description": "An ultra lightweight or unsafe-speedy ramda alternative.",
|
|
11
|
+
"homepage": "https://houd1ni.github.io/pepka/",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ramda",
|
|
14
|
+
"functional",
|
|
15
|
+
"fp",
|
|
16
|
+
"pure",
|
|
17
|
+
"strongly-typed",
|
|
18
|
+
"typescript",
|
|
19
|
+
"d.ts"
|
|
20
|
+
],
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"module": "./dist/bundle.mjs",
|
|
26
|
+
"require": "./dist/bundle.cjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"name": "pepka",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/houd1ni/pepka.git"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"lint": "tslint src/*.ts",
|
|
36
|
+
"test": "npm run gentypes && npm run prod:cjs && ava",
|
|
37
|
+
"test:report": "nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && codecov",
|
|
38
|
+
"test:lazy": "ava",
|
|
39
|
+
"dts-fix": "node dts-fix.js",
|
|
40
|
+
"gentypes": "dts-bundle-generator --no-check -o dist/bundle.d.ts src/index.ts && npm run dts-fix",
|
|
41
|
+
"dev": "cross-env NODE_ENV=development BUILD=es rollup -c",
|
|
42
|
+
"prod:cjs": "cross-env NODE_ENV=production BUILD=cjs rollup -c",
|
|
43
|
+
"prod:es": "cross-env NODE_ENV=production BUILD=es rollup -c",
|
|
44
|
+
"prod": "npm run gentypes && npm run prod:es && npm run prod:cjs",
|
|
45
|
+
"all": "npm run dev && npm run prod"
|
|
46
|
+
},
|
|
47
|
+
"version": "0.14.0-beta9",
|
|
48
|
+
"ava": {
|
|
49
|
+
"files": [ "./test/specs/*.ts" ],
|
|
50
|
+
"failFast": true,
|
|
51
|
+
"timeout": "2m",
|
|
52
|
+
"extensions": [ "ts" ],
|
|
53
|
+
"require": [ "ts-node/register" ]
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"ts-toolbelt": "^9.6.0"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@rollup/plugin-commonjs": "^23.0.3",
|
|
60
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
61
|
+
"@rollup/plugin-replace": "^5.0.1",
|
|
62
|
+
"@rollup/plugin-terser": "^0.1.0",
|
|
63
|
+
"@types/node": "^18.11.11",
|
|
64
|
+
"ava": "^5.1.0",
|
|
65
|
+
"codecov": "^3.8.2",
|
|
66
|
+
"cross-env": "^7.0.3",
|
|
67
|
+
"dts-bundle-generator": "^7.1.0",
|
|
68
|
+
"nyc": "^15.1.0",
|
|
69
|
+
"prepend": "^1.0.2",
|
|
70
|
+
"rollup": "^3.6.0",
|
|
71
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
72
|
+
"ts-node": "^10.9.1",
|
|
73
|
+
"tslint": "^6.1.0",
|
|
74
|
+
"typescript": "^4.9.4"
|
|
75
|
+
},
|
|
76
|
+
"types": "./dist/bundle.d.ts",
|
|
77
|
+
"sideEffects": false
|
|
78
|
+
}
|
package/src/safe.ts
CHANGED
|
@@ -259,7 +259,7 @@ export const clone = (s: any, shallow = false) => {
|
|
|
259
259
|
export const cloneShallow = (s: any) => clone(s, true)
|
|
260
260
|
|
|
261
261
|
export const reduce = curry3(
|
|
262
|
-
(fn: Reducer
|
|
262
|
+
<T = any>(fn: Reducer<T>, accum: T, arr: any[]) =>
|
|
263
263
|
qreduce(fn, clone(accum), arr)
|
|
264
264
|
)
|
|
265
265
|
export const pickBy = curry2(
|
|
@@ -295,7 +295,7 @@ export const join = curry2(
|
|
|
295
295
|
(delimeter: string, arr: string[]) => arr.join(delimeter)
|
|
296
296
|
)
|
|
297
297
|
export const map = curry2(
|
|
298
|
-
|
|
298
|
+
(pipe: (s: any, i?: number, list?: any[]) => any, arr: any[]) => arr.map(pipe)
|
|
299
299
|
)
|
|
300
300
|
export const forEach = curry2(
|
|
301
301
|
(pipe: (s: any) => any, arr: any[]) => arr.forEach(pipe)
|
package/src/types.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type Curried<
|
|
|
7
7
|
Args extends AnyArgs = AnyArgs,
|
|
8
8
|
ReturnT = any
|
|
9
9
|
> = (arg: Args[number]) => Curried<Args> | ReturnT
|
|
10
|
-
export type Reducer
|
|
10
|
+
export type Reducer<T=any> = (accum: T, cur: any, index: number) => T
|
|
11
11
|
export type AnyFunc<
|
|
12
12
|
ReturnT = any,
|
|
13
13
|
Args extends AnyArgs = AnyArgs
|