pepka 0.14.0-beta8 → 0.14.0
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 +69 -154
- package/dist/bundle.dev.js +625 -0
- package/dist/bundle.mjs +1 -1
- package/dts-fix.js +5 -8
- package/package.json +80 -78
- package/src/curry.ts +8 -9
- package/src/safe.ts +38 -11
- package/src/uncurry.ts +1 -1
package/dist/bundle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=Symbol("Placeholder"),r=r=>{let t=0;for(const s of r)s!==e&&t++;return t},t=(r,t)=>{const s=r.length,o=r.slice(),p=t.length;let n=p,c=0;for(;n&&c<s;c++)o[c]===e&&(o[c]=t[p-n],n--);for(c=s;n;c++,n--)o[c]=t[p-n];return o},s=(e,o,p)=>{const n=e.length-o.length-r(p);if(n<1)return e(...t(o,p));{const r=(...r)=>s(e,t(o,p),r);return r.$args_left=n,r}},o=e=>(...t)=>e.length>r(t)?s(e,[],t):e(...t),p=r=>function(t){return t===e?r:r(t)};function n(r){return function(t,s){const o=t===e,n=arguments.length;if(1===n&&o)throw new Error("Senseless placeholder usage.");return arguments.length>1?o?p((e=>r(e,s))):r(t,s):e=>r(t,e)}}function c(e){return o(e)}const x=void 0,a=1/0,i=e=>typeof e,l=e=>null===e,u=e=>"number"==i(e),f=e=>Array.isArray(e),h=e=>"function"===i(e),d={u:"U",b:"B",n:"N",s:"S",f:"F"},m=e=>{const r=i(e);return"object"===r?l(e)?"Null":e.constructor.name:d[r[0]]+r.slice(1)},y=n(((e,r)=>m(r)===e)),g=n(((e,r)=>(r.push(e),r))),b=c(((e,r,t)=>(t[e]=r,t))),w=c(((e,r,t)=>t.reduce(e,r))),j=c(((e,r,t)=>{for(let s in t)switch(m(t[s])){case"Array":if(e>1&&"Array"===m(r[s]))switch(e){case 2:const o=r[s],p=t[s];for(const r in p)o[r]?j(e,o[r],p[r]):o[r]=p[r];break;case 3:r[s].push(...t[s])}else r[s]=t[s];break;case"Object":if("Object"===m(r[s])){j(e,r[s],t[s]);break}default:r[s]=t[s]}return r})),O=j(1),q=j(2),A=j(3),E=n(((e,r)=>{let t,s,o,p;for(t in e)s=e[t],[o,p]=h(s)?s(r):[s,r[t]],r[o]=p,t!==o&&delete r[t];return r})),k=n(((e,r)=>{const t=f(r);for(let s in r)e(r[s],s)||(t?r.splice(s,1):delete r[s]);return r})),S=n(((e,r)=>r.indexOf(e))),v=e=>(...r)=>r[e],P=n(((e,r)=>{const t=m(e);if(t===m(r)&&("Object"===t||"Array"==t)){if(l(e)||l(r))return e===r;if(e===r)return!0;for(const t of[e,r])for(const s in t)if(!(t===r&&s in e||t===e&&s in r&&P(e[s],r[s])))return!1;return!0}return e===r})),D=o(((e,r,t,s)=>e(s)?r(s):t(s))),
|
|
1
|
+
"use strict";const e=Symbol("Placeholder"),r=r=>{let t=0;for(const s of r)s!==e&&t++;return t},t=(r,t)=>{const s=r.length,o=r.slice(),p=t.length;let n=p,c=0;for(;n&&c<s;c++)o[c]===e&&(o[c]=t[p-n],n--);for(c=s;n;c++,n--)o[c]=t[p-n];return o},s=(e,o,p)=>{const n=e.length-o.length-r(p);if(n<1)return e(...t(o,p));{const r=(...r)=>s(e,t(o,p),r);return r.$args_left=n,r}},o=e=>(...t)=>e.length>r(t)?s(e,[],t):e(...t),p=r=>function(t){return t===e?r:r(t)};function n(r){return function(t,s){const o=t===e,n=arguments.length;if(1===n&&o)throw new Error("Senseless placeholder usage.");return arguments.length>1?o?p((e=>r(e,s))):r(t,s):e=>r(t,e)}}function c(e){return o(e)}const x=void 0,a=1/0,i=e=>typeof e,l=e=>null===e,u=e=>"number"==i(e),f=e=>Array.isArray(e),h=e=>"function"===i(e),d={u:"U",b:"B",n:"N",s:"S",f:"F"},m=e=>{const r=i(e);return"object"===r?l(e)?"Null":e.constructor.name:d[r[0]]+r.slice(1)},y=n(((e,r)=>m(r)===e)),g=n(((e,r)=>(r.push(e),r))),b=c(((e,r,t)=>(t[e]=r,t))),w=c(((e,r,t)=>t.reduce(e,r))),j=c(((e,r,t)=>{for(let s in t)switch(m(t[s])){case"Array":if(e>1&&"Array"===m(r[s]))switch(e){case 2:const o=r[s],p=t[s];for(const r in p)o[r]?j(e,o[r],p[r]):o[r]=p[r];break;case 3:r[s].push(...t[s])}else r[s]=t[s];break;case"Object":if("Object"===m(r[s])){j(e,r[s],t[s]);break}default:r[s]=t[s]}return r})),O=j(1),q=j(2),A=j(3),E=n(((e,r)=>{let t,s,o,p;for(t in e)s=e[t],[o,p]=h(s)?s(r):[s,r[t]],r[o]=p,t!==o&&delete r[t];return r})),k=n(((e,r)=>{const t=f(r);for(let s in r)e(r[s],s)||(t?r.splice(s,1):delete r[s]);return r})),S=n(((e,r)=>r.indexOf(e))),v=e=>(...r)=>r[e],P=n(((e,r)=>{const t=m(e);if(t===m(r)&&("Object"===t||"Array"==t)){if(l(e)||l(r))return e===r;if(e===r)return!0;for(const t of[e,r])for(const s in t)if(!(t===r&&s in e||t===e&&s in r&&P(e[s],r[s])))return!1;return!0}return e===r})),D=o(((e,r,t,s)=>e(s)?r(s):t(s))),z=c(((e,r,t)=>D(e,r,J,t))),N=(...r)=>(...t)=>{let s,o=!0;for(let p=G(r)-1;p>-1;p--)o?(o=!1,s=r[p](...t)):s=s===e?r[p]():r[p](s);return s},B=n(((e,r)=>e.bind(r))),_=n(((e,r)=>r[e])),C=n(((e,r)=>{if((e=>"string"===i(e))(r))return r.includes(e);for(const t of r)if(P(t,e))return!0;return!1})),I=c(((e,r,t)=>t.slice(e,u(r)?r:a))),T=e=>n(((r,t)=>e(t,r))),U=_(0),$=I(1,a),F=n(((e,r)=>e+r)),K=n(((e,r)=>r-e)),L=n(((e,r)=>e*r)),X=n(((e,r)=>e/r)),W=e=>l(e)||(e=>e===x)(e),G=e=>e.length,H=e=>()=>e,J=e=>e,M=e=>!e,Q=e=>(...r)=>{const t=e(...r);return h(t)&&t.$args_left?Q(t):M(t)},R=e=>Object.entries(e),V=n(((e,r)=>e.test(r))),Y=n(((e,r)=>(e(r),r))),Z=n(((e,r)=>[...r,e])),ee=n(((e,r)=>r.split(e))),re=H(!0),te=H(!1),se=n(((e,r)=>pe(F(e),r-e))),oe=n(((e,r)=>e.filter(T(C)(r)))),pe=n(((e,r)=>[...Array(r)].map(((r,t)=>e(t))))),ne=n(((e,r)=>e>r)),ce=n(((e,r)=>e<r)),xe=n(((e,r)=>r>=e)),ae=n(((e,r)=>r<=e)),ie=n(((e,r)=>r.sort(e))),le=n(((e,r)=>r.find(e))),ue=n(((e,r)=>r.findIndex(e))),fe=n(((e,r)=>ue(P(e),r))),he=n(((e,r)=>{for(const[t,s]of e)if(t(r))return s(r)})),de=c(((e,r,t)=>({...t,[e]:r}))),me=c(((e,r,t)=>N((s=>{return de(s,G(e)<2?r:me(I(1,a,e),r,(o=t[s],l(o)||"object"!==i(o)?{}:t[s])),t);var o}),U)(e))),ye=n(((e,r)=>r.every(e))),ge=n(((e,r)=>r.some(e))),be=n(((e,r)=>e.every((e=>e(r))))),we=n(((e,r)=>e.some((e=>e(r))))),je=n(((e,r)=>r[e])),Oe=c(((e,r,t)=>P(t[e],r))),qe=c(((e,r,t)=>P(r[e],t[e]))),Ae=c(((e,r,t)=>D(G,(()=>W(t)?e:N(D(W,H(e),(t=>Ae(e,I(1,a,r),t))),T(je)(t),U)(r)),H(t),r))),Ee=Ae(x),ke=c(((e,r,t)=>P(Ee(e,t),r))),Se=c(((e,r,t)=>P(Ee(e,r),Ee(e,t)))),ve=/^(.*?)(8|16|32|64)(Clamped)?Array$/,Pe=(e,r=!1)=>{const t=m(e);switch(t){case"Null":case"String":case"Number":case"Boolean":case"Symbol":return e;case"Array":return r?[...e]:Te(N(Pe,v(0)),e);case"Object":if(r)return{...e};const s={};for(let r in e)s[r]=Pe(e[r]);return s;default:return ve.test(t)?e.constructor.from(e):e}},De=c(((e,r,t)=>w(e,Pe(r),t))),ze=n(((e,r)=>Ke(e,r))),Ne=n(((e,r)=>{const t={};for(const s of e)s in r&&(t[s]=r[s]);return t})),Be=n(((e,r)=>Ke(((r,t)=>!C(t,e)),r))),_e=e=>De(((e,r)=>de(...r,e)),{},e),Ce=n(((e,r)=>e.concat(r))),Ie=n(((e,r)=>r.join(e))),Te=n(((e,r)=>r.map(e))),Ue=n(((e,r)=>r.forEach(e))),$e=c(((e,r,t)=>r(t)&&e(t))),Fe=c(((e,r,t)=>t.replace(e,r))),Ke=n(((e,r)=>f(r)?r.filter(e):N(_e,Ke((([r,t])=>e(t,r))),R)(r))),Le=n(((e,r)=>Object.assign({},e,r))),Xe=n(((e,r)=>O(Pe(e),Pe(r)))),We=n(((e,r)=>q(Pe(e),Pe(r)))),Ge=n(((e,r)=>A(Pe(e),Pe(r)))),He=c(((e,r,t)=>de(e,r(t[e]),t))),Je=n(((e,r)=>E(e,Object.assign({},r)))),Me=n(((e,r)=>Te(((e,t)=>[e,r[t]]),e))),Qe=n(((e,r)=>De(((e,t,s)=>de(t,r[s],e)),{},e))),Re=c(((e,r,t)=>Te(((r,s)=>e(r,t[s])),r))),Ve=(()=>{const e=async(r,t,s)=>{s<t.length&&(await r(t[s]),await e(r,t,++s))};return n(((r,t)=>e(r,t,0)))})(),Ye=n((async(e,r)=>(await e(r),r))),Ze=n(((e,r)=>Promise.all(r.map(e)))),er=(()=>{const e=async(r,t,s)=>~s?await e(r,await r[s](t),--s):t;return(...r)=>t=>e(r,t,r.length-1)})(),rr=J,tr=J,sr=J;exports.F=te,exports.T=re,exports.__=e,exports.add=F,exports.all=ye,exports.allPass=be,exports.always=H,exports.any=ge,exports.anyPass=we,exports.append=Z,exports.assoc=de,exports.assocPath=me,exports.bind=B,exports.both=$e,exports.clone=Pe,exports.cloneShallow=e=>Pe(e,!0),exports.complement=Q,exports.compose=N,exports.composeAsync=er,exports.concat=Ce,exports.cond=he,exports.curry=o,exports.curry2=n,exports.curry3=c,exports.divide=X,exports.echo=sr,exports.empty=e=>{switch(m(e)){case"String":return"";case"Object":return{};case"Array":return[];default:return x}},exports.equals=P,exports.explore=(e,r="log")=>Y((t=>console[r](e,t))),exports.filter=Ke,exports.find=le,exports.findIndex=ue,exports.flip=T,exports.forEach=Ue,exports.forEachAsync=Ze,exports.forEachSerial=Ve,exports.fromPairs=_e,exports.genBy=pe,exports.getTmpl=e=>{const r=[],t=[],s=e.length;let o,p,n,c=0,x=0,a=!1,i=U(e),l=!1;for(c=0;c<s;c++)switch(o=e[c],o){case"{":if(!i){a=!0,x=c;break}case"}":if(!i){a=!1,r.push(""),t.push(e.slice(x+1,c));break}default:n=e[c+1],l="\\"===o,a||l&&("{"===n||"}"===n)||(p=r.length-1,p<0&&(r.push(""),p++),r[p]+=o),i=l}return e=>{const s=[],o=r.length-1;for(const p in r)c=+p,s.push(r[c]),c!==o&&s.push(Ee(t[c].split("."),e));return s.join("")}},exports.gt=ne,exports.gte=xe,exports.head=U,exports.identity=J,exports.ifElse=D,exports.includes=C,exports.indexOf=fe,exports.intersection=oe,exports.isEmpty=e=>{switch(m(e)){case"String":case"Array":return 0==G(e);case"Object":for(const r in e)return!1;return!0;default:return null}},exports.isNil=W,exports.join=Ie,exports.keys=e=>Object.keys(e),exports.last=e=>e[G(e)-1],exports.length=G,exports.lt=ce,exports.lte=ae,exports.map=Te,exports.mapKeys=Je,exports.memoize=e=>{let r,t=!1;return()=>t?r:(t=!0,r=e())},exports.mergeDeep=Xe,exports.mergeDeepAdd=Ge,exports.mergeDeepX=We,exports.mergeShallow=Le,exports.mirror=rr,exports.multiply=L,exports.not=M,exports.nth=_,exports.omit=Be,exports.once=e=>{let r,t=!1;return(...s)=>t?r:(t=!0,r=e(...s))},exports.overProp=He,exports.path=Ee,exports.pathEq=ke,exports.pathOr=Ae,exports.pathsEq=Se,exports.pick=Ne,exports.pickBy=ze,exports.prop=je,exports.propEq=Oe,exports.propsEq=qe,exports.qappend=g,exports.qassoc=b,exports.qfilter=k,exports.qindexOf=S,exports.qmapKeys=E,exports.qmergeDeep=O,exports.qmergeDeepAdd=A,exports.qmergeDeepX=q,exports.qreduce=w,exports.range=se,exports.reduce=De,exports.reflect=tr,exports.replace=Fe,exports.reverse=e=>N((r=>De(((t,s,o)=>g(e[r-o],t)),[],e)),F(-1),G)(e),exports.sizeof=e=>{if("Object"===m(e)){let r=0;for(let t in e)r++;return r}return G(e)},exports.slice=I,exports.sort=ie,exports.split=ee,exports.subtract=K,exports.tail=$,exports.take=v,exports.tap=Y,exports.test=V,exports.toLower=e=>e.toLowerCase(),exports.toPairs=R,exports.toUpper=e=>e.toUpperCase(),exports.trim=e=>e.trim(),exports.type=m,exports.typeIs=y,exports.uncurry=e=>(...r)=>w(((e,r)=>e?e(r):e),e,r),exports.uniq=e=>w(((e,r)=>C(r,e)?e:g(r,e)),[],e),exports.values=e=>Object.values(e),exports.waitAll=e=>Promise.all(e),exports.waitTap=Ye,exports.when=z,exports.zip=Me,exports.zipObj=Qe,exports.zipWith=Re;
|
package/dist/bundle.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {F as FT} from 'ts-toolbelt'
|
|
2
1
|
export { __ }
|
|
3
2
|
|
|
4
3
|
// Generated by dts-bundle-generator v7.1.0
|
|
@@ -9,11 +8,10 @@ export interface AnyObject {
|
|
|
9
8
|
}
|
|
10
9
|
export type AnyArgs = any[];
|
|
11
10
|
export type Curried<Args extends AnyArgs = AnyArgs, ReturnT = any> = (arg: Args[number]) => Curried<Args> | ReturnT;
|
|
12
|
-
export type Reducer<T = any> = (accum: T, cur: any, index: number) => T;
|
|
13
11
|
export type AnyFunc<ReturnT = any, Args extends AnyArgs = AnyArgs> = (...args: Args) => ReturnT;
|
|
14
12
|
export type Placeholder = symbol;
|
|
15
13
|
declare const __: Placeholder;
|
|
16
|
-
export declare const curry:
|
|
14
|
+
export declare const curry: (fn: AnyFunc) => (...args: AnyArgs) => any;
|
|
17
15
|
export type Func2 = (a: any, b: any) => any;
|
|
18
16
|
export declare function curry2<Func extends Func2>(fn: Func): {
|
|
19
17
|
(a: Placeholder, b: Parameters<Func>[1]): (a: Parameters<Func>[0]) => ReturnType<Func>;
|
|
@@ -22,7 +20,7 @@ export declare function curry2<Func extends Func2>(fn: Func): {
|
|
|
22
20
|
(a: Parameters<Func>[0], b: Parameters<Func>[1]): ReturnType<Func>;
|
|
23
21
|
};
|
|
24
22
|
export type Func3 = (a: any, b: any, c: any) => any;
|
|
25
|
-
export declare function curry3<Func extends Func3>(fn: Func):
|
|
23
|
+
export declare function curry3<Func extends Func3>(fn: Func): (...args: AnyArgs) => any;
|
|
26
24
|
export declare const uncurry: <Args extends any[] = any[], ReturnT = any>(fn: Curried<Args, any>) => AnyFunc;
|
|
27
25
|
export declare const toLower: (s: string) => string;
|
|
28
26
|
export declare const toUpper: (s: string) => string;
|
|
@@ -40,8 +38,8 @@ export declare const equals: {
|
|
|
40
38
|
(a: any): (b: any) => boolean;
|
|
41
39
|
(a: any, b: any): boolean;
|
|
42
40
|
};
|
|
43
|
-
export declare const ifElse:
|
|
44
|
-
export declare const when:
|
|
41
|
+
export declare const ifElse: (...args: AnyArgs) => any;
|
|
42
|
+
export declare const when: (...args: AnyArgs) => any;
|
|
45
43
|
export type Composed<TIn extends any[], TOut> = (...xs: TIn) => TOut;
|
|
46
44
|
export declare const compose: <TIn extends any[] = any[], TOut = any>(...fns: AnyFunc[]) => Composed<TIn, TOut>;
|
|
47
45
|
export declare const bind: {
|
|
@@ -62,7 +60,7 @@ export declare const includes: {
|
|
|
62
60
|
(a: unknown): (b: unknown[]) => boolean;
|
|
63
61
|
(a: unknown, b: unknown[]): boolean;
|
|
64
62
|
};
|
|
65
|
-
export declare const slice:
|
|
63
|
+
export declare const slice: (...args: AnyArgs) => any;
|
|
66
64
|
export declare const flip: <T extends AnyFunc<any, AnyArgs>>(fn: T) => {
|
|
67
65
|
(a: symbol, b: Parameters<T>[0]): (a: Parameters<T>[1]) => any;
|
|
68
66
|
(a: Parameters<T>[1], b: symbol): (b: Parameters<T>[0]) => any;
|
|
@@ -70,7 +68,7 @@ export declare const flip: <T extends AnyFunc<any, AnyArgs>>(fn: T) => {
|
|
|
70
68
|
(a: Parameters<T>[1], b: Parameters<T>[0]): any;
|
|
71
69
|
};
|
|
72
70
|
export declare const head: (b: string | unknown[]) => unknown;
|
|
73
|
-
export declare const tail:
|
|
71
|
+
export declare const tail: any;
|
|
74
72
|
export declare const add: {
|
|
75
73
|
(a: symbol, b: number): (a: number) => number;
|
|
76
74
|
(a: number, b: symbol): (b: number) => number;
|
|
@@ -224,9 +222,12 @@ export declare const cond: {
|
|
|
224
222
|
Function
|
|
225
223
|
][], b: any): any;
|
|
226
224
|
};
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
225
|
+
/** Assigns a prop to an object.
|
|
226
|
+
* @param prop string
|
|
227
|
+
* @param value any
|
|
228
|
+
* @param object AnyObject
|
|
229
|
+
*/
|
|
230
|
+
export declare const assoc: (...args: AnyArgs) => any;
|
|
230
231
|
export declare const assocPath: any;
|
|
231
232
|
export declare const all: {
|
|
232
233
|
(a: symbol, b: any[]): (a: Cond) => boolean;
|
|
@@ -258,18 +259,20 @@ export declare const prop: {
|
|
|
258
259
|
(a: string): (b: AnyObject) => any;
|
|
259
260
|
(a: string, b: AnyObject): any;
|
|
260
261
|
};
|
|
261
|
-
export declare const propEq:
|
|
262
|
-
export declare const propsEq:
|
|
263
|
-
export declare const pathOr:
|
|
264
|
-
export declare const path:
|
|
265
|
-
export declare const pathEq:
|
|
266
|
-
export declare const pathsEq:
|
|
262
|
+
export declare const propEq: (...args: AnyArgs) => any;
|
|
263
|
+
export declare const propsEq: (...args: AnyArgs) => any;
|
|
264
|
+
export declare const pathOr: (...args: AnyArgs) => any;
|
|
265
|
+
export declare const path: any;
|
|
266
|
+
export declare const pathEq: (...args: AnyArgs) => any;
|
|
267
|
+
export declare const pathsEq: (...args: AnyArgs) => any;
|
|
267
268
|
export declare const clone: (s: any, shallow?: boolean) => any;
|
|
268
269
|
export declare const cloneShallow: (s: any) => any;
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
/** types T1, T2
|
|
271
|
+
* @param reducer (accum: T1, current: T2, index: number) => newAccum: T1
|
|
272
|
+
* @param accum T1
|
|
273
|
+
* @param array T2[]
|
|
274
|
+
*/
|
|
275
|
+
export declare const reduce: (...args: AnyArgs) => any;
|
|
273
276
|
export declare const pickBy: {
|
|
274
277
|
(a: symbol, b: AnyObject): (a: Cond) => any;
|
|
275
278
|
(a: Cond, b: symbol): (b: AnyObject) => any;
|
|
@@ -291,10 +294,7 @@ export declare const omit: {
|
|
|
291
294
|
export declare const fromPairs: (pairs: [
|
|
292
295
|
string,
|
|
293
296
|
any
|
|
294
|
-
][]) =>
|
|
295
|
-
] | [
|
|
296
|
-
accum: any
|
|
297
|
-
]) => any>>;
|
|
297
|
+
][]) => any;
|
|
298
298
|
export declare const concat: {
|
|
299
299
|
(a: symbol, b: string | any[]): (a: string | any[]) => string | any[];
|
|
300
300
|
(a: string | any[], b: symbol): (b: string | any[]) => string | 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;
|
|
@@ -319,10 +319,10 @@ export declare const forEach: {
|
|
|
319
319
|
(a: (s: any) => any): (b: any[]) => void;
|
|
320
320
|
(a: (s: any) => any, b: any[]): void;
|
|
321
321
|
};
|
|
322
|
-
export declare const both:
|
|
322
|
+
export declare const both: (...args: AnyArgs) => any;
|
|
323
323
|
export declare const isEmpty: (s: any) => boolean | null;
|
|
324
324
|
export declare const empty: (s: any) => {} | undefined;
|
|
325
|
-
export declare const replace:
|
|
325
|
+
export declare const replace: (...args: AnyArgs) => any;
|
|
326
326
|
export declare const filter: any;
|
|
327
327
|
export declare const memoize: (fn: Function) => () => any;
|
|
328
328
|
export declare const mergeShallow: {
|
|
@@ -332,128 +332,24 @@ export declare const mergeShallow: {
|
|
|
332
332
|
(a: AnyObject, b: AnyObject): AnyObject;
|
|
333
333
|
};
|
|
334
334
|
export declare const mergeDeep: {
|
|
335
|
-
(a: symbol, b: AnyObject): (a: AnyObject) =>
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
] | [
|
|
340
|
-
o2: AnyObject
|
|
341
|
-
] | [
|
|
342
|
-
o1: AnyObject
|
|
343
|
-
]) => any>;
|
|
344
|
-
(a: AnyObject, b: symbol): (b: AnyObject) => FT.Curry<(...p: [
|
|
345
|
-
] | [
|
|
346
|
-
o1: AnyObject,
|
|
347
|
-
o2: AnyObject
|
|
348
|
-
] | [
|
|
349
|
-
o2: AnyObject
|
|
350
|
-
] | [
|
|
351
|
-
o1: AnyObject
|
|
352
|
-
]) => any>;
|
|
353
|
-
(a: AnyObject): (b: AnyObject) => FT.Curry<(...p: [
|
|
354
|
-
] | [
|
|
355
|
-
o1: AnyObject,
|
|
356
|
-
o2: AnyObject
|
|
357
|
-
] | [
|
|
358
|
-
o2: AnyObject
|
|
359
|
-
] | [
|
|
360
|
-
o1: AnyObject
|
|
361
|
-
]) => any>;
|
|
362
|
-
(a: AnyObject, b: AnyObject): FT.Curry<(...p: [
|
|
363
|
-
] | [
|
|
364
|
-
o1: AnyObject,
|
|
365
|
-
o2: AnyObject
|
|
366
|
-
] | [
|
|
367
|
-
o2: AnyObject
|
|
368
|
-
] | [
|
|
369
|
-
o1: AnyObject
|
|
370
|
-
]) => any>;
|
|
335
|
+
(a: symbol, b: AnyObject): (a: AnyObject) => AnyObject;
|
|
336
|
+
(a: AnyObject, b: symbol): (b: AnyObject) => AnyObject;
|
|
337
|
+
(a: AnyObject): (b: AnyObject) => AnyObject;
|
|
338
|
+
(a: AnyObject, b: AnyObject): AnyObject;
|
|
371
339
|
};
|
|
372
340
|
export declare const mergeDeepX: {
|
|
373
|
-
(a: symbol, b: AnyObject): (a: AnyObject) =>
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
] | [
|
|
378
|
-
o2: AnyObject
|
|
379
|
-
] | [
|
|
380
|
-
o1: AnyObject
|
|
381
|
-
]) => any>;
|
|
382
|
-
(a: AnyObject, b: symbol): (b: AnyObject) => FT.Curry<(...p: [
|
|
383
|
-
] | [
|
|
384
|
-
o1: AnyObject,
|
|
385
|
-
o2: AnyObject
|
|
386
|
-
] | [
|
|
387
|
-
o2: AnyObject
|
|
388
|
-
] | [
|
|
389
|
-
o1: AnyObject
|
|
390
|
-
]) => any>;
|
|
391
|
-
(a: AnyObject): (b: AnyObject) => FT.Curry<(...p: [
|
|
392
|
-
] | [
|
|
393
|
-
o1: AnyObject,
|
|
394
|
-
o2: AnyObject
|
|
395
|
-
] | [
|
|
396
|
-
o2: AnyObject
|
|
397
|
-
] | [
|
|
398
|
-
o1: AnyObject
|
|
399
|
-
]) => any>;
|
|
400
|
-
(a: AnyObject, b: AnyObject): FT.Curry<(...p: [
|
|
401
|
-
] | [
|
|
402
|
-
o1: AnyObject,
|
|
403
|
-
o2: AnyObject
|
|
404
|
-
] | [
|
|
405
|
-
o2: AnyObject
|
|
406
|
-
] | [
|
|
407
|
-
o1: AnyObject
|
|
408
|
-
]) => any>;
|
|
341
|
+
(a: symbol, b: AnyObject): (a: AnyObject) => AnyObject;
|
|
342
|
+
(a: AnyObject, b: symbol): (b: AnyObject) => AnyObject;
|
|
343
|
+
(a: AnyObject): (b: AnyObject) => AnyObject;
|
|
344
|
+
(a: AnyObject, b: AnyObject): AnyObject;
|
|
409
345
|
};
|
|
410
346
|
export declare const mergeDeepAdd: {
|
|
411
|
-
(a: symbol, b: AnyObject): (a: AnyObject) =>
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
] | [
|
|
418
|
-
o1: AnyObject
|
|
419
|
-
]) => any>;
|
|
420
|
-
(a: AnyObject, b: symbol): (b: AnyObject) => FT.Curry<(...p: [
|
|
421
|
-
] | [
|
|
422
|
-
o1: AnyObject,
|
|
423
|
-
o2: AnyObject
|
|
424
|
-
] | [
|
|
425
|
-
o2: AnyObject
|
|
426
|
-
] | [
|
|
427
|
-
o1: AnyObject
|
|
428
|
-
]) => any>;
|
|
429
|
-
(a: AnyObject): (b: AnyObject) => FT.Curry<(...p: [
|
|
430
|
-
] | [
|
|
431
|
-
o1: AnyObject,
|
|
432
|
-
o2: AnyObject
|
|
433
|
-
] | [
|
|
434
|
-
o2: AnyObject
|
|
435
|
-
] | [
|
|
436
|
-
o1: AnyObject
|
|
437
|
-
]) => any>;
|
|
438
|
-
(a: AnyObject, b: AnyObject): FT.Curry<(...p: [
|
|
439
|
-
] | [
|
|
440
|
-
o1: AnyObject,
|
|
441
|
-
o2: AnyObject
|
|
442
|
-
] | [
|
|
443
|
-
o2: AnyObject
|
|
444
|
-
] | [
|
|
445
|
-
o1: AnyObject
|
|
446
|
-
]) => any>;
|
|
447
|
-
};
|
|
448
|
-
export declare const overProp: FT.Curry<(prop: string, pipe: AnyFunc, data: any) => FT.Curry<(...p: [
|
|
449
|
-
] | [
|
|
450
|
-
v: any,
|
|
451
|
-
obj: AnyObject
|
|
452
|
-
] | [
|
|
453
|
-
obj: AnyObject
|
|
454
|
-
] | [
|
|
455
|
-
v: any
|
|
456
|
-
]) => any>>;
|
|
347
|
+
(a: symbol, b: AnyObject): (a: AnyObject) => AnyObject;
|
|
348
|
+
(a: AnyObject, b: symbol): (b: AnyObject) => AnyObject;
|
|
349
|
+
(a: AnyObject): (b: AnyObject) => AnyObject;
|
|
350
|
+
(a: AnyObject, b: AnyObject): AnyObject;
|
|
351
|
+
};
|
|
352
|
+
export declare const overProp: (...args: AnyArgs) => any;
|
|
457
353
|
/** mapKeys({ a: 'b' }, { a: 44 }) -> { b: 44 } */
|
|
458
354
|
export declare const mapKeys: {
|
|
459
355
|
(a: symbol, b: AnyObject): (a: {
|
|
@@ -469,6 +365,25 @@ export declare const mapKeys: {
|
|
|
469
365
|
[oldKey: string]: string;
|
|
470
366
|
}, b: AnyObject): AnyObject;
|
|
471
367
|
};
|
|
368
|
+
export declare const zip: {
|
|
369
|
+
(a: symbol, b: unknown[]): (a: unknown[]) => any[];
|
|
370
|
+
(a: unknown[], b: symbol): (b: unknown[]) => any[];
|
|
371
|
+
(a: unknown[]): (b: unknown[]) => any[];
|
|
372
|
+
(a: unknown[], b: unknown[]): any[];
|
|
373
|
+
};
|
|
374
|
+
export declare const zipObj: {
|
|
375
|
+
(a: symbol, b: unknown[]): (a: unknown[]) => any;
|
|
376
|
+
(a: unknown[], b: symbol): (b: unknown[]) => any;
|
|
377
|
+
(a: unknown[]): (b: unknown[]) => any;
|
|
378
|
+
(a: unknown[], b: unknown[]): any;
|
|
379
|
+
};
|
|
380
|
+
/** zips through a pipe. Types T1, T2, T3.
|
|
381
|
+
* @returns T3[]
|
|
382
|
+
* @param pipe (T1, T2) => T3
|
|
383
|
+
* @param a T1[]
|
|
384
|
+
* @param b T2[]
|
|
385
|
+
*/
|
|
386
|
+
export declare const zipWith: (...args: AnyArgs) => any;
|
|
472
387
|
/** One promise waits for another. */
|
|
473
388
|
export declare const forEachSerial: {
|
|
474
389
|
(a: symbol, b: any[]): (a: AnyFunc<any, AnyArgs>) => Promise<void>;
|
|
@@ -502,11 +417,11 @@ export declare const qappend: {
|
|
|
502
417
|
(a: any): (b: any[]) => any[];
|
|
503
418
|
(a: any, b: any[]): any[];
|
|
504
419
|
};
|
|
505
|
-
export declare const qassoc:
|
|
506
|
-
export declare const qreduce:
|
|
507
|
-
export declare const qmergeDeep:
|
|
508
|
-
export declare const qmergeDeepX:
|
|
509
|
-
export declare const qmergeDeepAdd:
|
|
420
|
+
export declare const qassoc: (...args: AnyArgs) => any;
|
|
421
|
+
export declare const qreduce: (...args: AnyArgs) => any;
|
|
422
|
+
export declare const qmergeDeep: any;
|
|
423
|
+
export declare const qmergeDeepX: any;
|
|
424
|
+
export declare const qmergeDeepAdd: any;
|
|
510
425
|
/** qmapKeys({ a: 'b' }, { a: 44 }) -> { b: 44 } */
|
|
511
426
|
export declare const qmapKeys: {
|
|
512
427
|
(a: symbol, b: AnyObject): (a: {
|