pepka 1.6.5 → 1.6.6
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 +3 -0
- package/dist/bundle.d.ts +10 -4
- package/dist/bundle.mjs +3 -1
- package/package.json +1 -1
- package/src/quick.ts +4 -1
- package/src/safe.ts +1 -1
package/dist/bundle.cjs
CHANGED
|
@@ -258,6 +258,8 @@ const qstartsWith = qstartsWithWith(eq);
|
|
|
258
258
|
/** @param prop string @param pipe (data[prop]): prop_value @param data any
|
|
259
259
|
* @returns data with prop over pipe. */
|
|
260
260
|
const qoverProp = curry3((prop, pipe, data) => qassoc(prop, pipe(data[prop]), data));
|
|
261
|
+
// Aliases.
|
|
262
|
+
const qpush = qappend;
|
|
261
263
|
|
|
262
264
|
// TODO: possibly introduce a second argument limiting unfolding.
|
|
263
265
|
const uncurry = (fn) => (...args) => qreduce(((fn, arg) => fn ? fn(arg) : fn), fn, args);
|
|
@@ -765,6 +767,7 @@ exports.qmergeShallow = qmergeShallow;
|
|
|
765
767
|
exports.qomit = qomit;
|
|
766
768
|
exports.qoverProp = qoverProp;
|
|
767
769
|
exports.qprepend = qprepend;
|
|
770
|
+
exports.qpush = qpush;
|
|
768
771
|
exports.qreduce = qreduce;
|
|
769
772
|
exports.qreverse = qreverse;
|
|
770
773
|
exports.qsort = qsort;
|
package/dist/bundle.d.ts
CHANGED
|
@@ -450,10 +450,10 @@ export declare const join: {
|
|
|
450
450
|
(a: string, b: string[]): string;
|
|
451
451
|
};
|
|
452
452
|
export declare const forEach: {
|
|
453
|
-
(a: symbol, b: any[]): (a: (s:
|
|
454
|
-
(a: (s:
|
|
455
|
-
(a: (s:
|
|
456
|
-
(a: (s:
|
|
453
|
+
(a: symbol, b: any[]): (a: (s: unknown, i: number, arr: unknown[]) => any) => void;
|
|
454
|
+
(a: (s: unknown, i: number, arr: unknown[]) => any, b: symbol): (b: any[]) => void;
|
|
455
|
+
(a: (s: unknown, i: number, arr: unknown[]) => any): (b: any[]) => void;
|
|
456
|
+
(a: (s: unknown, i: number, arr: unknown[]) => any, b: any[]): void;
|
|
457
457
|
};
|
|
458
458
|
export declare const both: (...args: AnyArgs) => any;
|
|
459
459
|
export declare const isEmpty: (s: any) => boolean | null;
|
|
@@ -656,6 +656,12 @@ export declare const qstartsWith: {
|
|
|
656
656
|
/** @param prop string @param pipe (data[prop]): prop_value @param data any
|
|
657
657
|
* @returns data with prop over pipe. */
|
|
658
658
|
export declare const qoverProp: (...args: AnyArgs) => any;
|
|
659
|
+
export declare const qpush: {
|
|
660
|
+
(a: symbol, b: any[]): (a: any) => any[];
|
|
661
|
+
(a: any, b: symbol): (b: any[]) => any[];
|
|
662
|
+
(a: any): (b: any[]) => any[];
|
|
663
|
+
(a: any, b: any[]): any[];
|
|
664
|
+
};
|
|
659
665
|
type StrTmpl = ((data: AnyObject) => string);
|
|
660
666
|
/** Supports ecrans: '\\{"json": {yes} \\}'
|
|
661
667
|
@returns getTmpl('one{meme}two')({meme: 42}) -> one42two */
|
package/dist/bundle.mjs
CHANGED
|
@@ -256,6 +256,8 @@ const qstartsWith = qstartsWithWith(eq);
|
|
|
256
256
|
/** @param prop string @param pipe (data[prop]): prop_value @param data any
|
|
257
257
|
* @returns data with prop over pipe. */
|
|
258
258
|
const qoverProp = curry3((prop, pipe, data) => qassoc(prop, pipe(data[prop]), data));
|
|
259
|
+
// Aliases.
|
|
260
|
+
const qpush = qappend;
|
|
259
261
|
|
|
260
262
|
// TODO: possibly introduce a second argument limiting unfolding.
|
|
261
263
|
const uncurry = (fn) => (...args) => qreduce(((fn, arg) => fn ? fn(arg) : fn), fn, args);
|
|
@@ -652,4 +654,4 @@ const composeAsync = (() => {
|
|
|
652
654
|
return (...fns) => (...input) => pipe(fns, input, fns.length - 1);
|
|
653
655
|
})();
|
|
654
656
|
|
|
655
|
-
export { F, T, __, add, all, allPass, always, any, anyPass, append, assoc, assocPath, bind, both, callFrom, callWith, clone, cloneShallow, complement, compose, composeAsync, concat, cond, curry, curry2, curry3, debounce, diff, divide, echo, empty, eq, equals, explore, filter, find, findIndex, flat, flatShallow, flatTo, flip, forEach, forEachAsync, forEachSerial, freeze, freezeShallow, fromPairs, genBy, getTmpl, gt, gte, head, identity, ifElse, includes, indexOf, intersection, isEmpty, isNil, join, keys, last, length, lt, lte, map, mapKeys, mapObj, memoize, mergeDeep, mergeDeepAdd, mergeDeepX, mergeShallow, mirror, multiply, noop, not, notf, nth, omit, once, overProp, path, pathEq, pathExists, pathOr, pathsEq, pick, pickBy, prepend, prop, propEq, propsEq, push, qappend, qassoc, qassocPath, qempty, qfilter, qfreeze, qfreezeShallow, qmap, qmapKeys, qmapObj, qmergeDeep, qmergeDeepAdd, qmergeDeepX, qmergeShallow, qomit, qoverProp, qprepend, qreduce, qreverse, qsort, qstartsWith, qstartsWithWith, range, reduce, reflect, replace, reverse, sizeof, slice, some, sort, split, startsWith, subtract, symbol, tail, take, tap, test, throttle, toLower, toPairs, toUpper, trim, type, typeIs, uncurry, uniq, uniqWith, values, wait, waitAll, waitTap, weakEq, when, zip, zipObj, zipWith };
|
|
657
|
+
export { F, T, __, add, all, allPass, always, any, anyPass, append, assoc, assocPath, bind, both, callFrom, callWith, clone, cloneShallow, complement, compose, composeAsync, concat, cond, curry, curry2, curry3, debounce, diff, divide, echo, empty, eq, equals, explore, filter, find, findIndex, flat, flatShallow, flatTo, flip, forEach, forEachAsync, forEachSerial, freeze, freezeShallow, fromPairs, genBy, getTmpl, gt, gte, head, identity, ifElse, includes, indexOf, intersection, isEmpty, isNil, join, keys, last, length, lt, lte, map, mapKeys, mapObj, memoize, mergeDeep, mergeDeepAdd, mergeDeepX, mergeShallow, mirror, multiply, noop, not, notf, nth, omit, once, overProp, path, pathEq, pathExists, pathOr, pathsEq, pick, pickBy, prepend, prop, propEq, propsEq, push, qappend, qassoc, qassocPath, qempty, qfilter, qfreeze, qfreezeShallow, qmap, qmapKeys, qmapObj, qmergeDeep, qmergeDeepAdd, qmergeDeepX, qmergeShallow, qomit, qoverProp, qprepend, qpush, qreduce, qreverse, qsort, qstartsWith, qstartsWithWith, range, reduce, reflect, replace, reverse, sizeof, slice, some, sort, split, startsWith, subtract, symbol, tail, take, tap, test, throttle, toLower, toPairs, toUpper, trim, type, typeIs, uncurry, uniq, uniqWith, values, wait, waitAll, waitTap, weakEq, when, zip, zipObj, zipWith };
|
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.6",
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@rollup/plugin-commonjs": "^28.0.6",
|
|
47
47
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
package/src/quick.ts
CHANGED
|
@@ -132,4 +132,7 @@ export const qstartsWith = qstartsWithWith(eq)
|
|
|
132
132
|
* @returns data with prop over pipe. */
|
|
133
133
|
export const qoverProp = curry3(
|
|
134
134
|
(prop: string, pipe: AnyFunc, data: any) => qassoc(prop, pipe(data[prop]), data)
|
|
135
|
-
)
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
// Aliases.
|
|
138
|
+
export const qpush = qappend
|
package/src/safe.ts
CHANGED
|
@@ -324,7 +324,7 @@ export const mapObj = curry2(
|
|
|
324
324
|
(pipe: (s: any, i?: string, list?: any[]) => any, o: AnyObject) => qmapObj(pipe, {...o})
|
|
325
325
|
)
|
|
326
326
|
export const join = curry2((delimeter: string, arr: string[]) => arr.join(delimeter))
|
|
327
|
-
export const forEach = curry2((pipe: (s:
|
|
327
|
+
export const forEach = curry2(<T extends any>(pipe: (s: T, i: number, arr: T[]) => any, arr: any[]) => arr.forEach(pipe))
|
|
328
328
|
export const both = curry3((cond1: Cond, cond2: Cond, s: any) => cond2(s) && cond1(s))
|
|
329
329
|
export const isEmpty = (s: any) => {
|
|
330
330
|
switch(type(s)) {
|