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.5.0 to 0.5.1

2

index.js

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

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

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

@@ -128,3 +128,3 @@ function add(a, b){

const length = arr.length
let index = 0
let index = -1

@@ -140,33 +140,32 @@ while (++index < length) {

function flatten(ary, ret){
ret = ret === undefined ?
function flatten(arr, willReturn){
willReturn = willReturn === undefined ?
[] :
ret
for (let i = 0; i < ary.length; i++) {
if (Array.isArray(ary[ i ])) {
flatten(ary[ i ], ret)
willReturn
for (let i = 0; i < arr.length; i++) {
if (Array.isArray(arr[ i ])) {
flatten(arr[ i ], willReturn)
} else {
ret.push(ary[ i ])
willReturn.push(arr[ i ])
}
}
return ret
return willReturn
}
function drop(dropNumber, arr){
if (arr === undefined) {
function drop(dropNumber, a){
if (a === undefined) {
return holder => drop(dropNumber, holder)
}
const arrClone = arr
return arrClone.slice(dropNumber)
return a.slice(dropNumber)
}
function dropLast(dropNumber, arr){
if (arr === undefined) {
function dropLast(dropNumber, a){
if (a === undefined) {
return holder => dropLast(dropNumber, holder)
}
const arrClone = arr
return arrClone.slice(0, -dropNumber)
return a.slice(0, -dropNumber)
}

@@ -176,4 +175,6 @@

if (b === undefined) {
return holder => equals(a, holder)
} else if (a === b) {
return a !== 0 || 1 / a === 1 / b

@@ -316,2 +317,3 @@ }

function length(arr){
return arr.length

@@ -457,3 +459,3 @@ }

}
const arrClone = arr
const arrClone = Array.from(arr)

@@ -467,3 +469,3 @@ return arrClone.sort(fn)

}
const arrClone = arr
const arrClone = Array.from(arr)

@@ -507,2 +509,3 @@ return arrClone.sort((a, b) => {

function tail(arr){
return drop(1, arr)

@@ -539,2 +542,3 @@ }

function toLower(str){
return str.toLowerCase()

@@ -544,2 +548,3 @@ }

function toUpper(str){
return str.toUpperCase()

@@ -554,7 +559,8 @@ }

return str.search(regex) === -1 ?
false :
true
false :
true
}
function trim(str){
return str.trim()

@@ -565,14 +571,21 @@ }

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 === undefined) {
return "Undefined"
} else if (a instanceof RegExp) {
return "RegExp"

@@ -612,3 +625,3 @@ }

}
const arrClone = arr
const arrClone = Array.from(arr)

@@ -615,0 +628,0 @@ return arrClone.fill(newValue, index, index + 1)

@@ -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.5.0/webVersion.js
https://unpkg.com/rambda@0.5.1/webVersion.js
```

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

const Ramda = require("ramda")
const R = require("./rambda")
describe("common cases", () => {

@@ -206,2 +207,6 @@ it("works with Ramda's flip", () => {

expect(
R.findIndex(R.propEq("a", 1))([ { a: 1 }, { a: 2 }, { a: 3 } ])
).toEqual(0)
expect(
R.findIndex(R.propEq("a", 4))([ { a: 1 }, { a: 2 }, { a: 3 } ])

@@ -208,0 +213,0 @@ ).toEqual(-1)

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