Socket
Socket
Sign inDemoInstall

rambda

Package Overview
Dependencies
Maintainers
1
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rambda - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

__tests__/partialCurry.js

27

__tests__/curry.js

@@ -5,25 +5,8 @@ const R = require("../rambda")

it("", () => {
const fn = ({ a, b, c }) => a * b + c
const curried = R.curry(fn, { a : 2 })
expect(R.type(curried)).toEqual("Function")
expect(curried({
b : 3,
c : 10,
})).toEqual(16)
const addFourNumbers = (a, b, c, d) => a + b + c + d
const curriedAddFourNumbers = R.curry(addFourNumbers)
const f = curriedAddFourNumbers(1, 2)
const g = f(3)
expect(g(4)).toEqual(10)
})
it("async", async () => {
const delay = ms => new Promise(resolve => {
setTimeout(() => {
resolve(ms * 2)
}, ms)
})
const fn = async ({ a, b }) => {
const result = await delay(a)
return result + b
}
const curried = R.curry(fn, { a : 200 })
expect(R.type(curried)).toEqual("Function")
expect(await curried({ b : 3 })).toEqual(403)
})
})

@@ -1,1 +0,1 @@

module.exports=function(d){var e={};function __webpack_require__(f){if(e[f]){return e[f].exports;}var g=e[f]={i:f,l:!1,exports:{}};d[f].call(g.exports,g,g.exports,__webpack_require__);g.l=!0;return g.exports;}__webpack_require__.m=d;__webpack_require__.c=e;__webpack_require__.i=function(h){return h;};__webpack_require__.d=function(j,k,l){if(!__webpack_require__.o(j,k)){Object.defineProperty(j,k,{configurable:!1,enumerable:!0,get:l});}};__webpack_require__.n=function(m){var n=m&&m.__esModule?function getDefault(){return m['default'];}:function getModuleExports(){return m;};__webpack_require__.d(n,'a',n);return n;};__webpack_require__.o=function(o,p){return Object.prototype.hasOwnProperty.call(o,p);};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=52);}([function(q,r){function type(a){if(a===null){return"Null";}else if(Array.isArray(a)){return"Array";}else if(typeof a==="boolean"){return"Boolean";}else if(typeof a==="number"){return"Number";}else if(typeof a==="string"){return"String";}else if(a===void 0){return"Undefined";}else if(a instanceof RegExp){return"RegExp";}const s=a.toString();if(s.startsWith("async")){return"Async";}else if(s.includes("function")||s.includes("=>")){return"Function";}return"Object";}q.exports=type;},function(t,u){function baseSlice(v,w,x){let y=-1,z=v.length;x=x>z?z:x;if(x<0){x+=z;}z=w>x?0:x-w>>>0;w>>>=0;const A=Array(z);while(++y<z){A[y]=v[y+w];}return A;}t.exports=baseSlice;},function(B,C,D){const E=D(4);function contains(F,G){if(G===void 0){return H=>contains(F,H);}let I=-1,J=!1;while(++I<G.length&&!J){if(E(G[I],F)){J=!0;}}return J;}B.exports=contains;},function(K,L){function drop(M,a){if(a===void 0){return N=>drop(M,N);}return a.slice(M);}K.exports=drop;},function(O,P,Q){const R=Q(0);function equals(a,b){if(b===void 0){return S=>equals(a,S);}else if(a===b){return a!==0||1/a===1/b;}const T=R(a);if(T!==R(b)){return!1;}if(T==="Array"){const U=Array.from(a),V=Array.from(b);return U.sort().toString()===V.sort().toString();}if(T==="Object"){const W=Object.keys(a);if(W.length===Object.keys(b).length){if(W.length===0){return!0;}let X=!0;W.map(Y=>{if(X){const Z=R(a[Y]),a1=R(b[Y]);if(Z===a1){if(Z==="Object"){if(Object.keys(a[Y]).length===Object.keys(b[Y]).length){if(Object.keys(a[Y]).length!==0){if(!equals(a[Y],b[Y])){X=!1;}}}else{X=!1;}}else if(!equals(a[Y],b[Y])){X=!1;}}else{X=!1;}}});return X;}}return!1;}O.exports=equals;},function(b1,c1){function map(fn,e1){if(e1===void 0){return f1=>map(fn,f1);}let g1=-1;const h1=e1.length,i1=Array(h1);while(++g1<h1){i1[g1]=fn(e1[g1]);}return i1;}b1.exports=map;},function(j1,k1){function merge(l1,m1){if(m1===void 0){return n1=>merge(l1,n1);}return Object.assign({},l1,m1);}j1.exports=merge;},function(o1,p1){function add(a,b){if(b===void 0){return c=>add(a,c);}return a+b;}o1.exports=add;},function(q1,r1){function adjust(fn,t1,u1){if(t1===void 0){return(v1,w1)=>adjust(fn,v1,w1);}else if(u1===void 0){return x1=>adjust(fn,t1,x1);}const y1=u1.concat();return y1.map((z1,A1)=>{if(A1===t1){return fn(u1[t1]);}return z1;});}q1.exports=adjust;},function(B1,C1){function any(fn,E1){if(E1===void 0){return F1=>any(fn,F1);}let G1=0;while(G1<E1.length){if(fn(E1[G1])){return!0;}G1++;}return!1;}B1.exports=any;},function(H1,I1){function append(J1,K1){if(K1===void 0){return L1=>append(J1,L1);}const M1=K1.concat();M1.push(J1);return M1;}H1.exports=append;},function(N1,O1){function isFunction(P1){return typeof P1==="function";}function compose(){const Q1=arguments;let R1=Q1.length;while(R1--){if(!isFunction(Q1[R1])){throw new TypeError();}}return function(){let S1=arguments,T1=Q1.length;while(T1--){S1=[Q1[T1].apply(this,S1)];}return S1[0];};}N1.exports=compose;},function(U1,V1,W1){const X1=W1(0),Y1=W1(6);function curry(fn,a2={}){return b2=>{if(X1(fn)==="Async"){return new Promise((c2,d2)=>{fn(Y1(b2,a2)).then(c2).catch(d2);});}return fn(Y1(b2,a2));};}U1.exports=curry;},function(e2,f2,g2){const h2=g2(0);function defaultTo(i2,j2){if(arguments.length===1){return k2=>defaultTo(i2,k2);}return j2===void 0||!(h2(j2)===h2(i2))?i2:j2;}e2.exports=defaultTo;},function(l2,m2){function dropLast(n2,a){if(a===void 0){return o2=>dropLast(n2,o2);}return a.slice(0,-n2);}l2.exports=dropLast;},function(p2,q2){function filter(fn,s2){if(s2===void 0){return t2=>filter(fn,t2);}let u2=-1,v2=0;const w2=s2.length,x2=[];while(++u2<w2){const y2=s2[u2];if(fn(y2)){x2[v2++]=y2;}}return x2;}p2.exports=filter;},function(z2,A2){function find(fn,C2){if(C2===void 0){return D2=>find(fn,D2);}return C2.find(fn);}z2.exports=find;},function(E2,F2){function findIndex(fn,H2){if(H2===void 0){return I2=>findIndex(fn,I2);}const J2=H2.length;let K2=-1;while(++K2<J2){if(fn(H2[K2])){return K2;}}return-1;}E2.exports=findIndex;},function(L2,M2){function flatten(N2,O2){O2=O2===void 0?[]:O2;for(let i=0;i<N2.length;i++){if(Array.isArray(N2[i])){flatten(N2[i],O2);}else{O2.push(N2[i]);}}return O2;}L2.exports=flatten;},function(P2,Q2){function has(R2,S2){if(S2===void 0){return T2=>has(R2,T2);}return S2[R2]!==void 0;}P2.exports=has;},function(U2,V2){function head(a){if(typeof a==="string"){return a[0]||"";}return a[0];}U2.exports=head;},function(W2,X2){function indexOf(Y2,Z2){if(Z2===void 0){return a3=>indexOf(Y2,a3);}let b3=-1;const c3=Z2.length;while(++b3<c3){if(Z2[b3]===Y2){return b3;}}return-1;}W2.exports=indexOf;},function(d3,e3,f3){const g3=f3(1);function init(a){if(typeof a==="string"){return a.slice(0,-1);}return a.length?g3(a,0,-1):[];}d3.exports=init;},function(h3,i3){function join(j3,k3){if(k3===void 0){return l3=>join(j3,l3);}return k3.join(j3);}h3.exports=join;},function(m3,n3){function last(a){if(typeof a==="string"){return a[a.length-1]||"";}return a[a.length-1];}m3.exports=last;},function(o3,p3){function length(q3){return q3.length;}o3.exports=length;},function(r3,s3){function match(t3,u3){if(u3===void 0){return v3=>match(t3,v3);}const w3=u3.match(t3);return w3===null?[]:w3;}r3.exports=match;},function(x3,y3){function omit(z3,A3){if(A3===void 0){return B3=>omit(z3,B3);}const C3={};for(key in A3){if(!z3.includes(key)){C3[key]=A3[key];}}return C3;}x3.exports=omit;},function(D3,E3){function path(F3,G3){if(G3===void 0){return H3=>path(F3,H3);}let I3=G3,J3=0;while(J3<F3.length){if(I3===null){return void 0;}I3=I3[F3[J3]];J3++;}return I3;}D3.exports=path;},function(K3,L3){function pick(M3,N3){if(N3===void 0){return O3=>pick(M3,O3);}const P3={};let Q3=0;while(Q3<M3.length){if(M3[Q3]in N3){P3[M3[Q3]]=N3[M3[Q3]];}Q3++;}return P3;}K3.exports=pick;},function(R3,S3,T3){const U3=T3(5);function pluck(V3,W3){if(W3===void 0){return X3=>pluck(V3,X3);}const Y3=[];U3(Z3=>{if(!(Z3[V3]===void 0)){Y3.push(Z3[V3]);}},W3);return Y3;}R3.exports=pluck;},function(a4,b4){function prepend(c4,d4){if(d4===void 0){return e4=>prepend(c4,e4);}const f4=d4.concat();f4.unshift(c4);return f4;}a4.exports=prepend;},function(g4,h4){function prop(i4,j4){if(j4===void 0){return k4=>prop(i4,k4);}return j4[i4];}g4.exports=prop;},function(l4,m4){function propEq(n4,o4,p4){if(o4===void 0){return(q4,r4)=>propEq(n4,q4,r4);}else if(p4===void 0){return s4=>propEq(n4,o4,s4);}return p4[n4]===o4;}l4.exports=propEq;},function(t4,u4){function range(v4,w4){const x4=[];for(let i=v4;i<w4;i++){x4.push(i);}return x4;}t4.exports=range;},function(y4,z4){function repeat(a,A4){if(A4===void 0){return B4=>repeat(a,B4);}const C4=Array(A4);return C4.fill(a);}y4.exports=repeat;},function(D4,E4){function replace(F4,G4,H4){if(G4===void 0){return(I4,J4)=>replace(F4,I4,J4);}else if(H4===void 0){return K4=>replace(F4,G4,K4);}return H4.replace(F4,G4);}D4.exports=replace;},function(L4,M4){function sort(fn,O4){if(O4===void 0){return P4=>sort(fn,P4);}const Q4=O4.concat();return Q4.sort(fn);}L4.exports=sort;},function(R4,S4){function sortBy(fn,U4){if(U4===void 0){return V4=>sortBy(fn,V4);}const W4=U4.concat();return W4.sort((a,b)=>{const X4=fn(a),Y4=fn(b);return X4<Y4?-1:X4>Y4?1:0;});}R4.exports=sortBy;},function(Z4,a5){function split(b5,c5){if(c5===void 0){return d5=>split(b5,d5);}return c5.split(b5);}Z4.exports=split;},function(e5,f5){function splitEvery(g5,a){if(a===void 0){return h5=>splitEvery(g5,h5);}g5=g5>1?g5:1;const i5=[];let j5=0;while(j5<a.length){i5.push(a.slice(j5,j5+=g5));}return i5;}e5.exports=splitEvery;},function(k5,l5){function subtract(a,b){if(b===void 0){return m5=>subtract(a,m5);}return a-b;}k5.exports=subtract;},function(n5,o5,p5){const q5=p5(3);function tail(r5){return q5(1,r5);}n5.exports=tail;},function(s5,t5,u5){const v5=u5(1);function take(w5,a){if(a===void 0){return x5=>take(w5,x5);}else if(typeof a==="string"){return a.slice(0,w5);}return v5(a,0,w5);}s5.exports=take;},function(y5,z5,A5){const B5=A5(1);function takeLast(C5,a){if(a===void 0){return D5=>takeLast(C5,D5);}const E5=a.length;C5=C5>E5?E5:C5;if(typeof a==="string"){return a.slice(E5-C5);}C5=E5-C5;return B5(a,C5,E5);}y5.exports=takeLast;},function(F5,G5){function test(H5,I5){if(I5===void 0){return J5=>test(H5,J5);}return I5.search(H5)===-1?!1:!0;}F5.exports=test;},function(K5,L5){function toLower(M5){return M5.toLowerCase();}K5.exports=toLower;},function(N5,O5){function toUpper(P5){return P5.toUpperCase();}N5.exports=toUpper;},function(Q5,R5){function trim(S5){return S5.trim();}Q5.exports=trim;},function(T5,U5,V5){const W5=V5(2);function uniq(X5){let Y5=-1;const Z5=[];while(++Y5<X5.length){const a6=X5[Y5];if(!W5(a6,Z5)){Z5.push(a6);}}return Z5;}T5.exports=uniq;},function(b6,c6){function update(d6,e6,f6){if(e6===void 0){return(g6,h6)=>update(d6,g6,h6);}else if(f6===void 0){return i6=>update(d6,e6,i6);}const j6=f6.concat();return j6.fill(e6,d6,d6+1);}b6.exports=update;},function(k6,l6){function values(m6){const n6=[];for(key in m6){n6.push(m6[key]);}return n6;}k6.exports=values;},function(o6,p6,q6){p6.add=q6(7);p6.any=q6(9);p6.adjust=q6(8);p6.append=q6(10);p6.compose=q6(11);p6.contains=q6(2);p6.curry=q6(12);p6.defaultTo=q6(13);p6.drop=q6(3);p6.dropLast=q6(14);p6.equals=q6(4);p6.filter=q6(15);p6.find=q6(16);p6.findIndex=q6(17);p6.flatten=q6(18);p6.has=q6(19);p6.head=q6(20);p6.indexOf=q6(21);p6.init=q6(22);p6.join=q6(23);p6.last=q6(24);p6.length=q6(25);p6.map=q6(5);p6.match=q6(26);p6.merge=q6(6);p6.omit=q6(27);p6.path=q6(28);p6.pick=q6(29);p6.pluck=q6(30);p6.prepend=q6(31);p6.prop=q6(32);p6.propEq=q6(33);p6.range=q6(34);p6.repeat=q6(35);p6.replace=q6(36);p6.sort=q6(37);p6.sortBy=q6(38);p6.split=q6(39);p6.splitEvery=q6(40);p6.subtract=q6(41);p6.tail=q6(42);p6.take=q6(43);p6.takeLast=q6(44);p6.test=q6(45);p6.toLower=q6(46);p6.toUpper=q6(47);p6.trim=q6(48);p6.type=q6(0);p6.uniq=q6(49);p6.update=q6(50);p6.values=q6(51);}]);
module.exports=function(d){var e={};function __webpack_require__(g){if(e[g]){return e[g].exports;}var h=e[g]={i:g,l:!1,exports:{}};d[g].call(h.exports,h,h.exports,__webpack_require__);h.l=!0;return h.exports;}__webpack_require__.m=d;__webpack_require__.c=e;__webpack_require__.i=function(j){return j;};__webpack_require__.d=function(k,l,m){if(!__webpack_require__.o(k,l)){Object.defineProperty(k,l,{configurable:!1,enumerable:!0,get:m});}};__webpack_require__.n=function(n){var q=n&&n.__esModule?function getDefault(){return n['default'];}:function getModuleExports(){return n;};__webpack_require__.d(q,'a',q);return q;};__webpack_require__.o=function(r,s){return Object.prototype.hasOwnProperty.call(r,s);};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=53);}([function(t,u){function type(a){if(a===null){return"Null";}else if(Array.isArray(a)){return"Array";}else if(typeof a==="boolean"){return"Boolean";}else if(typeof a==="number"){return"Number";}else if(typeof a==="string"){return"String";}else if(a===void 0){return"Undefined";}else if(a instanceof RegExp){return"RegExp";}const v=a.toString();if(v.startsWith("async")){return"Async";}else if(v.includes("function")||v.includes("=>")){return"Function";}return"Object";}t.exports=type;},function(w,x){function baseSlice(y,z,A){let B=-1,C=y.length;A=A>C?C:A;if(A<0){A+=C;}C=z>A?0:A-z>>>0;z>>>=0;const D=Array(C);while(++B<C){D[B]=y[B+z];}return D;}w.exports=baseSlice;},function(E,F,G){const H=G(4);function contains(I,J){if(J===void 0){return K=>contains(I,K);}let L=-1,M=!1;while(++L<J.length&&!M){if(H(J[L],I)){M=!0;}}return M;}E.exports=contains;},function(N,O){function drop(P,a){if(a===void 0){return Q=>drop(P,Q);}return a.slice(P);}N.exports=drop;},function(R,S,T){const U=T(0);function equals(a,b){if(b===void 0){return V=>equals(a,V);}else if(a===b){return a!==0||1/a===1/b;}const W=U(a);if(W!==U(b)){return!1;}if(W==="Array"){const X=Array.from(a),Y=Array.from(b);return X.sort().toString()===Y.sort().toString();}if(W==="Object"){const Z=Object.keys(a);if(Z.length===Object.keys(b).length){if(Z.length===0){return!0;}let a1=!0;Z.map(b1=>{if(a1){const c1=U(a[b1]),d1=U(b[b1]);if(c1===d1){if(c1==="Object"){if(Object.keys(a[b1]).length===Object.keys(b[b1]).length){if(Object.keys(a[b1]).length!==0){if(!equals(a[b1],b[b1])){a1=!1;}}}else{a1=!1;}}else if(!equals(a[b1],b[b1])){a1=!1;}}else{a1=!1;}}});return a1;}}return!1;}R.exports=equals;},function(e1,f1){function map(fn,h1){if(h1===void 0){return i1=>map(fn,i1);}let j1=-1;const k1=h1.length,l1=Array(k1);while(++j1<k1){l1[j1]=fn(h1[j1]);}return l1;}e1.exports=map;},function(m1,n1){function merge(o1,p1){if(p1===void 0){return q1=>merge(o1,q1);}return Object.assign({},o1,p1);}m1.exports=merge;},function(r1,s1){function add(a,b){if(b===void 0){return c=>add(a,c);}return a+b;}r1.exports=add;},function(t1,u1){function adjust(fn,w1,x1){if(w1===void 0){return(y1,z1)=>adjust(fn,y1,z1);}else if(x1===void 0){return A1=>adjust(fn,w1,A1);}const B1=x1.concat();return B1.map((C1,D1)=>{if(D1===w1){return fn(x1[w1]);}return C1;});}t1.exports=adjust;},function(E1,F1){function any(fn,H1){if(H1===void 0){return I1=>any(fn,I1);}let J1=0;while(J1<H1.length){if(fn(H1[J1])){return!0;}J1++;}return!1;}E1.exports=any;},function(K1,L1){function append(M1,N1){if(N1===void 0){return O1=>append(M1,O1);}const P1=N1.concat();P1.push(M1);return P1;}K1.exports=append;},function(Q1,R1){function isFunction(S1){return typeof S1==="function";}function compose(){const T1=arguments;let U1=T1.length;while(U1--){if(!isFunction(T1[U1])){throw new TypeError();}}return function(){let V1=arguments,W1=T1.length;while(W1--){V1=[T1[W1].apply(this,V1)];}return V1[0];};}Q1.exports=compose;},function(X1,Y1){function curry(f,a=[]){return(...p)=>(o=>o.length===f.length?f(...o):curry(f,o))([...a,...p]);}X1.exports=curry;},function(Z1,a2,b2){const c2=b2(0);function defaultTo(d2,e2){if(arguments.length===1){return f2=>defaultTo(d2,f2);}return e2===void 0||!(c2(e2)===c2(d2))?d2:e2;}Z1.exports=defaultTo;},function(g2,h2){function dropLast(i2,a){if(a===void 0){return j2=>dropLast(i2,j2);}return a.slice(0,-i2);}g2.exports=dropLast;},function(k2,l2){function filter(fn,n2){if(n2===void 0){return o2=>filter(fn,o2);}let p2=-1,q2=0;const r2=n2.length,s2=[];while(++p2<r2){const t2=n2[p2];if(fn(t2)){s2[q2++]=t2;}}return s2;}k2.exports=filter;},function(u2,v2){function find(fn,x2){if(x2===void 0){return y2=>find(fn,y2);}return x2.find(fn);}u2.exports=find;},function(z2,A2){function findIndex(fn,C2){if(C2===void 0){return D2=>findIndex(fn,D2);}const E2=C2.length;let F2=-1;while(++F2<E2){if(fn(C2[F2])){return F2;}}return-1;}z2.exports=findIndex;},function(G2,H2){function flatten(I2,J2){J2=J2===void 0?[]:J2;for(let i=0;i<I2.length;i++){if(Array.isArray(I2[i])){flatten(I2[i],J2);}else{J2.push(I2[i]);}}return J2;}G2.exports=flatten;},function(K2,L2){function has(M2,N2){if(N2===void 0){return O2=>has(M2,O2);}return N2[M2]!==void 0;}K2.exports=has;},function(P2,Q2){function head(a){if(typeof a==="string"){return a[0]||"";}return a[0];}P2.exports=head;},function(R2,S2){function indexOf(T2,U2){if(U2===void 0){return V2=>indexOf(T2,V2);}let W2=-1;const X2=U2.length;while(++W2<X2){if(U2[W2]===T2){return W2;}}return-1;}R2.exports=indexOf;},function(Y2,Z2,a3){const b3=a3(1);function init(a){if(typeof a==="string"){return a.slice(0,-1);}return a.length?b3(a,0,-1):[];}Y2.exports=init;},function(c3,d3){function join(e3,f3){if(f3===void 0){return g3=>join(e3,g3);}return f3.join(e3);}c3.exports=join;},function(h3,i3){function last(a){if(typeof a==="string"){return a[a.length-1]||"";}return a[a.length-1];}h3.exports=last;},function(j3,k3){function length(l3){return l3.length;}j3.exports=length;},function(m3,n3){function match(o3,p3){if(p3===void 0){return q3=>match(o3,q3);}const r3=p3.match(o3);return r3===null?[]:r3;}m3.exports=match;},function(s3,t3){function omit(u3,v3){if(v3===void 0){return w3=>omit(u3,w3);}const x3={};for(key in v3){if(!u3.includes(key)){x3[key]=v3[key];}}return x3;}s3.exports=omit;},function(y3,z3,A3){const B3=A3(0),C3=A3(6);function curry(fn,E3={}){return F3=>{if(B3(fn)==="Async"){return new Promise((G3,H3)=>{fn(C3(F3,E3)).then(G3).catch(H3);});}return fn(C3(F3,E3));};}y3.exports=curry;},function(I3,J3){function path(K3,L3){if(L3===void 0){return M3=>path(K3,M3);}let N3=L3,O3=0;while(O3<K3.length){if(N3===null){return void 0;}N3=N3[K3[O3]];O3++;}return N3;}I3.exports=path;},function(P3,Q3){function pick(R3,S3){if(S3===void 0){return T3=>pick(R3,T3);}const U3={};let V3=0;while(V3<R3.length){if(R3[V3]in S3){U3[R3[V3]]=S3[R3[V3]];}V3++;}return U3;}P3.exports=pick;},function(W3,X3,Y3){const Z3=Y3(5);function pluck(a4,b4){if(b4===void 0){return c4=>pluck(a4,c4);}const d4=[];Z3(e4=>{if(!(e4[a4]===void 0)){d4.push(e4[a4]);}},b4);return d4;}W3.exports=pluck;},function(f4,g4){function prepend(h4,i4){if(i4===void 0){return j4=>prepend(h4,j4);}const k4=i4.concat();k4.unshift(h4);return k4;}f4.exports=prepend;},function(l4,m4){function prop(n4,o4){if(o4===void 0){return p4=>prop(n4,p4);}return o4[n4];}l4.exports=prop;},function(q4,r4){function propEq(s4,t4,u4){if(t4===void 0){return(v4,w4)=>propEq(s4,v4,w4);}else if(u4===void 0){return x4=>propEq(s4,t4,x4);}return u4[s4]===t4;}q4.exports=propEq;},function(y4,z4){function range(A4,B4){const C4=[];for(let i=A4;i<B4;i++){C4.push(i);}return C4;}y4.exports=range;},function(D4,E4){function repeat(a,F4){if(F4===void 0){return G4=>repeat(a,G4);}const H4=Array(F4);return H4.fill(a);}D4.exports=repeat;},function(I4,J4){function replace(K4,L4,M4){if(L4===void 0){return(N4,O4)=>replace(K4,N4,O4);}else if(M4===void 0){return P4=>replace(K4,L4,P4);}return M4.replace(K4,L4);}I4.exports=replace;},function(Q4,R4){function sort(fn,T4){if(T4===void 0){return U4=>sort(fn,U4);}const V4=T4.concat();return V4.sort(fn);}Q4.exports=sort;},function(W4,X4){function sortBy(fn,Z4){if(Z4===void 0){return a5=>sortBy(fn,a5);}const b5=Z4.concat();return b5.sort((a,b)=>{const c5=fn(a),d5=fn(b);return c5<d5?-1:c5>d5?1:0;});}W4.exports=sortBy;},function(e5,f5){function split(g5,h5){if(h5===void 0){return i5=>split(g5,i5);}return h5.split(g5);}e5.exports=split;},function(j5,k5){function splitEvery(l5,a){if(a===void 0){return m5=>splitEvery(l5,m5);}l5=l5>1?l5:1;const n5=[];let o5=0;while(o5<a.length){n5.push(a.slice(o5,o5+=l5));}return n5;}j5.exports=splitEvery;},function(p5,q5){function subtract(a,b){if(b===void 0){return r5=>subtract(a,r5);}return a-b;}p5.exports=subtract;},function(s5,t5,u5){const v5=u5(3);function tail(w5){return v5(1,w5);}s5.exports=tail;},function(x5,y5,z5){const A5=z5(1);function take(B5,a){if(a===void 0){return C5=>take(B5,C5);}else if(typeof a==="string"){return a.slice(0,B5);}return A5(a,0,B5);}x5.exports=take;},function(D5,E5,F5){const G5=F5(1);function takeLast(H5,a){if(a===void 0){return I5=>takeLast(H5,I5);}const J5=a.length;H5=H5>J5?J5:H5;if(typeof a==="string"){return a.slice(J5-H5);}H5=J5-H5;return G5(a,H5,J5);}D5.exports=takeLast;},function(K5,L5){function test(M5,N5){if(N5===void 0){return O5=>test(M5,O5);}return N5.search(M5)===-1?!1:!0;}K5.exports=test;},function(P5,Q5){function toLower(R5){return R5.toLowerCase();}P5.exports=toLower;},function(S5,T5){function toUpper(U5){return U5.toUpperCase();}S5.exports=toUpper;},function(V5,W5){function trim(X5){return X5.trim();}V5.exports=trim;},function(Y5,Z5,a6){const b6=a6(2);function uniq(c6){let d6=-1;const e6=[];while(++d6<c6.length){const f6=c6[d6];if(!b6(f6,e6)){e6.push(f6);}}return e6;}Y5.exports=uniq;},function(g6,h6){function update(i6,j6,k6){if(j6===void 0){return(l6,m6)=>update(i6,l6,m6);}else if(k6===void 0){return n6=>update(i6,j6,n6);}const o6=k6.concat();return o6.fill(j6,i6,i6+1);}g6.exports=update;},function(p6,q6){function values(r6){const s6=[];for(key in r6){s6.push(r6[key]);}return s6;}p6.exports=values;},function(t6,u6,v6){u6.add=v6(7);u6.any=v6(9);u6.adjust=v6(8);u6.append=v6(10);u6.compose=v6(11);u6.contains=v6(2);u6.curry=v6(12);u6.defaultTo=v6(13);u6.drop=v6(3);u6.dropLast=v6(14);u6.equals=v6(4);u6.filter=v6(15);u6.find=v6(16);u6.findIndex=v6(17);u6.flatten=v6(18);u6.has=v6(19);u6.head=v6(20);u6.indexOf=v6(21);u6.init=v6(22);u6.join=v6(23);u6.last=v6(24);u6.length=v6(25);u6.map=v6(5);u6.match=v6(26);u6.merge=v6(6);u6.omit=v6(27);u6.path=v6(29);u6.partialCurry=v6(28);u6.pick=v6(30);u6.pluck=v6(31);u6.prepend=v6(32);u6.prop=v6(33);u6.propEq=v6(34);u6.range=v6(35);u6.repeat=v6(36);u6.replace=v6(37);u6.sort=v6(38);u6.sortBy=v6(39);u6.split=v6(40);u6.splitEvery=v6(41);u6.subtract=v6(42);u6.tail=v6(43);u6.take=v6(44);u6.takeLast=v6(45);u6.test=v6(46);u6.toLower=v6(47);u6.toUpper=v6(48);u6.trim=v6(49);u6.type=v6(0);u6.uniq=v6(50);u6.update=v6(51);u6.values=v6(52);}]);

