pepka 1.6.12 → 1.6.13
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 +1 -1
- package/dist/bundle.d.ts +1 -1
- package/dist/bundle.mjs +1 -1
- package/package.json +1 -1
- package/src/quick.ts +1 -1
- package/src/safe.ts +2 -2
package/dist/bundle.cjs
CHANGED
|
@@ -140,7 +140,7 @@ const qstartsWithWith = (comparator) => curry2((start, s) => {
|
|
|
140
140
|
});
|
|
141
141
|
|
|
142
142
|
/* Then next fns seem to be excess due to their safe ver performance should be the same or better:
|
|
143
|
-
* qflat, qpick
|
|
143
|
+
* qflat, qpick, qslice, quniq
|
|
144
144
|
*/
|
|
145
145
|
const qappend = curry2((s, xs) => { xs.push(s); return xs; });
|
|
146
146
|
const qassoc = curry3((prop, v, obj) => { obj[prop] = v; return obj; });
|
package/dist/bundle.d.ts
CHANGED
|
@@ -325,7 +325,7 @@ export declare const genBy: {
|
|
|
325
325
|
(a: (i: number) => any): (b: number) => any[];
|
|
326
326
|
(a: (i: number) => any, b: number): any[];
|
|
327
327
|
};
|
|
328
|
-
export declare const once: <Func extends AnyFunc>(fn: Func) => (...args: Parameters<Func>) =>
|
|
328
|
+
export declare const once: <Func extends AnyFunc>(fn: Func) => (...args: Parameters<Func>) => ReturnType<Func>;
|
|
329
329
|
export declare const reverse: <T extends any>(xs: T[]) => T[];
|
|
330
330
|
export declare const explore: (caption: string, level?: string) => {
|
|
331
331
|
<T>(x: T): T;
|
package/dist/bundle.mjs
CHANGED
|
@@ -138,7 +138,7 @@ const qstartsWithWith = (comparator) => curry2((start, s) => {
|
|
|
138
138
|
});
|
|
139
139
|
|
|
140
140
|
/* Then next fns seem to be excess due to their safe ver performance should be the same or better:
|
|
141
|
-
* qflat, qpick
|
|
141
|
+
* qflat, qpick, qslice, quniq
|
|
142
142
|
*/
|
|
143
143
|
const qappend = curry2((s, xs) => { xs.push(s); return xs; });
|
|
144
144
|
const qassoc = curry3((prop, v, obj) => { obj[prop] = v; return obj; });
|
package/package.json
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"prod": "npm run gentypes && npm run prod:es && npm run prod:cjs",
|
|
42
42
|
"all": "npm run dev && npm run prod"
|
|
43
43
|
},
|
|
44
|
-
"version": "1.6.
|
|
44
|
+
"version": "1.6.13",
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
47
47
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
package/src/quick.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { includes, type, eq, qstartsWithWith } from "./common"
|
|
|
3
3
|
import { AnyObject, Reducer, AnyFunc } from "./types"
|
|
4
4
|
import { isFunc, isArray, isObj, isNil } from "./utils"
|
|
5
5
|
/* Then next fns seem to be excess due to their safe ver performance should be the same or better:
|
|
6
|
-
* qflat, qpick
|
|
6
|
+
* qflat, qpick, qslice, quniq
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
export const qappend = curry2((s: any, xs: any[]) => {xs.push(s); return xs})
|
package/src/safe.ts
CHANGED
|
@@ -200,11 +200,11 @@ export const genBy = curry2(
|
|
|
200
200
|
) => [...Array(length)].map((_, i) => generator(i))
|
|
201
201
|
)
|
|
202
202
|
export const once = <Func extends AnyFunc>(fn: Func) => {
|
|
203
|
-
let done = false, cache:
|
|
203
|
+
let done = false, cache: ReturnType<Func>
|
|
204
204
|
return function(...args: Parameters<Func>) {
|
|
205
205
|
if(done) return cache
|
|
206
206
|
done = true
|
|
207
|
-
return cache = fn(...args)
|
|
207
|
+
return cache = fn(...args) as ReturnType<Func>
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
export const reverse = <T extends any>(xs: T[]): T[] => {
|