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.4.0 to 0.4.1

94

benchmark.js

@@ -10,3 +10,3 @@ const R = require("./rambda")

const add = new Benchmark.Suite
options.add = false
options.add = true

@@ -33,3 +33,3 @@ if (options.add) {

const adjust = new Benchmark.Suite
options.adjust = false
options.adjust = true

@@ -53,3 +53,3 @@ if (options.adjust) {

const any = new Benchmark.Suite
options.any = false
options.any = true

@@ -76,3 +76,3 @@ if (options.any) {

const append = new Benchmark.Suite
options.append = false
options.append = true

@@ -96,3 +96,3 @@ if (options.append) {

const compose = new Benchmark.Suite
options.compose = false
options.compose = true

@@ -119,3 +119,3 @@ if (options.compose) {

const contains = new Benchmark.Suite
options.contains = false
options.contains = true

@@ -144,3 +144,3 @@ if (options.contains) {

const drop = new Benchmark.Suite
options.drop = false
options.drop = true

@@ -166,3 +166,3 @@ if (options.drop) {

const dropLast = new Benchmark.Suite
options.dropLast = false
options.dropLast = true

@@ -188,3 +188,3 @@ if (options.dropLast) {

const equals = new Benchmark.Suite
options.equals = false
options.equals = true

@@ -211,3 +211,3 @@ if (options.equals) {

const filter = new Benchmark.Suite
options.filter = false
options.filter = true

@@ -234,3 +234,3 @@ if (options.filter) {

const find = new Benchmark.Suite
options.find = false
options.find = true

@@ -257,3 +257,3 @@ if (options.find) {

const findIndex = new Benchmark.Suite
options.findIndex = false
options.findIndex = true

@@ -282,3 +282,3 @@ if (options.findIndex) {

const flatten = new Benchmark.Suite
options.flatten = false
options.flatten = true

@@ -305,3 +305,3 @@ if (options.flatten) {

const head = new Benchmark.Suite
options.head = false
options.head = true

@@ -329,3 +329,3 @@ if (options.head) {

const headString = new Benchmark.Suite
options.headString = false
options.headString = true

@@ -350,3 +350,3 @@ if (options.headString) {

const indexOf = new Benchmark.Suite
options.indexOf = false
options.indexOf = true

@@ -375,3 +375,3 @@ if (options.indexOf) {

const init = new Benchmark.Suite
options.init = false
options.init = true

@@ -399,3 +399,3 @@ if (options.init) {

const initString = new Benchmark.Suite
options.initString = false
options.initString = true

@@ -443,3 +443,3 @@ if (options.initString) {

const map = new Benchmark.Suite
options.map = false
options.map = true

@@ -468,3 +468,3 @@ if (options.map) {

const match = new Benchmark.Suite
options.match = false
options.match = true

@@ -492,3 +492,3 @@ if (options.match) {

const merge = new Benchmark.Suite
options.merge = false
options.merge = true

@@ -517,3 +517,3 @@ if (options.merge) {

const omit = new Benchmark.Suite
options.omit = false
options.omit = true

@@ -542,3 +542,3 @@ if (options.omit) {

const path = new Benchmark.Suite
options.path = false
options.path = true

@@ -567,3 +567,3 @@ if (options.path) {

const pick = new Benchmark.Suite
options.pick = false
options.pick = true

@@ -592,3 +592,3 @@ if (options.pick) {

const prop = new Benchmark.Suite
options.prop = false
options.prop = true

@@ -614,3 +614,3 @@ if (options.prop) {

const propEq = new Benchmark.Suite
options.propEq = false
options.propEq = true

@@ -640,3 +640,3 @@ if (options.propEq) {

const range = new Benchmark.Suite
options.range = false
options.range = true

@@ -665,3 +665,3 @@ if (options.range) {

const repeat = new Benchmark.Suite
options.repeat = false
options.repeat = true

@@ -690,3 +690,3 @@ if (options.repeat) {

const replace = new Benchmark.Suite
options.replace = false
options.replace = true

@@ -713,3 +713,3 @@ if (options.replace) {

const sort = new Benchmark.Suite
options.sort = false
options.sort = true

@@ -737,3 +737,3 @@ if (options.sort) {

const sortBy = new Benchmark.Suite
options.sortBy = false
options.sortBy = true

@@ -760,3 +760,3 @@ if (options.sortBy) {

const split = new Benchmark.Suite
options.split = false
options.split = true

@@ -783,3 +783,3 @@ if (options.split) {

const splitEvery = new Benchmark.Suite
options.splitEvery = false
options.splitEvery = true

@@ -803,3 +803,3 @@ if (options.splitEvery) {

const splitEveryString = new Benchmark.Suite
options.splitEveryString = false
options.splitEveryString = true

@@ -823,3 +823,3 @@ if (options.splitEveryString) {

const take = new Benchmark.Suite
options.take = false
options.take = true

@@ -848,3 +848,3 @@ if (options.take) {

const takeString = new Benchmark.Suite
options.takeString = false
options.takeString = true

@@ -870,3 +870,3 @@ if (options.takeString) {

const takeLast = new Benchmark.Suite
options.takeLast = false
options.takeLast = true

@@ -895,3 +895,3 @@ if (options.takeLast) {

const takeLastString = new Benchmark.Suite
options.takeLastString = false
options.takeLastString = true

@@ -917,3 +917,3 @@ if (options.takeLastString) {

const test = new Benchmark.Suite
options.test = false
options.test = true

@@ -937,3 +937,3 @@ if (options.test) {

const toLower = new Benchmark.Suite
options.toLower = false
options.toLower = true

@@ -961,3 +961,3 @@ if (options.toLower) {

const toUpper = new Benchmark.Suite
options.toUpper = false
options.toUpper = true

@@ -985,3 +985,3 @@ if (options.toUpper) {

const trim = new Benchmark.Suite
options.trim = false
options.trim = true

@@ -1009,3 +1009,3 @@ if (options.trim) {

const type = new Benchmark.Suite
options.type = false
options.type = true

@@ -1029,3 +1029,3 @@ if (options.type) {

const update = new Benchmark.Suite
options.update = false
options.update = true

@@ -1049,3 +1049,3 @@ if (options.update) {

const values = new Benchmark.Suite
options.values = false
options.values = true

@@ -1073,3 +1073,3 @@ if (options.values) {

const uniq = new Benchmark.Suite
options.uniq = false
options.uniq = true

@@ -1097,3 +1097,3 @@ if (options.uniq) {

const example = new Benchmark.Suite
options.example = false
options.example = true

@@ -1100,0 +1100,0 @@ if (options.example) {

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

const add=(a,b)=>{if(b===void 0){return c=>add(a,c);}return a+b;},adjust=(d,e,f)=>{if(e===void 0){return(g,h)=>adjust(d,g,h);}else if(f===void 0){return j=>adjust(d,e,j);}return f.map((k,l)=>{if(l===e){return d(f[e]);}return k;});},any=(m,n)=>{if(n===void 0){return o=>any(m,o);}let p=0;while(p<n.length){if(m(n[p])){return!0;}p++;}return!1;},append=(q,r)=>{if(r===void 0){return s=>append(q,s);}const t=r;t.push(q);return t;},isFunction=u=>typeof u==="function";function compose(){const v=arguments;let w=v.length;while(w--){if(!isFunction(v[w])){throw new TypeError();}}return function(){let x=arguments,y=v.length;while(y--){x=[v[y].apply(this,x)];}return x[0];};}const filter=(z,A)=>{if(A===void 0){return B=>filter(z,B);}let C=-1,D=0;const E=A===null?0:A.length,F=[];while(++C<E){const G=A[C];if(z(G)){F[D++]=G;}}return F;},find=(H,I)=>{if(I===void 0){return J=>find(H,J);}return I.find(H);},findIndex=(K,L)=>{if(L===void 0){return M=>findIndex(K,M);}const N=L.length;let O=0;while(++O<N){if(K(L[O])){return O;}}return-1;},flatten=(P,Q)=>{Q=Q===void 0?[]:Q;for(let i=0;i<P.length;i++){if(Array.isArray(P[i])){flatten(P[i],Q);}else{Q.push(P[i]);}}return Q;},drop=(R,S)=>{if(S===void 0){return T=>drop(R,T);}const U=S;return U.slice(R);},dropLast=(V,W)=>{if(W===void 0){return X=>dropLast(V,X);}const Y=W;return Y.slice(0,-V);},equals=(a,b)=>{if(b===void 0){return Z=>equals(a,Z);}else if(a===b){return a!==0||1/a===1/b;}const a1=type(a);if(a1!==type(b)){return!1;}if(a1==="Array"){const b1=a,c1=b;return b1.sort().toString()===c1.sort().toString();}if(a1==="Object"){const d1=Object.keys(a);if(d1.length===Object.keys(b).length){if(d1.length===0){return!0;}let e1=!0;d1.map(f1=>{if(e1){const g1=type(a[f1]),h1=type(b[f1]);if(g1===h1){if(g1==="Object"){if(Object.keys(a[f1]).length===Object.keys(b[f1]).length){if(Object.keys(a[f1]).length!==0){if(!equals(a[f1],b[f1])){e1=!1;}}}else{e1=!1;}}else if(!equals(a[f1],b[f1])){e1=!1;}}else{e1=!1;}}});return e1;}}return!1;},contains=(i1,j1)=>{if(j1===void 0){return k1=>contains(i1,k1);}let l1=-1,m1=!1;while(++l1<j1.length&&!m1){if(equals(j1[l1],i1)){m1=!0;}}return m1;},head=a=>{if(typeof a==="string"){return a[0]||"";}return a[0];},indexOf=(n1,o1)=>{if(o1===void 0){return p1=>indexOf(n1,p1);}let q1=-1;const r1=o1.length;while(++q1<r1){if(o1[q1]===n1){return q1;}}return-1;},baseSlice=(s1,t1,u1)=>{let v1=-1,w1=s1.length;if(t1<0){t1=-t1>w1?0:w1+t1;}u1=u1>w1?w1:u1;if(u1<0){u1+=w1;}w1=t1>u1?0:u1-t1>>>0;t1>>>=0;const x1=Array(w1);while(++v1<w1){x1[v1]=s1[v1+t1];}return x1;},init=a=>{if(typeof a==="string"){return a.slice(0,-1);}return a.length?baseSlice(a,0,-1):[];},join=(y1,z1)=>{if(z1===void 0){return A1=>join(y1,A1);}return z1.join(y1);},map=(fn,C1)=>{if(C1===void 0){return D1=>map(fn,D1);}let E1=-1;const F1=C1.length,G1=Array(F1);while(++E1<F1){G1[E1]=fn(C1[E1]);}return G1;},last=a=>{if(typeof a==="string"){return a[a.length-1]||"";}return a[a.length-1];},length=H1=>H1.length,match=(I1,J1)=>{if(J1===void 0){return K1=>match(I1,K1);}const L1=J1.match(I1);return L1===null?[]:L1;},merge=(M1,N1)=>{if(N1===void 0){return O1=>merge(M1,O1);}return Object.assign({},M1,N1);},omit=(P1,Q1)=>{if(Q1===void 0){return R1=>omit(P1,R1);}const S1={};for(key in Q1){if(!P1.includes(key)){S1[key]=Q1[key];}}return S1;},path=(T1,U1)=>{if(U1===void 0){return V1=>path(T1,V1);}let W1=U1,X1=0;while(X1<T1.length){if(W1===null){return void 0;}W1=W1[T1[X1]];X1++;}return W1;},pick=(Y1,Z1)=>{if(Z1===void 0){return a2=>pick(Y1,a2);}const b2={};let c2=0;while(c2<Y1.length){if(Y1[c2]in Z1){b2[Y1[c2]]=Z1[Y1[c2]];}c2++;}return b2;},prepend=(d2,e2)=>{if(e2===void 0){return f2=>prepend(d2,f2);}const g2=e2;g2.unshift(d2);return g2;},prop=(h2,i2)=>{if(i2===void 0){return j2=>prop(h2,j2);}return i2[h2];},propEq=(k2,l2,m2)=>{if(l2===void 0){return(n2,o2)=>propEq(k2,n2,o2);}else if(m2===void 0){return p2=>propEq(k2,l2,p2);}return m2[k2]===l2;},range=(q2,r2)=>{const s2=[];for(let i=q2;i<r2;i++){s2.push(i);}return s2;},repeat=(a,t2)=>{if(t2===void 0){return u2=>repeat(a,u2);}const v2=Array(t2);return v2.fill(a);},replace=(w2,x2,y2)=>{if(x2===void 0){return(z2,A2)=>replace(w2,z2,A2);}else if(y2===void 0){return B2=>replace(w2,x2,B2);}return y2.replace(w2,x2);},subtract=(a,b)=>{if(b===void 0){return C2=>subtract(a,C2);}return a-b;},sort=(fn,E2)=>{if(E2===void 0){return F2=>sort(fn,F2);}const G2=E2;return G2.sort(fn);},sortBy=(fn,I2)=>{if(I2===void 0){return J2=>sortBy(fn,J2);}const K2=I2;return K2.sort((a,b)=>{const L2=fn(a),M2=fn(b);return L2<M2?-1:L2>M2?1:0;});},split=(N2,O2)=>{if(O2===void 0){return P2=>split(N2,P2);}return O2.split(N2);},splitEvery=(Q2,a)=>{if(a===void 0){return R2=>splitEvery(Q2,R2);}Q2=Q2>1?Q2:1;const S2=[];let T2=0;while(T2<a.length){S2.push(a.slice(T2,T2+=Q2));}return S2;},tail=U2=>drop(1,U2),take=(V2,a)=>{if(a===void 0){return W2=>take(V2,W2);}else if(typeof a==="string"){return a.slice(0,V2);}return baseSlice(a,0,V2);},takeLast=(X2,a)=>{if(a===void 0){return Y2=>takeLast(X2,Y2);}const Z2=a.length;X2=X2>Z2?Z2:X2;if(typeof a==="string"){return a.slice(Z2-X2);}X2=Z2-X2;return baseSlice(a,X2,Z2);},toLower=a=>a.toLowerCase(),toUpper=a=>a.toUpperCase(),test=(a3,b3)=>{if(b3===void 0){return c3=>test(a3,c3);}return b3.search(a3)===-1?!1:!0;},trim=d3=>d3.trim(),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";}return"Object";},values=e3=>{const f3=[];for(key in e3){f3.push(e3[key]);}return f3;},uniq=g3=>{let h3=-1;const i3=[];while(++h3<g3.length){const j3=g3[h3];if(!contains(j3,i3)){i3.push(j3);}}return i3;},update=(k3,l3,m3)=>{if(l3===void 0){return(n3,o3)=>update(k3,n3,o3);}else if(m3===void 0){return p3=>update(k3,l3,p3);}const q3=m3;return q3.fill(l3,k3,k3+1);};module.exports.add=add;module.exports.adjust=adjust;module.exports.any=any;module.exports.append=append;module.exports.compose=compose;module.exports.contains=contains;module.exports.drop=drop;module.exports.dropLast=dropLast;module.exports.equals=equals;module.exports.filter=filter;module.exports.find=find;module.exports.findIndex=findIndex;module.exports.flatten=flatten;module.exports.head=head;module.exports.indexOf=indexOf;module.exports.init=init;module.exports.join=join;module.exports.last=last;module.exports.length=length;module.exports.map=map;module.exports.match=match;module.exports.merge=merge;module.exports.omit=omit;module.exports.path=path;module.exports.pick=pick;module.exports.prepend=prepend;module.exports.prop=prop;module.exports.propEq=propEq;module.exports.range=range;module.exports.repeat=repeat;module.exports.replace=replace;module.exports.sort=sort;module.exports.sortBy=sortBy;module.exports.split=split;module.exports.splitEvery=splitEvery;module.exports.subtract=subtract;module.exports.tail=tail;module.exports.take=take;module.exports.takeLast=takeLast;module.exports.test=test;module.exports.toLower=toLower;module.exports.toUpper=toUpper;module.exports.trim=trim;module.exports.type=type;module.exports.uniq=uniq;module.exports.update=update;module.exports.values=values;
function add(a,b){if(b===void 0){return c=>add(a,c);}return a+b;}function adjust(d,e,f){if(e===void 0){return(g,h)=>adjust(d,g,h);}else if(f===void 0){return j=>adjust(d,e,j);}return f.map((k,l)=>{if(l===e){return d(f[e]);}return k;});}function any(m,n){if(n===void 0){return o=>any(m,o);}let p=0;while(p<n.length){if(m(n[p])){return!0;}p++;}return!1;}function append(q,r){if(r===void 0){return s=>append(q,s);}const t=r;t.push(q);return t;}function isFunction(u){return typeof u==="function";}function compose(){const v=arguments;let w=v.length;while(w--){if(!isFunction(v[w])){throw new TypeError();}}return function(){let x=arguments,y=v.length;while(y--){x=[v[y].apply(this,x)];}return x[0];};}function filter(z,A){if(A===void 0){return B=>filter(z,B);}let C=-1,D=0;const E=A.length,F=[];while(++C<E){const G=A[C];if(z(G)){F[D++]=G;}}return F;}function find(H,I){if(I===void 0){return J=>find(H,J);}return I.find(H);}function findIndex(K,L){if(L===void 0){return M=>findIndex(K,M);}const N=L.length;let O=0;while(++O<N){if(K(L[O])){return O;}}return-1;}function flatten(P,Q){Q=Q===void 0?[]:Q;for(let i=0;i<P.length;i++){if(Array.isArray(P[i])){flatten(P[i],Q);}else{Q.push(P[i]);}}return Q;}function drop(R,S){if(S===void 0){return T=>drop(R,T);}const U=S;return U.slice(R);}function dropLast(V,W){if(W===void 0){return X=>dropLast(V,X);}const Y=W;return Y.slice(0,-V);}function equals(a,b){if(b===void 0){return Z=>equals(a,Z);}else if(a===b){return a!==0||1/a===1/b;}const a1=type(a);if(a1!==type(b)){return!1;}if(a1==="Array"){const b1=a,c1=b;return b1.sort().toString()===c1.sort().toString();}if(a1==="Object"){const d1=Object.keys(a);if(d1.length===Object.keys(b).length){if(d1.length===0){return!0;}let e1=!0;d1.map(f1=>{if(e1){const g1=type(a[f1]),h1=type(b[f1]);if(g1===h1){if(g1==="Object"){if(Object.keys(a[f1]).length===Object.keys(b[f1]).length){if(Object.keys(a[f1]).length!==0){if(!equals(a[f1],b[f1])){e1=!1;}}}else{e1=!1;}}else if(!equals(a[f1],b[f1])){e1=!1;}}else{e1=!1;}}});return e1;}}return!1;}function contains(i1,j1){if(j1===void 0){return k1=>contains(i1,k1);}let l1=-1,m1=!1;while(++l1<j1.length&&!m1){if(equals(j1[l1],i1)){m1=!0;}}return m1;}function head(a){if(typeof a==="string"){return a[0]||"";}return a[0];}function indexOf(n1,o1){if(o1===void 0){return p1=>indexOf(n1,p1);}let q1=-1;const r1=o1.length;while(++q1<r1){if(o1[q1]===n1){return q1;}}return-1;}function baseSlice(s1,t1,u1){let v1=-1,w1=s1.length;u1=u1>w1?w1:u1;if(u1<0){u1+=w1;}w1=t1>u1?0:u1-t1>>>0;t1>>>=0;const x1=Array(w1);while(++v1<w1){x1[v1]=s1[v1+t1];}return x1;}function init(a){if(typeof a==="string"){return a.slice(0,-1);}return a.length?baseSlice(a,0,-1):[];}function join(y1,z1){if(z1===void 0){return A1=>join(y1,A1);}return z1.join(y1);}function map(fn,C1){if(C1===void 0){return D1=>map(fn,D1);}let E1=-1;const F1=C1.length,G1=Array(F1);while(++E1<F1){G1[E1]=fn(C1[E1]);}return G1;}function last(a){if(typeof a==="string"){return a[a.length-1]||"";}return a[a.length-1];}function length(H1){return H1.length;}function match(I1,J1){if(J1===void 0){return K1=>match(I1,K1);}const L1=J1.match(I1);return L1===null?[]:L1;}function merge(M1,N1){if(N1===void 0){return O1=>merge(M1,O1);}return Object.assign({},M1,N1);}function omit(P1,Q1){if(Q1===void 0){return R1=>omit(P1,R1);}const S1={};for(key in Q1){if(!P1.includes(key)){S1[key]=Q1[key];}}return S1;}function path(T1,U1){if(U1===void 0){return V1=>path(T1,V1);}let W1=U1,X1=0;while(X1<T1.length){if(W1===null){return void 0;}W1=W1[T1[X1]];X1++;}return W1;}function pick(Y1,Z1){if(Z1===void 0){return a2=>pick(Y1,a2);}const b2={};let c2=0;while(c2<Y1.length){if(Y1[c2]in Z1){b2[Y1[c2]]=Z1[Y1[c2]];}c2++;}return b2;}function prepend(d2,e2){if(e2===void 0){return f2=>prepend(d2,f2);}const g2=e2;g2.unshift(d2);return g2;}function prop(h2,i2){if(i2===void 0){return j2=>prop(h2,j2);}return i2[h2];}function propEq(k2,l2,m2){if(l2===void 0){return(n2,o2)=>propEq(k2,n2,o2);}else if(m2===void 0){return p2=>propEq(k2,l2,p2);}return m2[k2]===l2;}function range(q2,r2){const s2=[];for(let i=q2;i<r2;i++){s2.push(i);}return s2;}function repeat(a,t2){if(t2===void 0){return u2=>repeat(a,u2);}const v2=Array(t2);return v2.fill(a);}function replace(w2,x2,y2){if(x2===void 0){return(z2,A2)=>replace(w2,z2,A2);}else if(y2===void 0){return B2=>replace(w2,x2,B2);}return y2.replace(w2,x2);}function subtract(a,b){if(b===void 0){return C2=>subtract(a,C2);}return a-b;}function sort(fn,E2){if(E2===void 0){return F2=>sort(fn,F2);}const G2=E2;return G2.sort(fn);}function sortBy(fn,I2){if(I2===void 0){return J2=>sortBy(fn,J2);}const K2=I2;return K2.sort((a,b)=>{const L2=fn(a),M2=fn(b);return L2<M2?-1:L2>M2?1:0;});}function split(N2,O2){if(O2===void 0){return P2=>split(N2,P2);}return O2.split(N2);}function splitEvery(Q2,a){if(a===void 0){return R2=>splitEvery(Q2,R2);}Q2=Q2>1?Q2:1;const S2=[];let T2=0;while(T2<a.length){S2.push(a.slice(T2,T2+=Q2));}return S2;}function tail(U2){return drop(1,U2);}function take(V2,a){if(a===void 0){return W2=>take(V2,W2);}else if(typeof a==="string"){return a.slice(0,V2);}return baseSlice(a,0,V2);}function takeLast(X2,a){if(a===void 0){return Y2=>takeLast(X2,Y2);}const Z2=a.length;X2=X2>Z2?Z2:X2;if(typeof a==="string"){return a.slice(Z2-X2);}X2=Z2-X2;return baseSlice(a,X2,Z2);}function toLower(a3){return a3.toLowerCase();}function toUpper(b3){return b3.toUpperCase();}function test(c3,d3){if(d3===void 0){return e3=>test(c3,e3);}return d3.search(c3)===-1?!1:!0;}function trim(f3){return f3.trim();}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";}return"Object";}function values(g3){const h3=[];for(key in g3){h3.push(g3[key]);}return h3;}function uniq(i3){let j3=-1;const k3=[];while(++j3<i3.length){const l3=i3[j3];if(!contains(l3,k3)){k3.push(l3);}}return k3;}function update(m3,n3,o3){if(n3===void 0){return(p3,q3)=>update(m3,p3,q3);}else if(o3===void 0){return r3=>update(m3,n3,r3);}const s3=o3;return s3.fill(n3,m3,m3+1);}module.exports.add=add;module.exports.adjust=adjust;module.exports.any=any;module.exports.append=append;module.exports.compose=compose;module.exports.contains=contains;module.exports.drop=drop;module.exports.dropLast=dropLast;module.exports.equals=equals;module.exports.filter=filter;module.exports.find=find;module.exports.findIndex=findIndex;module.exports.flatten=flatten;module.exports.head=head;module.exports.indexOf=indexOf;module.exports.init=init;module.exports.join=join;module.exports.last=last;module.exports.length=length;module.exports.map=map;module.exports.match=match;module.exports.merge=merge;module.exports.omit=omit;module.exports.path=path;module.exports.pick=pick;module.exports.prepend=prepend;module.exports.prop=prop;module.exports.propEq=propEq;module.exports.range=range;module.exports.repeat=repeat;module.exports.replace=replace;module.exports.sort=sort;module.exports.sortBy=sortBy;module.exports.split=split;module.exports.splitEvery=splitEvery;module.exports.subtract=subtract;module.exports.tail=tail;module.exports.take=take;module.exports.takeLast=takeLast;module.exports.test=test;module.exports.toLower=toLower;module.exports.toUpper=toUpper;module.exports.trim=trim;module.exports.type=type;module.exports.uniq=uniq;module.exports.update=update;module.exports.values=values;
{
"name": "rambda",
"version": "0.4.0",
"version": "0.4.1",
"description": "Lightweight alternative to Ramda",

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

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

const add = (a, b) => {
function add(a, b){
if (b === undefined) {

@@ -9,3 +9,3 @@ return c => add(a, c)

const adjust = (fn, index, arr) => {
function adjust(fn, index, arr){
if (index === undefined) {

@@ -26,3 +26,3 @@ return (indexHolder, arrHolder) => adjust(fn, indexHolder, arrHolder)

const any = (fn, arr) => {
function any(fn, arr){
if (arr === undefined) {

@@ -43,3 +43,3 @@ return holder => any(fn, holder)

const append = (val, arr) => {
function append (val, arr) {
if (arr === undefined) {

@@ -54,4 +54,7 @@ return holder => append(val, holder)

const isFunction = value => typeof value === "function"
function isFunction(value){
return typeof value === "function"
}
function compose () {

@@ -79,4 +82,20 @@ const funcs = arguments

const filter = (fn, arr) => {
function contains(val, arr) {
if (arr === undefined) {
return holder => contains(val, holder)
}
let index = -1
let flag = false
while (++index < arr.length && !flag) {
if (equals(arr[ index ], val)) {
flag = true
}
}
return flag
}
function filter(fn, arr) {
if (arr === undefined) {
return holder => filter(fn, holder)

@@ -87,9 +106,6 @@ }

let resIndex = 0
const length = arr === null ?
0 :
arr.length
const len = arr.length
const willReturn = []
while (++index < length) {
while (++index < len) {
const value = arr[ index ]

@@ -104,3 +120,3 @@ if (fn(value)) {

const find = (fn, arr) => {
function find(fn, arr){
if (arr === undefined) {

@@ -113,3 +129,3 @@ return holder => find(fn, holder)

const findIndex = (fn, arr) => {
function findIndex(fn, arr){
if (arr === undefined) {

@@ -131,3 +147,3 @@ return holder => findIndex(fn, holder)

const flatten = (ary, ret) => {
function flatten(ary, ret){
ret = ret === undefined ?

@@ -147,3 +163,3 @@ [] :

const drop = (dropNumber, arr) => {
function drop(dropNumber, arr){
if (arr === undefined) {

@@ -157,3 +173,3 @@ return holder => drop(dropNumber, holder)

const dropLast = (dropNumber, arr) => {
function dropLast(dropNumber, arr){
if (arr === undefined) {

@@ -167,3 +183,3 @@ return holder => dropLast(dropNumber, holder)

const equals = (a, b) => {
function equals(a, b) {
if (b === undefined) {

@@ -224,19 +240,3 @@ return holder => equals(a, holder)

const contains = (val, arr) => {
if (arr === undefined) {
return holder => contains(val, holder)
}
let index = -1
let flag = false
while (++index < arr.length && !flag) {
if (equals(arr[ index ], val)) {
flag = true
}
}
return flag
}
const head = a => {
function head(a){
if (typeof a === "string") {

@@ -249,3 +249,3 @@ return a[ 0 ] || ""

const indexOf = (question, arr) => {
function indexOf(question, arr) {
if (arr === undefined) {

@@ -267,9 +267,6 @@ return holder => indexOf(question, holder)

const baseSlice = (array, start, end) => {
let index = -1,
length = array.length
function baseSlice(array, start, end) {
let index = -1
let length = array.length
if (start < 0) {
start = -start > length ? 0 : length + start
}
end = end > length ? length : end

@@ -290,3 +287,3 @@ if (end < 0) {

const init = a => {
function init(a){
if (typeof a === "string") {

@@ -299,3 +296,3 @@ return a.slice(0, -1)

const join = (glue, arr) => {
function join(glue, arr) {
if (arr === undefined) {

@@ -308,3 +305,3 @@ return holder => join(glue, holder)

const map = (fn, arr) => {
function map(fn, arr) {
if (arr === undefined) {

@@ -325,3 +322,3 @@ return holder => map(fn, holder)

const last = a => {
function last(a){
if (typeof a === "string") {

@@ -334,5 +331,7 @@ return a[ a.length - 1 ] || ""

const length = arr => arr.length
function length(arr){
return arr.length
}
const match = (regex, str) => {
function match(regex, str) {
if (str === undefined) {

@@ -348,3 +347,3 @@ return holder => match(regex, holder)

const merge = (obj, newProps) => {
function merge(obj, newProps) {
if (newProps === undefined) {

@@ -357,3 +356,3 @@ return holder => merge(obj, holder)

const omit = (keys, obj) => {
function omit(keys, obj){
if (obj === undefined) {

@@ -373,3 +372,3 @@ return holder => omit(keys, holder)

const path = (pathArr, obj) => {
function path(pathArr, obj) {
if (obj === undefined) {

@@ -392,3 +391,3 @@ return holder => path(pathArr, holder)

const pick = (keys, obj) => {
function pick(keys, obj) {
if (obj === undefined) {

@@ -409,3 +408,3 @@ return holder => pick(keys, holder)

const prepend = (val, arr) => {
function prepend(val, arr) {
if (arr === undefined) {

@@ -421,3 +420,3 @@ return holder => prepend(val, holder)

const prop = (key, obj) => {
function prop(key, obj) {
if (obj === undefined) {

@@ -430,3 +429,3 @@ return holder => prop(key, holder)

const propEq = (key, val, obj) => {
function propEq(key, val, obj) {
if (val === undefined) {

@@ -441,3 +440,3 @@ return (valHolder, objHolder) => propEq(key, valHolder, objHolder)

const range = (start, end) => {
function range(start, end) {
const willReturn = []

@@ -451,3 +450,3 @@ for (let i = start; i < end; i++) {

const repeat = (a, num) => {
function repeat(a, num) {
if (num === undefined) {

@@ -461,3 +460,3 @@ return holder => repeat(a, holder)

const replace = (regex, replacer, str) => {
function replace(regex, replacer, str) {
if (replacer === undefined) {

@@ -472,3 +471,3 @@ return (replacerHolder, strHolder) => replace(regex, replacerHolder, strHolder)

const subtract = (a, b) => {
function subtract(a, b) {
if (b === undefined) {

@@ -481,3 +480,3 @@ return holder => subtract(a, holder)

const sort = (fn, arr) => {
function sort(fn, arr) {
if (arr === undefined) {

@@ -491,3 +490,3 @@ return holder => sort(fn, holder)

const sortBy = (fn, arr) => {
function sortBy(fn, arr) {
if (arr === undefined) {

@@ -501,3 +500,2 @@ return holder => sortBy(fn, holder)

const fnB = fn(b)
return fnA < fnB ?

@@ -511,3 +509,3 @@ -1 :

const split = (glue, str) => {
function split(glue, str) {
if (str === undefined) {

@@ -520,3 +518,3 @@ return holder => split(glue, holder)

const splitEvery = (num, a) => {
function splitEvery(num, a) {
if (a === undefined) {

@@ -526,4 +524,5 @@ return holder => splitEvery(num, holder)

num = num > 1 ?
num :
1
num :
1
const willReturn = []

@@ -538,5 +537,7 @@ let counter = 0

const tail = arr => drop(1, arr)
function tail(arr){
return drop(1, arr)
}
const take = (takeNumber, a) => {
function take(takeNumber, a) {
if (a === undefined) {

@@ -551,3 +552,3 @@ return holder => take(takeNumber, holder)

const takeLast = (takeNumber, a) => {
function takeLast(takeNumber, a) {
if (a === undefined) {

@@ -569,7 +570,11 @@ return holder => takeLast(takeNumber, holder)

const toLower = a => a.toLowerCase()
function toLower(str){
return str.toLowerCase()
}
const toUpper = a => a.toUpperCase()
function toUpper(str){
return str.toUpperCase()
}
const test = (regex, str) => {
function test(regex, str){
if (str === undefined) {

@@ -584,5 +589,7 @@ return holder => test(regex, holder)

const trim = str => str.trim()
function trim(str){
return str.trim()
}
const type = a => {
function type(a){
if (a === null) {

@@ -607,3 +614,3 @@ return "Null"

const values = obj => {
function values(obj){
const willReturn = []

@@ -617,3 +624,3 @@ for (key in obj) {

const uniq = arr => {
function uniq(arr){
let index = -1

@@ -631,3 +638,3 @@ const willReturn = []

const update = (index, newValue, arr) => {
function update(index, newValue, arr){
if (newValue === undefined) {

@@ -634,0 +641,0 @@ return (newValueHolder, arrHolder) => update(index, newValueHolder, arrHolder)

@@ -34,3 +34,3 @@ [![Build Status](https://travis-ci.org/selfrefactor/ils.svg?branch=master)](https://travis-ci.org/selfrefactor/rambda)

```
https://unpkg.com/rambda@0.4.0/webVersion.js
https://unpkg.com/rambda@0.4.1/webVersion.js
```

@@ -37,0 +37,0 @@

@@ -66,3 +66,3 @@ const Ramda = require("ramda")

it("contains", () => {
expect(R.contains(3, [ 1, 2, 3 ])).toBeTruthy()
expect(R.contains(3)([ 1, 2, 3 ])).toBeTruthy()
expect(R.contains(4, [ 1, 2, 3 ])).toBeFalsy()

@@ -72,2 +72,6 @@ expect(R.contains([ 42 ], [ [ 42 ] ])).toBeTruthy()

it("compose", () => {
expect(() => { R.compose(3, [ 1, 2, 3 ]) }).toThrow()
})
it("drop", () => {

@@ -77,3 +81,3 @@ expect(

).toEqual([ "bar", "baz" ])
expect(R.drop(2, [ "foo", "bar", "baz" ])).toEqual([ "baz" ])
expect(R.drop(2)([ "foo", "bar", "baz" ])).toEqual([ "baz" ])
expect(R.drop(3, [ "foo", "bar", "baz" ])).toEqual([])

@@ -86,3 +90,3 @@ expect(R.drop(4, [ "foo", "bar", "baz" ])).toEqual([])

expect(R.dropLast(1, [ "foo", "bar", "baz" ])).toEqual([ "foo", "bar" ])
expect(R.dropLast(2, [ "foo", "bar", "baz" ])).toEqual([ "foo" ])
expect(R.dropLast(2)([ "foo", "bar", "baz" ])).toEqual([ "foo" ])
expect(R.dropLast(3, [ "foo", "bar", "baz" ])).toEqual([])

@@ -119,2 +123,10 @@ expect(R.dropLast(4, [ "foo", "bar", "baz" ])).toEqual([])

expect(
R.equals({ a:1, b:2 }, { a:1, b:1 })
).toBeFalsy()
expect(
R.equals({ a:1, b:false }, { a:1, b:1 })
).toBeFalsy()
expect(
R.equals({ a:1, b:2 }, { b:2, a:1, c:3 })

@@ -136,2 +148,6 @@ ).toBeFalsy()

expect(
R.equals({ a:{ b:{ c:1 } } }, { a:{ b:{ c:2 } } })
).toBeFalsy()
expect(
R.equals({ a:{} }, { a:{} })

@@ -392,2 +408,6 @@ ).toBeTruthy()

).toEqual([ "yes", "foo", "bar", "baz" ])
expect(
R.prepend("foo")([ ])
).toEqual(["foo"])
})

@@ -440,2 +460,5 @@

expect(
R.repeat("")(3)
).toEqual([ "", "", "" ])
expect(
R.repeat("foo", 3)

@@ -507,2 +530,14 @@ ).toEqual([ "foo", "foo", "foo" ])

).toEqual([ { a:0 }, { a:1 }, { a:2 } ])
expect(
R.sortBy(val => val.a, [ { a:1 }, { a:1 }, { a:1 } ])
).toEqual([ { a:1 }, { a:1 }, { a:1 } ])
expect(
R.sortBy(val => val.a, [ { a:3 }, { a:2 }, { a:1 } ])
).toEqual([ { a:1 }, { a:2 }, { a:3 } ])
expect(
R.sortBy(val => val.a, [ { a:1 }, { a:2 }, { a:3 } ])
).toEqual([ { a:1 }, { a:2 }, { a:3 } ])
})

@@ -530,2 +565,6 @@

).toEqual([ "foo", "bar", "baz" ])
expect(
R.splitEvery(0)("foo")
).toEqual([ "f", "o", "o" ])
})

@@ -537,2 +576,5 @@

).toEqual(1)
expect(
R.subtract(2)(1)
).toEqual(1)
})

@@ -571,11 +613,15 @@

it("takeLast", () => {
expect(
R.takeLast(1, [ "foo", "bar", "baz" ])
).toEqual([ "baz" ])
expect(
R.takeLast(2)([ "foo", "bar", "baz" ])
).toEqual([ "bar", "baz" ])
expect(
R.takeLast(3, [ "foo", "bar", "baz" ])
).toEqual([ "foo", "bar", "baz" ])
expect(

@@ -582,0 +628,0 @@ R.takeLast(4, [ "foo", "bar", "baz" ])

@@ -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=1);}([function(s,t){const add=(a,b)=>{if(b===void 0){return c=>add(a,c);}return a+b;},adjust=(u,v,w)=>{if(v===void 0){return(x,y)=>adjust(u,x,y);}else if(w===void 0){return z=>adjust(u,v,z);}return w.map((A,B)=>{if(B===v){return u(w[v]);}return A;});},any=(C,D)=>{if(D===void 0){return E=>any(C,E);}let F=0;while(F<D.length){if(C(D[F])){return!0;}F++;}return!1;},append=(G,H)=>{if(H===void 0){return I=>append(G,I);}const J=H;J.push(G);return J;},isFunction=K=>typeof K==="function";function compose(){const L=arguments;let M=L.length;while(M--){if(!isFunction(L[M])){throw new TypeError();}}return function(){let N=arguments,O=L.length;while(O--){N=[L[O].apply(this,N)];}return N[0];};}const filter=(P,Q)=>{if(Q===void 0){return S=>filter(P,S);}let T=-1,U=0;const V=Q===null?0:Q.length,W=[];while(++T<V){const X=Q[T];if(P(X)){W[U++]=X;}}return W;},find=(Y,Z)=>{if(Z===void 0){return a1=>find(Y,a1);}return Z.find(Y);},findIndex=(fn,c1)=>{if(c1===void 0){return d1=>findIndex(fn,d1);}const e1=c1.length;let f1=0;while(++f1<e1){if(fn(c1[f1])){return f1;}}return-1;},flatten=(g1,h1)=>{h1=h1===void 0?[]:h1;for(let i=0;i<g1.length;i++){if(Array.isArray(g1[i])){flatten(g1[i],h1);}else{h1.push(g1[i]);}}return h1;},drop=(i1,j1)=>{if(j1===void 0){return k1=>drop(i1,k1);}const l1=j1;return l1.slice(i1);},dropLast=(m1,n1)=>{if(n1===void 0){return o1=>dropLast(m1,o1);}const p1=n1;return p1.slice(0,-m1);},equals=(a,b)=>{if(b===void 0){return q1=>equals(a,q1);}else if(a===b){return a!==0||1/a===1/b;}const r1=type(a);if(r1!==type(b)){return!1;}if(r1==="Array"){const s1=a,t1=b;return s1.sort().toString()===t1.sort().toString();}if(r1==="Object"){const u1=Object.keys(a);if(u1.length===Object.keys(b).length){if(u1.length===0){return!0;}let v1=!0;u1.map(w1=>{if(v1){const x1=type(a[w1]),y1=type(b[w1]);if(x1===y1){if(x1==="Object"){if(Object.keys(a[w1]).length===Object.keys(b[w1]).length){if(Object.keys(a[w1]).length!==0){if(!equals(a[w1],b[w1])){v1=!1;}}}else{v1=!1;}}else if(!equals(a[w1],b[w1])){v1=!1;}}else{v1=!1;}}});return v1;}}return!1;},contains=(z1,A1)=>{if(A1===void 0){return B1=>contains(z1,B1);}let C1=-1,D1=!1;while(++C1<A1.length&&!D1){if(equals(A1[C1],z1)){D1=!0;}}return D1;},head=a=>{if(typeof a==="string"){return a[0]||"";}return a[0];},indexOf=(E1,F1)=>{if(F1===void 0){return G1=>indexOf(E1,G1);}let H1=-1;const I1=F1.length;while(++H1<I1){if(F1[H1]===E1){return H1;}}return-1;},baseSlice=(J1,K1,L1)=>{let M1=-1,N1=J1.length;if(K1<0){K1=-K1>N1?0:N1+K1;}L1=L1>N1?N1:L1;if(L1<0){L1+=N1;}N1=K1>L1?0:L1-K1>>>0;K1>>>=0;const O1=Array(N1);while(++M1<N1){O1[M1]=J1[M1+K1];}return O1;},init=a=>{if(typeof a==="string"){return a.slice(0,-1);}return a.length?baseSlice(a,0,-1):[];},join=(P1,Q1)=>{if(Q1===void 0){return R1=>join(P1,R1);}return Q1.join(P1);},map=(fn,T1)=>{if(T1===void 0){return U1=>map(fn,U1);}let V1=-1;const W1=T1.length,X1=Array(W1);while(++V1<W1){X1[V1]=fn(T1[V1]);}return X1;},last=a=>{if(typeof a==="string"){return a[a.length-1]||"";}return a[a.length-1];},length=Y1=>Y1.length,match=(Z1,a2)=>{if(a2===void 0){return b2=>match(Z1,b2);}const c2=a2.match(Z1);return c2===null?[]:c2;},merge=(d2,e2)=>{if(e2===void 0){return f2=>merge(d2,f2);}return Object.assign({},d2,e2);},omit=(g2,h2)=>{if(h2===void 0){return i2=>omit(g2,i2);}const j2={};for(key in h2){if(!g2.includes(key)){j2[key]=h2[key];}}return j2;},path=(k2,l2)=>{if(l2===void 0){return m2=>path(k2,m2);}let n2=l2,o2=0;while(o2<k2.length){if(n2===null){return void 0;}n2=n2[k2[o2]];o2++;}return n2;},pick=(p2,q2)=>{if(q2===void 0){return r2=>pick(p2,r2);}const s2={};let t2=0;while(t2<p2.length){if(p2[t2]in q2){s2[p2[t2]]=q2[p2[t2]];}t2++;}return s2;},prepend=(u2,v2)=>{if(v2===void 0){return w2=>prepend(u2,w2);}const x2=v2;x2.unshift(u2);return x2;},prop=(y2,z2)=>{if(z2===void 0){return A2=>prop(y2,A2);}return z2[y2];},propEq=(B2,C2,D2)=>{if(C2===void 0){return(E2,F2)=>propEq(B2,E2,F2);}else if(D2===void 0){return G2=>propEq(B2,C2,G2);}return D2[B2]===C2;},range=(H2,I2)=>{const J2=[];for(let i=H2;i<I2;i++){J2.push(i);}return J2;},repeat=(a,K2)=>{if(K2===void 0){return L2=>repeat(a,L2);}const M2=Array(K2);return M2.fill(a);},replace=(N2,O2,P2)=>{if(O2===void 0){return(Q2,R2)=>replace(N2,Q2,R2);}else if(P2===void 0){return S2=>replace(N2,O2,S2);}return P2.replace(N2,O2);},subtract=(a,b)=>{if(b===void 0){return T2=>subtract(a,T2);}return a-b;},sort=(fn,V2)=>{if(V2===void 0){return W2=>sort(fn,W2);}const X2=V2;return X2.sort(fn);},sortBy=(fn,Z2)=>{if(Z2===void 0){return a3=>sortBy(fn,a3);}const b3=Z2;return b3.sort((a,b)=>{const c3=fn(a),d3=fn(b);return c3<d3?-1:c3>d3?1:0;});},split=(e3,f3)=>{if(f3===void 0){return g3=>split(e3,g3);}return f3.split(e3);},splitEvery=(h3,a)=>{if(a===void 0){return i3=>splitEvery(h3,i3);}h3=h3>1?h3:1;const j3=[];let k3=0;while(k3<a.length){j3.push(a.slice(k3,k3+=h3));}return j3;},tail=l3=>drop(1,l3),take=(m3,a)=>{if(a===void 0){return n3=>take(m3,n3);}else if(typeof a==="string"){return a.slice(0,m3);}return baseSlice(a,0,m3);},takeLast=(o3,a)=>{if(a===void 0){return p3=>takeLast(o3,p3);}const q3=a.length;o3=o3>q3?q3:o3;if(typeof a==="string"){return a.slice(q3-o3);}o3=q3-o3;return baseSlice(a,o3,q3);},toLower=a=>a.toLowerCase(),toUpper=a=>a.toUpperCase(),test=(r3,s3)=>{if(s3===void 0){return t3=>test(r3,t3);}return s3.search(r3)===-1?!1:!0;},trim=u3=>u3.trim(),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";}return"Object";},values=v3=>{const w3=[];for(key in v3){w3.push(v3[key]);}return w3;},uniq=x3=>{let y3=-1;const z3=[];while(++y3<x3.length){const A3=x3[y3];if(!contains(A3,z3)){z3.push(A3);}}return z3;},update=(B3,C3,D3)=>{if(C3===void 0){return(E3,F3)=>update(B3,E3,F3);}else if(D3===void 0){return G3=>update(B3,C3,G3);}const H3=D3;return H3.fill(C3,B3,B3+1);};s.exports.add=add;s.exports.adjust=adjust;s.exports.any=any;s.exports.append=append;s.exports.compose=compose;s.exports.contains=contains;s.exports.drop=drop;s.exports.dropLast=dropLast;s.exports.equals=equals;s.exports.filter=filter;s.exports.find=find;s.exports.findIndex=findIndex;s.exports.flatten=flatten;s.exports.head=head;s.exports.indexOf=indexOf;s.exports.init=init;s.exports.join=join;s.exports.last=last;s.exports.length=length;s.exports.map=map;s.exports.match=match;s.exports.merge=merge;s.exports.omit=omit;s.exports.path=path;s.exports.pick=pick;s.exports.prepend=prepend;s.exports.prop=prop;s.exports.propEq=propEq;s.exports.range=range;s.exports.repeat=repeat;s.exports.replace=replace;s.exports.sort=sort;s.exports.sortBy=sortBy;s.exports.split=split;s.exports.splitEvery=splitEvery;s.exports.subtract=subtract;s.exports.tail=tail;s.exports.take=take;s.exports.takeLast=takeLast;s.exports.test=test;s.exports.toLower=toLower;s.exports.toUpper=toUpper;s.exports.trim=trim;s.exports.type=type;s.exports.uniq=uniq;s.exports.update=update;s.exports.values=values;},function(I3,J3,K3){const R=K3(0);I3.exports={R:R};}]);});
(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=1);}([function(s,t){function add(a,b){if(b===void 0){return c=>add(a,c);}return a+b;}function adjust(u,v,w){if(v===void 0){return(x,y)=>adjust(u,x,y);}else if(w===void 0){return z=>adjust(u,v,z);}return w.map((A,B)=>{if(B===v){return u(w[v]);}return A;});}function any(C,D){if(D===void 0){return E=>any(C,E);}let F=0;while(F<D.length){if(C(D[F])){return!0;}F++;}return!1;}function append(G,H){if(H===void 0){return I=>append(G,I);}const J=H;J.push(G);return J;}function isFunction(K){return typeof K==="function";}function compose(){const L=arguments;let M=L.length;while(M--){if(!isFunction(L[M])){throw new TypeError();}}return function(){let N=arguments,O=L.length;while(O--){N=[L[O].apply(this,N)];}return N[0];};}function filter(P,Q){if(Q===void 0){return S=>filter(P,S);}let T=-1,U=0;const V=Q.length,W=[];while(++T<V){const X=Q[T];if(P(X)){W[U++]=X;}}return W;}function find(Y,Z){if(Z===void 0){return a1=>find(Y,a1);}return Z.find(Y);}function findIndex(fn,c1){if(c1===void 0){return d1=>findIndex(fn,d1);}const e1=c1.length;let f1=0;while(++f1<e1){if(fn(c1[f1])){return f1;}}return-1;}function flatten(g1,h1){h1=h1===void 0?[]:h1;for(let i=0;i<g1.length;i++){if(Array.isArray(g1[i])){flatten(g1[i],h1);}else{h1.push(g1[i]);}}return h1;}function drop(i1,j1){if(j1===void 0){return k1=>drop(i1,k1);}const l1=j1;return l1.slice(i1);}function dropLast(m1,n1){if(n1===void 0){return o1=>dropLast(m1,o1);}const p1=n1;return p1.slice(0,-m1);}function equals(a,b){if(b===void 0){return q1=>equals(a,q1);}else if(a===b){return a!==0||1/a===1/b;}const r1=type(a);if(r1!==type(b)){return!1;}if(r1==="Array"){const s1=a,t1=b;return s1.sort().toString()===t1.sort().toString();}if(r1==="Object"){const u1=Object.keys(a);if(u1.length===Object.keys(b).length){if(u1.length===0){return!0;}let v1=!0;u1.map(w1=>{if(v1){const x1=type(a[w1]),y1=type(b[w1]);if(x1===y1){if(x1==="Object"){if(Object.keys(a[w1]).length===Object.keys(b[w1]).length){if(Object.keys(a[w1]).length!==0){if(!equals(a[w1],b[w1])){v1=!1;}}}else{v1=!1;}}else if(!equals(a[w1],b[w1])){v1=!1;}}else{v1=!1;}}});return v1;}}return!1;}function contains(z1,A1){if(A1===void 0){return B1=>contains(z1,B1);}let C1=-1,D1=!1;while(++C1<A1.length&&!D1){if(equals(A1[C1],z1)){D1=!0;}}return D1;}function head(a){if(typeof a==="string"){return a[0]||"";}return a[0];}function indexOf(E1,F1){if(F1===void 0){return G1=>indexOf(E1,G1);}let H1=-1;const I1=F1.length;while(++H1<I1){if(F1[H1]===E1){return H1;}}return-1;}function baseSlice(J1,K1,L1){let M1=-1,N1=J1.length;L1=L1>N1?N1:L1;if(L1<0){L1+=N1;}N1=K1>L1?0:L1-K1>>>0;K1>>>=0;const O1=Array(N1);while(++M1<N1){O1[M1]=J1[M1+K1];}return O1;}function init(a){if(typeof a==="string"){return a.slice(0,-1);}return a.length?baseSlice(a,0,-1):[];}function join(P1,Q1){if(Q1===void 0){return R1=>join(P1,R1);}return Q1.join(P1);}function map(fn,T1){if(T1===void 0){return U1=>map(fn,U1);}let V1=-1;const W1=T1.length,X1=Array(W1);while(++V1<W1){X1[V1]=fn(T1[V1]);}return X1;}function last(a){if(typeof a==="string"){return a[a.length-1]||"";}return a[a.length-1];}function length(Y1){return Y1.length;}function match(Z1,a2){if(a2===void 0){return b2=>match(Z1,b2);}const c2=a2.match(Z1);return c2===null?[]:c2;}function merge(d2,e2){if(e2===void 0){return f2=>merge(d2,f2);}return Object.assign({},d2,e2);}function omit(g2,h2){if(h2===void 0){return i2=>omit(g2,i2);}const j2={};for(key in h2){if(!g2.includes(key)){j2[key]=h2[key];}}return j2;}function path(k2,l2){if(l2===void 0){return m2=>path(k2,m2);}let n2=l2,o2=0;while(o2<k2.length){if(n2===null){return void 0;}n2=n2[k2[o2]];o2++;}return n2;}function pick(p2,q2){if(q2===void 0){return r2=>pick(p2,r2);}const s2={};let t2=0;while(t2<p2.length){if(p2[t2]in q2){s2[p2[t2]]=q2[p2[t2]];}t2++;}return s2;}function prepend(u2,v2){if(v2===void 0){return w2=>prepend(u2,w2);}const x2=v2;x2.unshift(u2);return x2;}function prop(y2,z2){if(z2===void 0){return A2=>prop(y2,A2);}return z2[y2];}function propEq(B2,C2,D2){if(C2===void 0){return(E2,F2)=>propEq(B2,E2,F2);}else if(D2===void 0){return G2=>propEq(B2,C2,G2);}return D2[B2]===C2;}function range(H2,I2){const J2=[];for(let i=H2;i<I2;i++){J2.push(i);}return J2;}function repeat(a,K2){if(K2===void 0){return L2=>repeat(a,L2);}const M2=Array(K2);return M2.fill(a);}function replace(N2,O2,P2){if(O2===void 0){return(Q2,R2)=>replace(N2,Q2,R2);}else if(P2===void 0){return S2=>replace(N2,O2,S2);}return P2.replace(N2,O2);}function subtract(a,b){if(b===void 0){return T2=>subtract(a,T2);}return a-b;}function sort(fn,V2){if(V2===void 0){return W2=>sort(fn,W2);}const X2=V2;return X2.sort(fn);}function sortBy(fn,Z2){if(Z2===void 0){return a3=>sortBy(fn,a3);}const b3=Z2;return b3.sort((a,b)=>{const c3=fn(a),d3=fn(b);return c3<d3?-1:c3>d3?1:0;});}function split(e3,f3){if(f3===void 0){return g3=>split(e3,g3);}return f3.split(e3);}function splitEvery(h3,a){if(a===void 0){return i3=>splitEvery(h3,i3);}h3=h3>1?h3:1;const j3=[];let k3=0;while(k3<a.length){j3.push(a.slice(k3,k3+=h3));}return j3;}function tail(l3){return drop(1,l3);}function take(m3,a){if(a===void 0){return n3=>take(m3,n3);}else if(typeof a==="string"){return a.slice(0,m3);}return baseSlice(a,0,m3);}function takeLast(o3,a){if(a===void 0){return p3=>takeLast(o3,p3);}const q3=a.length;o3=o3>q3?q3:o3;if(typeof a==="string"){return a.slice(q3-o3);}o3=q3-o3;return baseSlice(a,o3,q3);}function toLower(r3){return r3.toLowerCase();}function toUpper(s3){return s3.toUpperCase();}function test(t3,u3){if(u3===void 0){return v3=>test(t3,v3);}return u3.search(t3)===-1?!1:!0;}function trim(w3){return w3.trim();}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";}return"Object";}function values(x3){const y3=[];for(key in x3){y3.push(x3[key]);}return y3;}function uniq(z3){let A3=-1;const B3=[];while(++A3<z3.length){const C3=z3[A3];if(!contains(C3,B3)){B3.push(C3);}}return B3;}function update(D3,E3,F3){if(E3===void 0){return(G3,H3)=>update(D3,G3,H3);}else if(F3===void 0){return I3=>update(D3,E3,I3);}const J3=F3;return J3.fill(E3,D3,D3+1);}s.exports.add=add;s.exports.adjust=adjust;s.exports.any=any;s.exports.append=append;s.exports.compose=compose;s.exports.contains=contains;s.exports.drop=drop;s.exports.dropLast=dropLast;s.exports.equals=equals;s.exports.filter=filter;s.exports.find=find;s.exports.findIndex=findIndex;s.exports.flatten=flatten;s.exports.head=head;s.exports.indexOf=indexOf;s.exports.init=init;s.exports.join=join;s.exports.last=last;s.exports.length=length;s.exports.map=map;s.exports.match=match;s.exports.merge=merge;s.exports.omit=omit;s.exports.path=path;s.exports.pick=pick;s.exports.prepend=prepend;s.exports.prop=prop;s.exports.propEq=propEq;s.exports.range=range;s.exports.repeat=repeat;s.exports.replace=replace;s.exports.sort=sort;s.exports.sortBy=sortBy;s.exports.split=split;s.exports.splitEvery=splitEvery;s.exports.subtract=subtract;s.exports.tail=tail;s.exports.take=take;s.exports.takeLast=takeLast;s.exports.test=test;s.exports.toLower=toLower;s.exports.toUpper=toUpper;s.exports.trim=trim;s.exports.type=type;s.exports.uniq=uniq;s.exports.update=update;s.exports.values=values;},function(K3,L3,M3){const R=M3(0);K3.exports={R:R};}]);});
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