@@ -1,17 +0,7 @@

const type = require("./type")
const merge = require("./merge")
// taken from the last comment of https://gist.github.com/mkuklis/5294248
function curry(fn, inputArguments = {}) {
return inputArgumentsHolder => {
if (type(fn) === "Async") {
return new Promise((resolve, reject) => {
fn(merge(inputArgumentsHolder, inputArguments))
.then(resolve)
.catch(reject)
})
}
return fn(merge(inputArgumentsHolder, inputArguments))
}
function curry(f, a = []){
return (...p) => (o => o.length === f.length ? f(...o) : curry(f, o))([...a, ...p])
}
module.exports = curry
{
"name": "rambda",
"version": "0.6.1",
"version": "0.7.0",
"description": "Lightweight alternative to Ramda",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,2 +28,3 @@ exports.add = require("./modules/add")

exports.path = require("./modules/path")
exports.partialCurry = require("./modules/partialCurry")
exports.pick = require("./modules/pick")

@@ -30,0 +31,0 @@ exports.pluck = require("./modules/pluck")

@@ -6,3 +6,3 @@ [![Build Status](https://img.shields.io/travis/selfrefactor/rambda.svg)](https://travis-ci.org/selfrefactor/rambda)

Faster alternative to **Ramda** in just 10kB
Faster alternative to **Ramda** in just 10kB - [Documentation](https://selfrefactor.github.io/rambda/#/)

@@ -13,5 +13,5 @@ ## Argumentation

I wanted to optimize the size of my bundle, but already developed Ramda habits.
I wanted to optimize the size of my bundle, but I had already developed Ramda habits.
This lead me to the idea to recreate the funtionality of some Ramda methods and export that as library.
This lead me to the idea to recreate the funtionality of some Ramda methods and export that as a library.

@@ -36,3 +36,3 @@ ## Example use

```
https://cdnjs.cloudflare.com/ajax/libs/rambda/0.6.1/webVersion.js
https://cdnjs.cloudflare.com/ajax/libs/rambda/0.7.0/webVersion.js
```

@@ -50,4 +50,2 @@

- Rambda's **curry** works in much different way than Ramda's `curry`. Please chech with the documentation of the method.
- Rambda's **map/filter** work only for arrays, while Ramda's **map/filter** accept also objects.

@@ -59,22 +57,6 @@

- If you need more **Ramda** methods, than what **Rambda** offers, you may check [Rambdax](https://github.com/selfrefactor/rambdax)
> If you need more **Ramda** methods, than what **Rambda** offers, you may check the extended version of Rambda - [Rambdax](https://github.com/selfrefactor/rambdax)
## Benchmark
[Scroll to API](#api-list)
![Screen](/files/screen1.png)
![Screen](/files/screen2.png)
## Flowtype
I haven't tested it fully, but the partial test shows that [Ramda
definitions](https://github.com/flowtype/flow-typed/blob/master/definitions/npm/ramda_v0.21.x/flow_v0.28.x-v0.30.x/ramda_v0.21.x.js) can be used.
You need to replace `declare module ramda` with `declare module rambda` on line
10 and store the file as rambda.js in your *flow-typed* folder
## API
## api-list
#### add

@@ -130,18 +112,12 @@

> curry(fn: Function|Async, a: Object, b: Object): Function|Promise
> curry(fn: Function): Function
When called with function `fn` and first set of input `a`, it will return a function.
Returns curried version of `fn`
This function will wait to be called with second set of input `b` and it will invoke `fn` with the merged object of `a` over `b`.
`fn` can be asynchronous function. In that case a `Promise` holding the result of `fn` is returned.
See the example below:
```javascript
const fn = ({a, b, c}) => {
return (a * b) + c
}
const curried = R.curry(fn, {a: 2})
curried({b: 3, c: 10}) //=> 16
const addFourNumbers = (a, b, c, d) => a + b + c + d
const curriedAddFourNumbers = R.curry(addFourNumbers)
const f = curriedAddFourNumbers(1, 2)
const g = f(3)
g(4) // => 10
```

@@ -365,2 +341,25 @@

#### partialCurry
> partialCurry(fn: Function|Async, a: Object, b: Object): Function|Promise
When called with function `fn` and first set of input `a`, it will return a function.
This function will wait to be called with second set of input `b` and it will invoke `fn` with the merged object of `a` over `b`.
`fn` can be asynchronous function. In that case a `Promise` holding the result of `fn` is returned.
See the example below:
```javascript
const fn = ({a, b, c}) => {
return (a * b) + c
}
const curried = R.partialCurry(fn, {a: 2})
curried({b: 3, c: 10}) //=> 16
```
- Note that `partialCurry` is method specific for **Rambda** and the method is not part of **Ramda**'s API
- You can read my argumentation for creating *partialCurry* [here](https://selfrefactor.gitbooks.io/blog/content/argumenting-rambdas-curry.html)
#### pick

@@ -372,3 +371,3 @@

```javascript
```
R.pick(['a', 'c'], {a: 1, b: 2}) //=> {a: 1}

@@ -379,9 +378,9 @@ ```

> pluck(prop: String, arr: Array<Object>): Array
> pluck(property: String, arr: Array): Array
- Returns list of the values of property `prop` taken from the objects in `arr`
- Returns list of the values of `property` taken from the objects in array of objects `arr`
```javascript
R.pluck('a')([{a: 1}, {a: 2}]) //=> [1, 2]
```
R.pluck('a')([{a: 1}, {a: 2}, {b: 3}]) //=> [1, 2]
```

@@ -396,4 +395,6 @@ #### prepend

#### prop(propToFind: String, obj: Object): any
#### prop
> prop(propToFind: String, obj: Object): any
Returns `undefined` or the value of property `propToFind` in `obj`

@@ -403,3 +404,3 @@

R.prop('x', {x: 100}) //=> 100
R.prop('x', {}) //=> undefined
R.prop('x', {a: 1}) //=> undefined
```

@@ -465,2 +466,4 @@

> sortBy(sortFn: Function, arr: Array): Array
Returns copy of `arr` sorted by `sortFn`

@@ -622,5 +625,24 @@

```
---
## Benchmark
## Projects using Rambda
![Screen](https://cdn.rawgit.com/selfrefactor/rambda/7475b559/files/screen1.png)
![Screen](https://cdn.rawgit.com/selfrefactor/rambda/7475b559/files/screen2.png)
## Flowtype
I haven't tested it fully, but the partial test shows that [Ramda
definitions](https://github.com/flowtype/flow-typed/blob/master/definitions/npm/ramda_v0.21.x/flow_v0.28.x-v0.30.x/ramda_v0.21.x.js) can be used.
You need to replace `declare module ramda` with `declare module rambda` on line 10 and store the file as `rambda.js` in your *flow-typed* folder
## More info
> Changelog
- 0.7.0 Close [issue #5](https://github.com/selfrefactor/rambda/issues/5) - change name of `curry` to `partialCurry`; add new method `curry`, which works just like Ramda's `curry`
- 0.6.2 Add separate documentation site via `docsify`
> Projects using Rambda
- [I Learn Smarter](https://github.com/selfrefactor/ils)

@@ -638,4 +660,4 @@

## Articles about Rambda
- [https://survivejs.com/blog/rambda-interview/](https://survivejs.com/blog/rambda-interview/)
> Articles about Rambda
- [Interview with Dejan Totef at SurviveJS blog](https://survivejs.com/blog/rambda-interview/)
- [Argumentation of Rambda's curry method](https://selfrefactor.gitbooks.io/blog/content/argumenting-rambdas-curry.html)

@@ -1,1 +0,1 @@

(function webpackUniversalModuleDefinition(d,e){if(typeof exports==='object'&&typeof module==='object')module.exports=e();else if(typeof define==='function'&&define.amd)define([],e);else{var a=e();for(var i in a)(typeof exports==='object'?exports:d)[i]=a[i];}})(this,function(){return function(f){var g={};function __webpack_require__(h){if(g[h]){return g[h].exports;}var j=g[h]={i:h,l:!1,exports:{}};f[h].call(j.exports,j,j.exports,__webpack_require__);j.l=!0;return j.exports;}__webpack_require__.m=f;__webpack_require__.c=g;__webpack_require__.i=function(k){return k;};__webpack_require__.d=function(l,m,n){if(!__webpack_require__.o(l,m)){Object.defineProperty(l,m,{configurable:!1,enumerable:!0,get:n});}};__webpack_require__.n=function(o){var p=o&&o.__esModule?function getDefault(){return o['default'];}:function getModuleExports(){return o;};__webpack_require__.d(p,'a',p);return p;};__webpack_require__.o=function(q,r){return Object.prototype.hasOwnProperty.call(q,r);};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=8);}([function(s,t){function type(a){if(a===null){return"Null";}else if(Array.isArray(a)){return"Array";}else if(typeof a==="boolean"){return"Boolean";}else if(typeof a==="number"){return"Number";}else if(typeof a==="string"){return"String";}else if(a===void 0){return"Undefined";}else if(a instanceof RegExp){return"RegExp";}const u=a.toString();if(u.startsWith("async")){return"Async";}else if(u.includes("function")||u.includes("=>")){return"Function";}return"Object";}s.exports=type;},function(v,w){function baseSlice(x,y,z){let A=-1,B=x.length;z=z>B?B:z;if(z<0){z+=B;}B=y>z?0:z-y>>>0;y>>>=0;const C=Array(B);while(++A<B){C[A]=x[A+y];}return C;}v.exports=baseSlice;},function(D,E,F){const G=F(4);function contains(H,I){if(I===void 0){return J=>contains(H,J);}let K=-1,L=!1;while(++K<I.length&&!L){if(G(I[K],H)){L=!0;}}return L;}D.exports=contains;},function(M,N){function drop(O,a){if(a===void 0){return P=>drop(O,P);}return a.slice(O);}M.exports=drop;},function(Q,R,S){const T=S(0);function equals(a,b){if(b===void 0){return U=>equals(a,U);}else if(a===b){return a!==0||1/a===1/b;}const V=T(a);if(V!==T(b)){return!1;}if(V==="Array"){const W=Array.from(a),X=Array.from(b);return W.sort().toString()===X.sort().toString();}if(V==="Object"){const Y=Object.keys(a);if(Y.length===Object.keys(b).length){if(Y.length===0){return!0;}let Z=!0;Y.map(a1=>{if(Z){const b1=T(a[a1]),c1=T(b[a1]);if(b1===c1){if(b1==="Object"){if(Object.keys(a[a1]).length===Object.keys(b[a1]).length){if(Object.keys(a[a1]).length!==0){if(!equals(a[a1],b[a1])){Z=!1;}}}else{Z=!1;}}else if(!equals(a[a1],b[a1])){Z=!1;}}else{Z=!1;}}});return Z;}}return!1;}Q.exports=equals;},function(d1,e1){function map(fn,g1){if(g1===void 0){return h1=>map(fn,h1);}let i1=-1;const j1=g1.length,k1=Array(j1);while(++i1<j1){k1[i1]=fn(g1[i1]);}return k1;}d1.exports=map;},function(l1,m1){function merge(n1,o1){if(o1===void 0){return p1=>merge(n1,p1);}return Object.assign({},n1,o1);}l1.exports=merge;},function(q1,r1,s1){r1.add=s1(9);r1.any=s1(11);r1.adjust=s1(10);r1.append=s1(12);r1.compose=s1(13);r1.contains=s1(2);r1.curry=s1(14);r1.defaultTo=s1(15);r1.drop=s1(3);r1.dropLast=s1(16);r1.equals=s1(4);r1.filter=s1(17);r1.find=s1(18);r1.findIndex=s1(19);r1.flatten=s1(20);r1.has=s1(21);r1.head=s1(22);r1.indexOf=s1(23);r1.init=s1(24);r1.join=s1(25);r1.last=s1(26);r1.length=s1(27);r1.map=s1(5);r1.match=s1(28);r1.merge=s1(6);r1.omit=s1(29);r1.path=s1(30);r1.pick=s1(31);r1.pluck=s1(32);r1.prepend=s1(33);r1.prop=s1(34);r1.propEq=s1(35);r1.range=s1(36);r1.repeat=s1(37);r1.replace=s1(38);r1.sort=s1(39);r1.sortBy=s1(40);r1.split=s1(41);r1.splitEvery=s1(42);r1.subtract=s1(43);r1.tail=s1(44);r1.take=s1(45);r1.takeLast=s1(46);r1.test=s1(47);r1.toLower=s1(48);r1.toUpper=s1(49);r1.trim=s1(50);r1.type=s1(0);r1.uniq=s1(51);r1.update=s1(52);r1.values=s1(53);},function(t1,u1,v1){const w1=v1(7);t1.exports.R=w1;},function(x1,y1){function add(a,b){if(b===void 0){return c=>add(a,c);}return a+b;}x1.exports=add;},function(z1,A1){function adjust(fn,C1,D1){if(C1===void 0){return(E1,F1)=>adjust(fn,E1,F1);}else if(D1===void 0){return G1=>adjust(fn,C1,G1);}const H1=D1.concat();return H1.map((I1,J1)=>{if(J1===C1){return fn(D1[C1]);}return I1;});}z1.exports=adjust;},function(K1,L1){function any(fn,N1){if(N1===void 0){return O1=>any(fn,O1);}let P1=0;while(P1<N1.length){if(fn(N1[P1])){return!0;}P1++;}return!1;}K1.exports=any;},function(Q1,R1){function append(S1,T1){if(T1===void 0){return U1=>append(S1,U1);}const V1=T1.concat();V1.push(S1);return V1;}Q1.exports=append;},function(W1,X1){function isFunction(Y1){return typeof Y1==="function";}function compose(){const Z1=arguments;let a2=Z1.length;while(a2--){if(!isFunction(Z1[a2])){throw new TypeError();}}return function(){let b2=arguments,c2=Z1.length;while(c2--){b2=[Z1[c2].apply(this,b2)];}return b2[0];};}W1.exports=compose;},function(d2,e2,f2){const g2=f2(0),h2=f2(6);function curry(fn,j2={}){return k2=>{if(g2(fn)==="Async"){return new Promise((l2,m2)=>{fn(h2(k2,j2)).then(l2).catch(m2);});}return fn(h2(k2,j2));};}d2.exports=curry;},function(n2,o2,p2){const q2=p2(0);function defaultTo(r2,s2){if(arguments.length===1){return t2=>defaultTo(r2,t2);}return s2===void 0||!(q2(s2)===q2(r2))?r2:s2;}n2.exports=defaultTo;},function(u2,v2){function dropLast(w2,a){if(a===void 0){return x2=>dropLast(w2,x2);}return a.slice(0,-w2);}u2.exports=dropLast;},function(y2,z2){function filter(fn,B2){if(B2===void 0){return C2=>filter(fn,C2);}let D2=-1,E2=0;const F2=B2.length,G2=[];while(++D2<F2){const H2=B2[D2];if(fn(H2)){G2[E2++]=H2;}}return G2;}y2.exports=filter;},function(I2,J2){function find(fn,L2){if(L2===void 0){return M2=>find(fn,M2);}return L2.find(fn);}I2.exports=find;},function(N2,O2){function findIndex(fn,Q2){if(Q2===void 0){return R2=>findIndex(fn,R2);}const S2=Q2.length;let T2=-1;while(++T2<S2){if(fn(Q2[T2])){return T2;}}return-1;}N2.exports=findIndex;},function(U2,V2){function flatten(W2,X2){X2=X2===void 0?[]:X2;for(let i=0;i<W2.length;i++){if(Array.isArray(W2[i])){flatten(W2[i],X2);}else{X2.push(W2[i]);}}return X2;}U2.exports=flatten;},function(Y2,Z2){function has(a3,b3){if(b3===void 0){return c3=>has(a3,c3);}return b3[a3]!==void 0;}Y2.exports=has;},function(d3,e3){function head(a){if(typeof a==="string"){return a[0]||"";}return a[0];}d3.exports=head;},function(f3,g3){function indexOf(h3,i3){if(i3===void 0){return j3=>indexOf(h3,j3);}let k3=-1;const l3=i3.length;while(++k3<l3){if(i3[k3]===h3){return k3;}}return-1;}f3.exports=indexOf;},function(m3,n3,o3){const p3=o3(1);function init(a){if(typeof a==="string"){return a.slice(0,-1);}return a.length?p3(a,0,-1):[];}m3.exports=init;},function(q3,r3){function join(s3,t3){if(t3===void 0){return u3=>join(s3,u3);}return t3.join(s3);}q3.exports=join;},function(v3,w3){function last(a){if(typeof a==="string"){return a[a.length-1]||"";}return a[a.length-1];}v3.exports=last;},function(x3,y3){function length(z3){return z3.length;}x3.exports=length;},function(A3,B3){function match(C3,D3){if(D3===void 0){return E3=>match(C3,E3);}const F3=D3.match(C3);return F3===null?[]:F3;}A3.exports=match;},function(G3,H3){function omit(I3,J3){if(J3===void 0){return K3=>omit(I3,K3);}const L3={};for(key in J3){if(!I3.includes(key)){L3[key]=J3[key];}}return L3;}G3.exports=omit;},function(M3,N3){function path(O3,P3){if(P3===void 0){return Q3=>path(O3,Q3);}let R3=P3,S3=0;while(S3<O3.length){if(R3===null){return void 0;}R3=R3[O3[S3]];S3++;}return R3;}M3.exports=path;},function(T3,U3){function pick(V3,W3){if(W3===void 0){return X3=>pick(V3,X3);}const Y3={};let Z3=0;while(Z3<V3.length){if(V3[Z3]in W3){Y3[V3[Z3]]=W3[V3[Z3]];}Z3++;}return Y3;}T3.exports=pick;},function(a4,b4,c4){const d4=c4(5);function pluck(e4,f4){if(f4===void 0){return g4=>pluck(e4,g4);}const h4=[];d4(i4=>{if(!(i4[e4]===void 0)){h4.push(i4[e4]);}},f4);return h4;}a4.exports=pluck;},function(j4,k4){function prepend(l4,m4){if(m4===void 0){return n4=>prepend(l4,n4);}const o4=m4.concat();o4.unshift(l4);return o4;}j4.exports=prepend;},function(p4,q4){function prop(r4,s4){if(s4===void 0){return t4=>prop(r4,t4);}return s4[r4];}p4.exports=prop;},function(u4,v4){function propEq(w4,x4,y4){if(x4===void 0){return(z4,A4)=>propEq(w4,z4,A4);}else if(y4===void 0){return B4=>propEq(w4,x4,B4);}return y4[w4]===x4;}u4.exports=propEq;},function(C4,D4){function range(E4,F4){const G4=[];for(let i=E4;i<F4;i++){G4.push(i);}return G4;}C4.exports=range;},function(H4,I4){function repeat(a,J4){if(J4===void 0){return K4=>repeat(a,K4);}const L4=Array(J4);return L4.fill(a);}H4.exports=repeat;},function(M4,N4){function replace(O4,P4,Q4){if(P4===void 0){return(R4,S4)=>replace(O4,R4,S4);}else if(Q4===void 0){return T4=>replace(O4,P4,T4);}return Q4.replace(O4,P4);}M4.exports=replace;},function(U4,V4){function sort(fn,X4){if(X4===void 0){return Y4=>sort(fn,Y4);}const Z4=X4.concat();return Z4.sort(fn);}U4.exports=sort;},function(a5,b5){function sortBy(fn,d5){if(d5===void 0){return e5=>sortBy(fn,e5);}const f5=d5.concat();return f5.sort((a,b)=>{const g5=fn(a),h5=fn(b);return g5<h5?-1:g5>h5?1:0;});}a5.exports=sortBy;},function(i5,j5){function split(k5,l5){if(l5===void 0){return m5=>split(k5,m5);}return l5.split(k5);}i5.exports=split;},function(n5,o5){function splitEvery(p5,a){if(a===void 0){return q5=>splitEvery(p5,q5);}p5=p5>1?p5:1;const r5=[];let s5=0;while(s5<a.length){r5.push(a.slice(s5,s5+=p5));}return r5;}n5.exports=splitEvery;},function(t5,u5){function subtract(a,b){if(b===void 0){return v5=>subtract(a,v5);}return a-b;}t5.exports=subtract;},function(w5,x5,y5){const z5=y5(3);function tail(A5){return z5(1,A5);}w5.exports=tail;},function(B5,C5,D5){const E5=D5(1);function take(F5,a){if(a===void 0){return G5=>take(F5,G5);}else if(typeof a==="string"){return a.slice(0,F5);}return E5(a,0,F5);}B5.exports=take;},function(H5,I5,J5){const K5=J5(1);function takeLast(L5,a){if(a===void 0){return M5=>takeLast(L5,M5);}const N5=a.length;L5=L5>N5?N5:L5;if(typeof a==="string"){return a.slice(N5-L5);}L5=N5-L5;return K5(a,L5,N5);}H5.exports=takeLast;},function(O5,P5){function test(Q5,R5){if(R5===void 0){return S5=>test(Q5,S5);}return R5.search(Q5)===-1?!1:!0;}O5.exports=test;},function(T5,U5){function toLower(V5){return V5.toLowerCase();}T5.exports=toLower;},function(W5,X5){function toUpper(Y5){return Y5.toUpperCase();}W5.exports=toUpper;},function(Z5,a6){function trim(b6){return b6.trim();}Z5.exports=trim;},function(c6,d6,e6){const f6=e6(2);function uniq(g6){let h6=-1;const i6=[];while(++h6<g6.length){const j6=g6[h6];if(!f6(j6,i6)){i6.push(j6);}}return i6;}c6.exports=uniq;},function(k6,l6){function update(m6,n6,o6){if(n6===void 0){return(p6,q6)=>update(m6,p6,q6);}else if(o6===void 0){return r6=>update(m6,n6,r6);}const s6=o6.concat();return s6.fill(n6,m6,m6+1);}k6.exports=update;},function(t6,u6){function values(v6){const w6=[];for(key in v6){w6.push(v6[key]);}return w6;}t6.exports=values;}]);});
(function webpackUniversalModuleDefinition(d,e){if(typeof exports==='object'&&typeof module==='object')module.exports=e();else if(typeof define==='function'&&define.amd)define([],e);else{var a=e();for(var i in a)(typeof exports==='object'?exports:d)[i]=a[i];}})(this,function(){return function(g){var h={};function __webpack_require__(j){if(h[j]){return h[j].exports;}var k=h[j]={i:j,l:!1,exports:{}};g[j].call(k.exports,k,k.exports,__webpack_require__);k.l=!0;return k.exports;}__webpack_require__.m=g;__webpack_require__.c=h;__webpack_require__.i=function(l){return l;};__webpack_require__.d=function(m,n,q){if(!__webpack_require__.o(m,n)){Object.defineProperty(m,n,{configurable:!1,enumerable:!0,get:q});}};__webpack_require__.n=function(r){var s=r&&r.__esModule?function getDefault(){return r['default'];}:function getModuleExports(){return r;};__webpack_require__.d(s,'a',s);return s;};__webpack_require__.o=function(t,u){return Object.prototype.hasOwnProperty.call(t,u);};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=8);}([function(v,w){function type(a){if(a===null){return"Null";}else if(Array.isArray(a)){return"Array";}else if(typeof a==="boolean"){return"Boolean";}else if(typeof a==="number"){return"Number";}else if(typeof a==="string"){return"String";}else if(a===void 0){return"Undefined";}else if(a instanceof RegExp){return"RegExp";}const x=a.toString();if(x.startsWith("async")){return"Async";}else if(x.includes("function")||x.includes("=>")){return"Function";}return"Object";}v.exports=type;},function(y,z){function baseSlice(A,B,C){let D=-1,E=A.length;C=C>E?E:C;if(C<0){C+=E;}E=B>C?0:C-B>>>0;B>>>=0;const F=Array(E);while(++D<E){F[D]=A[D+B];}return F;}y.exports=baseSlice;},function(G,H,I){const J=I(4);function contains(K,L){if(L===void 0){return M=>contains(K,M);}let N=-1,O=!1;while(++N<L.length&&!O){if(J(L[N],K)){O=!0;}}return O;}G.exports=contains;},function(P,Q){function drop(R,a){if(a===void 0){return S=>drop(R,S);}return a.slice(R);}P.exports=drop;},function(T,U,V){const W=V(0);function equals(a,b){if(b===void 0){return X=>equals(a,X);}else if(a===b){return a!==0||1/a===1/b;}const Y=W(a);if(Y!==W(b)){return!1;}if(Y==="Array"){const Z=Array.from(a),a1=Array.from(b);return Z.sort().toString()===a1.sort().toString();}if(Y==="Object"){const b1=Object.keys(a);if(b1.length===Object.keys(b).length){if(b1.length===0){return!0;}let c1=!0;b1.map(d1=>{if(c1){const e1=W(a[d1]),f1=W(b[d1]);if(e1===f1){if(e1==="Object"){if(Object.keys(a[d1]).length===Object.keys(b[d1]).length){if(Object.keys(a[d1]).length!==0){if(!equals(a[d1],b[d1])){c1=!1;}}}else{c1=!1;}}else if(!equals(a[d1],b[d1])){c1=!1;}}else{c1=!1;}}});return c1;}}return!1;}T.exports=equals;},function(g1,h1){function map(fn,j1){if(j1===void 0){return k1=>map(fn,k1);}let l1=-1;const m1=j1.length,n1=Array(m1);while(++l1<m1){n1[l1]=fn(j1[l1]);}return n1;}g1.exports=map;},function(o1,p1){function merge(q1,r1){if(r1===void 0){return s1=>merge(q1,s1);}return Object.assign({},q1,r1);}o1.exports=merge;},function(t1,u1,v1){u1.add=v1(9);u1.any=v1(11);u1.adjust=v1(10);u1.append=v1(12);u1.compose=v1(13);u1.contains=v1(2);u1.curry=v1(14);u1.defaultTo=v1(15);u1.drop=v1(3);u1.dropLast=v1(16);u1.equals=v1(4);u1.filter=v1(17);u1.find=v1(18);u1.findIndex=v1(19);u1.flatten=v1(20);u1.has=v1(21);u1.head=v1(22);u1.indexOf=v1(23);u1.init=v1(24);u1.join=v1(25);u1.last=v1(26);u1.length=v1(27);u1.map=v1(5);u1.match=v1(28);u1.merge=v1(6);u1.omit=v1(29);u1.path=v1(31);u1.partialCurry=v1(30);u1.pick=v1(32);u1.pluck=v1(33);u1.prepend=v1(34);u1.prop=v1(35);u1.propEq=v1(36);u1.range=v1(37);u1.repeat=v1(38);u1.replace=v1(39);u1.sort=v1(40);u1.sortBy=v1(41);u1.split=v1(42);u1.splitEvery=v1(43);u1.subtract=v1(44);u1.tail=v1(45);u1.take=v1(46);u1.takeLast=v1(47);u1.test=v1(48);u1.toLower=v1(49);u1.toUpper=v1(50);u1.trim=v1(51);u1.type=v1(0);u1.uniq=v1(52);u1.update=v1(53);u1.values=v1(54);},function(w1,x1,y1){const z1=y1(7);w1.exports.R=z1;},function(A1,B1){function add(a,b){if(b===void 0){return c=>add(a,c);}return a+b;}A1.exports=add;},function(C1,D1){function adjust(fn,F1,G1){if(F1===void 0){return(H1,I1)=>adjust(fn,H1,I1);}else if(G1===void 0){return J1=>adjust(fn,F1,J1);}const K1=G1.concat();return K1.map((L1,M1)=>{if(M1===F1){return fn(G1[F1]);}return L1;});}C1.exports=adjust;},function(N1,O1){function any(fn,Q1){if(Q1===void 0){return R1=>any(fn,R1);}let S1=0;while(S1<Q1.length){if(fn(Q1[S1])){return!0;}S1++;}return!1;}N1.exports=any;},function(T1,U1){function append(V1,W1){if(W1===void 0){return X1=>append(V1,X1);}const Y1=W1.concat();Y1.push(V1);return Y1;}T1.exports=append;},function(Z1,a2){function isFunction(b2){return typeof b2==="function";}function compose(){const c2=arguments;let d2=c2.length;while(d2--){if(!isFunction(c2[d2])){throw new TypeError();}}return function(){let e2=arguments,f2=c2.length;while(f2--){e2=[c2[f2].apply(this,e2)];}return e2[0];};}Z1.exports=compose;},function(g2,h2){function curry(f,a=[]){return(...p)=>(o=>o.length===f.length?f(...o):curry(f,o))([...a,...p]);}g2.exports=curry;},function(i2,j2,k2){const l2=k2(0);function defaultTo(m2,n2){if(arguments.length===1){return o2=>defaultTo(m2,o2);}return n2===void 0||!(l2(n2)===l2(m2))?m2:n2;}i2.exports=defaultTo;},function(p2,q2){function dropLast(r2,a){if(a===void 0){return s2=>dropLast(r2,s2);}return a.slice(0,-r2);}p2.exports=dropLast;},function(t2,u2){function filter(fn,w2){if(w2===void 0){return x2=>filter(fn,x2);}let y2=-1,z2=0;const A2=w2.length,B2=[];while(++y2<A2){const C2=w2[y2];if(fn(C2)){B2[z2++]=C2;}}return B2;}t2.exports=filter;},function(D2,E2){function find(fn,G2){if(G2===void 0){return H2=>find(fn,H2);}return G2.find(fn);}D2.exports=find;},function(I2,J2){function findIndex(fn,L2){if(L2===void 0){return M2=>findIndex(fn,M2);}const N2=L2.length;let O2=-1;while(++O2<N2){if(fn(L2[O2])){return O2;}}return-1;}I2.exports=findIndex;},function(P2,Q2){function flatten(R2,S2){S2=S2===void 0?[]:S2;for(let i=0;i<R2.length;i++){if(Array.isArray(R2[i])){flatten(R2[i],S2);}else{S2.push(R2[i]);}}return S2;}P2.exports=flatten;},function(T2,U2){function has(V2,W2){if(W2===void 0){return X2=>has(V2,X2);}return W2[V2]!==void 0;}T2.exports=has;},function(Y2,Z2){function head(a){if(typeof a==="string"){return a[0]||"";}return a[0];}Y2.exports=head;},function(a3,b3){function indexOf(c3,d3){if(d3===void 0){return e3=>indexOf(c3,e3);}let f3=-1;const g3=d3.length;while(++f3<g3){if(d3[f3]===c3){return f3;}}return-1;}a3.exports=indexOf;},function(h3,i3,j3){const k3=j3(1);function init(a){if(typeof a==="string"){return a.slice(0,-1);}return a.length?k3(a,0,-1):[];}h3.exports=init;},function(l3,m3){function join(n3,o3){if(o3===void 0){return p3=>join(n3,p3);}return o3.join(n3);}l3.exports=join;},function(q3,r3){function last(a){if(typeof a==="string"){return a[a.length-1]||"";}return a[a.length-1];}q3.exports=last;},function(s3,t3){function length(u3){return u3.length;}s3.exports=length;},function(v3,w3){function match(x3,y3){if(y3===void 0){return z3=>match(x3,z3);}const A3=y3.match(x3);return A3===null?[]:A3;}v3.exports=match;},function(B3,C3){function omit(D3,E3){if(E3===void 0){return F3=>omit(D3,F3);}const G3={};for(key in E3){if(!D3.includes(key)){G3[key]=E3[key];}}return G3;}B3.exports=omit;},function(H3,I3,J3){const K3=J3(0),L3=J3(6);function curry(fn,N3={}){return O3=>{if(K3(fn)==="Async"){return new Promise((P3,Q3)=>{fn(L3(O3,N3)).then(P3).catch(Q3);});}return fn(L3(O3,N3));};}H3.exports=curry;},function(R3,S3){function path(T3,U3){if(U3===void 0){return V3=>path(T3,V3);}let W3=U3,X3=0;while(X3<T3.length){if(W3===null){return void 0;}W3=W3[T3[X3]];X3++;}return W3;}R3.exports=path;},function(Y3,Z3){function pick(a4,b4){if(b4===void 0){return c4=>pick(a4,c4);}const d4={};let e4=0;while(e4<a4.length){if(a4[e4]in b4){d4[a4[e4]]=b4[a4[e4]];}e4++;}return d4;}Y3.exports=pick;},function(f4,g4,h4){const i4=h4(5);function pluck(j4,k4){if(k4===void 0){return l4=>pluck(j4,l4);}const m4=[];i4(n4=>{if(!(n4[j4]===void 0)){m4.push(n4[j4]);}},k4);return m4;}f4.exports=pluck;},function(o4,p4){function prepend(q4,r4){if(r4===void 0){return s4=>prepend(q4,s4);}const t4=r4.concat();t4.unshift(q4);return t4;}o4.exports=prepend;},function(u4,v4){function prop(w4,x4){if(x4===void 0){return y4=>prop(w4,y4);}return x4[w4];}u4.exports=prop;},function(z4,A4){function propEq(B4,C4,D4){if(C4===void 0){return(E4,F4)=>propEq(B4,E4,F4);}else if(D4===void 0){return G4=>propEq(B4,C4,G4);}return D4[B4]===C4;}z4.exports=propEq;},function(H4,I4){function range(J4,K4){const L4=[];for(let i=J4;i<K4;i++){L4.push(i);}return L4;}H4.exports=range;},function(M4,N4){function repeat(a,O4){if(O4===void 0){return P4=>repeat(a,P4);}const Q4=Array(O4);return Q4.fill(a);}M4.exports=repeat;},function(R4,S4){function replace(T4,U4,V4){if(U4===void 0){return(W4,X4)=>replace(T4,W4,X4);}else if(V4===void 0){return Y4=>replace(T4,U4,Y4);}return V4.replace(T4,U4);}R4.exports=replace;},function(Z4,a5){function sort(fn,c5){if(c5===void 0){return d5=>sort(fn,d5);}const e5=c5.concat();return e5.sort(fn);}Z4.exports=sort;},function(f5,g5){function sortBy(fn,i5){if(i5===void 0){return j5=>sortBy(fn,j5);}const k5=i5.concat();return k5.sort((a,b)=>{const l5=fn(a),m5=fn(b);return l5<m5?-1:l5>m5?1:0;});}f5.exports=sortBy;},function(n5,o5){function split(p5,q5){if(q5===void 0){return r5=>split(p5,r5);}return q5.split(p5);}n5.exports=split;},function(s5,t5){function splitEvery(u5,a){if(a===void 0){return v5=>splitEvery(u5,v5);}u5=u5>1?u5:1;const w5=[];let x5=0;while(x5<a.length){w5.push(a.slice(x5,x5+=u5));}return w5;}s5.exports=splitEvery;},function(y5,z5){function subtract(a,b){if(b===void 0){return A5=>subtract(a,A5);}return a-b;}y5.exports=subtract;},function(B5,C5,D5){const E5=D5(3);function tail(F5){return E5(1,F5);}B5.exports=tail;},function(G5,H5,I5){const J5=I5(1);function take(K5,a){if(a===void 0){return L5=>take(K5,L5);}else if(typeof a==="string"){return a.slice(0,K5);}return J5(a,0,K5);}G5.exports=take;},function(M5,N5,O5){const P5=O5(1);function takeLast(Q5,a){if(a===void 0){return R5=>takeLast(Q5,R5);}const S5=a.length;Q5=Q5>S5?S5:Q5;if(typeof a==="string"){return a.slice(S5-Q5);}Q5=S5-Q5;return P5(a,Q5,S5);}M5.exports=takeLast;},function(T5,U5){function test(V5,W5){if(W5===void 0){return X5=>test(V5,X5);}return W5.search(V5)===-1?!1:!0;}T5.exports=test;},function(Y5,Z5){function toLower(a6){return a6.toLowerCase();}Y5.exports=toLower;},function(b6,c6){function toUpper(d6){return d6.toUpperCase();}b6.exports=toUpper;},function(e6,f6){function trim(g6){return g6.trim();}e6.exports=trim;},function(h6,i6,j6){const k6=j6(2);function uniq(l6){let m6=-1;const n6=[];while(++m6<l6.length){const o6=l6[m6];if(!k6(o6,n6)){n6.push(o6);}}return n6;}h6.exports=uniq;},function(p6,q6){function update(r6,s6,t6){if(s6===void 0){return(u6,v6)=>update(r6,u6,v6);}else if(t6===void 0){return w6=>update(r6,s6,w6);}const x6=t6.concat();return x6.fill(s6,r6,r6+1);}p6.exports=update;},function(y6,z6){function values(A6){const B6=[];for(key in A6){B6.push(A6[key]);}return B6;}y6.exports=values;}]);});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc