Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kyanite

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kyanite - npm Package Compare versions

Comparing version 0.12.1 to 0.12.2

src/function/notEq.js

11

CHANGELOG.md
# Changelog
## v0.12.2
### New
- Added `propEq` function which takes a object property value and compares it against a given value to see if it's equal
- Added `notEq` function which checks if the provided values are not equal to each other
### Fixed
- The documentation for `and` should now reflect correctly on the return and params
## v0.12.1

@@ -4,0 +15,0 @@

@@ -862,2 +862,7 @@ (function (global, factory) {

var notEq = function notEq(a, b) {
return complement$1(eq$1(a), b);
};
var notEq$1 = _curry2(notEq);
var or = function or(a, b) {

@@ -1136,2 +1141,7 @@ return a || b;

var propEq = function propEq(key, val, obj) {
return compose$1(eq$1(val), prop$1(key), obj);
};
var propEq$1 = _curry3(propEq);
var props = function props(keys, obj) {

@@ -1309,2 +1319,3 @@ return map$1(function (k) {

exports.not = not;
exports.notEq = notEq$1;
exports.nth = nth$1;

@@ -1325,2 +1336,3 @@ exports.omit = omit$1;

exports.prop = prop$1;
exports.propEq = propEq$1;
exports.props = props$1;

@@ -1327,0 +1339,0 @@ exports.range = range$1;

2

dist/kyanite.min.js

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

!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((n=n||self).kyanite={})}(this,function(n){"use strict";function r(n){return function r(t,e){return arguments.length?1===arguments.length?function(r){return n(t,r)}:n(t,e):r}}var t=function(n,r){return n.push(r),n},e=r(function(n,r){return r%n}),u=r(function(n,r){return r.reduce(function(u,c,o){return e(n,o)?u:t(u,r.slice(o,o+n))},[])}),c=r(function(n,r){return r.concat(n)});function o(n){return function t(e,u,c){switch(arguments.length){case 0:return t;case 1:return r(function(r,t){return n(e,r,t)});case 2:return function(r){return n(e,u,r)};default:return n(e,u,c)}}}var i=function(n){return{"@@transducer/result":function(n){return n},"@@transducer/step":n}},a=o(function(n,r,t){var e=i(n),u=!0,c=!1,o=void 0;try{for(var a,f=t[Symbol.iterator]();!(u=(a=f.next()).done);u=!0){var s=a.value;if((r=e["@@transducer/step"](s,r))&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}}}catch(n){c=!0,o=n}finally{try{u||null==f.return||f.return()}finally{if(c)throw o}}return e["@@transducer/result"](r)}),f=r(function(n,r){return a(function(r,t){return c(n(r),t)},[],r)}),s=o(function(n,r,t){return n[r]=t,n}),l=r(function(n,r){return a(function(r,t){var e=n(r),u=s(t,e);return t.hasOwnProperty(e)?u(t[e]+1):u(1)},{},r)}),p=r(function(n,r){return a(function(r,e){var u=n(r),c=s(e,u);return e.hasOwnProperty(u)?c(t(e[u],r)):c([r])},{},r)}),y=function(n){return n},d=r(function(n,r){return Object.values(r.reduce(function(r,t){var e=n(t);return r.hasOwnProperty(e)?r:s(r,e,t)},{}))}),h=d(y),v=r(function(n,r){return a(function(r,e){return n(r)?t(e,r):e},[],r)}),g=r(function(n,r){return r.slice(n,1/0)}),m=r(function(n,r){var t=r.findIndex(function(r){return!n(r)});return t<0?[]:r.slice(t)}),b=function(n){return null==n},w=function(n){return n&&n["@@transducer/reduced"]?n:{"@@transducer/value":n,"@@transducer/reduced":!0}},A=r(function(n,r){return a(function(r,t){return n(r)?t:w(!1)},!0,r)}),O=r(function(n,r){return a(function(n,t){return n(r)?t:w(!1)},!0,n)}),j=r(function(n,r){return a(function(r,t){return n(r)?w(r):t},null,r)}),N=r(function(n,r){return r.findIndex(n)}),k=o(function(n,r,t){var e=n<t.length&&n>=0?n:t.length,u=t.slice(0);return u.splice(e,0,r),u}),S=function(n){return Object.prototype.toString.call(n).slice(8,-1)},x=r(function(n,r){var t=S(r);switch(t){case"Array":case"String":return r.includes(n);case"Object":case"Arguments":return r.hasOwnProperty(n);case"Map":case"Set":return r.has(n);default:throw new TypeError("Unsupported type: ".concat(t))}}),P=r(function(n,r){var t=p(y,r);return h(n.filter(function(n){return x(n,t)}))});function q(n){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function z(n,r){return E(n)||function(n,r){var t=[],e=!0,u=!1,c=void 0;try{for(var o,i=n[Symbol.iterator]();!(e=(o=i.next()).done)&&(t.push(o.value),!r||t.length!==r);e=!0);}catch(n){u=!0,c=n}finally{try{e||null==i.return||i.return()}finally{if(u)throw c}}return t}(n,r)||M()}function B(n){return function(n){if(Array.isArray(n)){for(var r=0,t=new Array(n.length);r<n.length;r++)t[r]=n[r];return t}}(n)||I(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function E(n){if(Array.isArray(n))return n}function I(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}function M(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var U=r(function(n,r){for(var t=r.length,e=Array(t),u=0;u<t;u++)s(e,u,n(r[u]));return e}),C=r(function(n,r){return U(function(n){return n.apply(void 0,B(r))},n)}),T=a(function(n,r){return n>=r?n:r},""),W=r(function(n,r){return r.reduce(function(r,t){return n(r)>=n(t)?r:t})}),R=r(function(n,r){return r.reduce(function(r,t){return n(r)<=n(t)?r:t})}),D=r(function(n,r){return a(function(r,e){var u=z(e,2),c=u[0],o=u[1];return n(r)?[t(c,r),o]:[c,t(o,r)]},[[],[]],r)}),F=r(function(n,r){return[].concat(n,r)}),L=o(function(n,r,t){for(var e=i(n),u=t.length-1;u>=0;u--)if((r=e["@@transducer/step"](t[u],r))&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}return e["@@transducer/result"](r)}),_=function(n){return!n},Z=r(function(n,r){return _(n(r))}),G=r(function(n,r){return v(Z(n),r)}),H=r(function(n,r){return f(y,[r.slice(0,n),r.slice(n+1)])}),J=r(function(n,r){return a(function(r,t){return n(r)?w(!0):t},!1,r)}),K=r(function(n,r){return a(function(n,t){return n(r)?w(!0):t},!1,n)}),Q=r(function(n,r){return r.slice().sort(n)}),V=function(n,r){return n<r?-1:n>r?1:0};function X(n){return function t(e,u,c,i){switch(arguments.length){case 0:return t;case 1:return o(function(r,t,u){return n(e,r,t,u)});case 2:return r(function(r,t){return n(e,u,r,t)});case 3:return function(r){return n(e,u,c,r)};default:return n(e,u,c,i)}}}var Y=X(function(n,r,t,e){return n(r(t),r(e))}),$=r(function(n,r){return Q(Y(V,n),r)}),nn=r(function(n,r){return B(r).sort(function(r,t){return n.reduce(function(n,e){return 0===n?e(r,t):n},0)})}),rn=r(function(n,r){return r.slice(0,n)}),tn=r(function(n,r){var t=r.findIndex(function(r){return!n(r)});return t<0?r:r.slice(0,t)}),en=r(function(n,r){return h(n.concat(r))}),un=o(function(n,r,t){return f(y,[t.slice(0,n),r,t.slice(n+1)])}),cn=r(function(n,r){return(n.length<r.length?n:r).reduce(function(t,e,u){return s(t,n[u],r[u])},{})}),on=r(function(n,r){return n}),an=r(function(n,r){return n&&r}),fn=o(function(n,r,t){return n(t)(r(t))}),sn=r(function(n,r){return n.apply(void 0,B(r))}),ln=o(function(n,r,t){return V(n(r),n(t))}),pn=o(function(n,r,t){return n(t)&&r(t)}),yn=X(function(n,r,t,e){return n(e)?r(e):t(e)}),dn=o(function(n,r,t){return n(r(t))}),hn=o(function(n,r,t){return r(t).then(n)}),vn=function(n){return n.length},gn=dn(vn,Object.values),mn=function(n){var r=S(n);switch(r){case"Array":case"String":return n.length;case"Object":return gn(n);case"Map":case"Set":return n.size;default:throw new TypeError("Unsupported type: ".concat(r))}},bn=r(function(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}),wn=function(n,r,t){for(var e=0,u=t.length;e<u;e++)if(n(r,t[e]))return!0;return!1},An=function(n){for(var r=[],t=null;!(t=n.next()).done;)r.push(t.value);return r},On=function(n,r,t,e){var u=An(n),c=An(r);function o(n,r){return jn(n,r,t.slice(),e.slice())}return!wn(function(n,r){return!wn(o,r,n)},c,u)},jn=function n(r,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(bn(r,t))return!0;var c,o,i=S(r);if(i!==S(t)||null==r||null==t)return!1;if("function"==typeof r.equals||"function"==typeof t.equals)return"function"==typeof r.equals&&r.equals(t)&&"function"==typeof t.equals&&t.equals(r);switch(i){case"Arguments":case"Array":case"Object":if("function"==typeof r.constructor&&"Promise"===(c=r.constructor,null==(o=String(c).match(/^function (\w*)/))?"":o[1]))return r===t;break;case"Boolean":case"Number":case"String":if(q(r)!==q(t)||!bn(r.valueOf(),t.valueOf()))return!1;break;case"Date":if(!bn(r.valueOf(),t.valueOf()))return!1;break;case"Error":return r.name===t.name&&r.message===t.message;case"RegExp":if(r.source!==t.source||r.global!==t.global||r.ignoreCase!==t.ignoreCase||r.multiline!==t.multiline||r.sticky!==t.sticky||r.unicode!==t.unicode)return!1}for(var a=e.length-1;a>=0;a--)if(e[a]===r)return u[a]===t;switch(i){case"Map":return r.size===t.size&&On(r.entries(),t.entries(),e.concat([r]),u.concat([t]));case"Set":return r.size===t.size&&On(r.values(),t.values(),e.concat([r]),u.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=Object.keys(r);if(f.length!==Object.values(t).length)return!1;for(var s=e.concat([r]),l=u.concat([t]),p=f.length-1;p>=0;p--){var y=f[p];if(!Object.prototype.hasOwnProperty.call(t,y)||!n(t[y],r[y],s,l))return!1}return!0},Nn=r(jn),kn=r(function(n,r){return b(r)||bn(NaN,r)?n:r}),Sn=function(n,r){return n>r?-1:n<r?1:0},xn=o(function(n,r,t){return Sn(n(r),n(t))}),Pn=o(function(n,r,t){return n(t)||r(t)}),qn=r(function(n,r){try{return n(r)}catch(n){return}}),zn=o(function(n,r,t){return bn(n(r),n(t))}),Bn=o(function(n,r,t){return n(t,r)}),En=r(function(n,r){return r>n}),In=r(function(n,r){return r>=n}),Mn=r(function(n,r){return r<n}),Un=r(function(n,r){return r<=n}),Cn=r(function(n,r){var t={};return function(e){var u=n(e);return x(u,t)||(t[u]=r(e)),t[u]}}),Tn=r(function(n,r){return n||r}),Wn=r(function(n,r){return a(function(n,r){return n(r)},r,n)}),Rn=r(function(n,r){return a(function(n,r){return r.then(n)},Promise.resolve(r),n)}),Dn=o(function(n,r,t){return n(t)?t:r(t)}),Fn=o(function(n,r,t){return n(t)?r(t):t}),Ln=o(function(n,r,t){return t.slice(n,r)}),_n=r(function(n,r){return dn(Nn(n),Ln(-n.length,1/0),r)}),Zn=r(function(n,r){return-1!==r.indexOf(n)}),Gn=r(function(n,r){return r[n<0?r.length+n:n]}),Hn=r(function(n,r){return n+r}),Jn=o(function(n,r,t){return n<=t&&r>=t}),Kn=o(function(n,r,t){if(n>r)throw new Error("Min cannot be greater than max in clamp");return t>n&&t<r?t:t<=n?n:r}),Qn=r(function(n,r){return r/n}),Vn=function(n){return-n},Xn=r(function(n,r){for(var t=[],e=Number(n),u=Number(r);e<u;e++)t.push(e);return t}),Yn=r(function n(r,t){return t?n(t,r%t):r}),$n=bn(0),nr=r(function(n,r){return Math.abs(Math.floor(n/Yn(n,r)*r))}),rr=function(n){return Qn(vn(n),a(Hn,0,n))},tr=r(function(n,r){return J(y,[!Number.isInteger(n),!Number.isInteger(r),r<1])?NaN:(n%r+r)%r}),er=r(function(n,r){return n*r}),ur=r(function(n,r){return Math.pow(r,n)}),cr=a(er,1),or=r(function(n,r){return Number("".concat(Math.round("".concat(r,"e").concat(n)),"e-").concat(n))}),ir=r(function(n,r){return r-n}),ar=a(Hn,0),fr=o(function(n,r,t){return n<t&&r>t}),sr=r(function(n,r){return Object.assign({},n,r)}),lr=r(function(n,r){return Object.keys(n).some(function(t){return n[t](r[t])})}),pr=r(function(n,r){return a(function(t,e){return s(e,t,n(r[t]))},{},Object.keys(r))}),yr=r(function(n,r){return a(function(t,e){return _(Zn(t,n))?s(e,t,r[t]):e},{},Object.keys(r))}),dr=o(function(n,r,t){return Object.assign({},t,function(n,r,t){return r in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}({},n,r(t[n])))}),hr=r(function n(r,t){var e,u=E(e=r)||I(e)||M(),c=u[0],o=u.slice(1);if(!b(t)&&!b(t[c]))return o.length?n(o,t[c]):t[c]}),vr=o(function(n,r,t){var e=hr(r,t);return b(e)?n:e}),gr=r(function(n,r){return Object.assign({},r,a(function(t,e){return r.hasOwnProperty(t)?s(e,t,n[t](r[t])):e},{},Object.keys(n)))}),mr=r(function(n,r){return r[n]}),br=r(function(n,r){return U(function(n){return r[n]},n)}),wr=r(function(n,r){return a(function(t,e){return n(r[t])?s(e,t,r[t]):e},{},Object.keys(r))}),Ar=r(function(n,r){return Object.keys(n).every(function(t){return n[t](r[t])})}),Or=r(function(n,r){var t=r.length,e=n.length,u=0;if(e>t)return!1;if(e===t)return n===r;n:for(var c=0;c<e;c++){for(var o=n.charCodeAt(c);u<t;u++)if(r.charCodeAt(u)===o)continue n;return!1}return!0}),jr=r(function(n,r){return r.join(n)}),Nr=r(function(n,r){return r.match(n)}),kr=o(function(n,r,t){return t.replace(n,r)}),Sr=r(function(n,r){return r.split(n)}),xr=r(function(n,r){return n.test(r)});n.add=Hn,n.addIndex=function(n){return function(){for(var r=0,t=arguments.length,e=new Array(t),u=0;u<t;u++)e[u]=arguments[u];var c=e[0],o=e[e.length-1],i=e.slice();return i[0]=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];var u=c.apply(void 0,B(f(y,[t,[r,o]])));return r+=1,u},n.apply(void 0,B(i))}},n.always=on,n.amend=sr,n.and=an,n.any=lr,n.ap=fn,n.apply=sn,n.ascend=V,n.ascendBy=ln,n.between=Jn,n.both=pn,n.branch=yn,n.capitalize=function(n){return n.charAt(0).toUpperCase()+n.slice(1)},n.chunk=u,n.clamp=Kn,n.complement=Z,n.compose=dn,n.composeP=hn,n.concat=c,n.concatMap=f,n.count=mn,n.countBy=l,n.curry=function n(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),u=1;u<t;u++)e[u-1]=arguments[u];return r.length<=e.length?r.apply(void 0,e):function(){for(var t=arguments.length,u=new Array(t),c=0;c<t;c++)u[c]=arguments[c];return n.apply(void 0,[r].concat(e,u))}},n.curryN=function n(r,t){for(var e=arguments.length,u=new Array(e>2?e-2:0),c=2;c<e;c++)u[c-2]=arguments[c];return r<=0?t.apply(void 0,u):function(){for(var e=arguments.length,c=new Array(e),o=0;o<e;o++)c[o]=arguments[o];return n.apply(void 0,[r-c.length,t].concat(u,c))}},n.dec=function(n){return n-1},n.deepEq=Nn,n.defaultTo=kn,n.descend=Sn,n.descendBy=xn,n.difference=function(n){var r=f(h,n),t=p(y,r);return v(function(n){return 1===t[n].length},r)},n.divide=Qn,n.draft=pr,n.drop=g,n.dropWhile=m,n.either=Pn,n.encase=qn,n.endsWith=_n,n.ensureArray=function(n){return Array.isArray(n)?n:b(n)?[]:[n]},n.eq=bn,n.eqBy=zn,n.every=A,n.everyPass=O,n.factors=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=n<0?Vn(n):n;return n?[].concat(B(dn(v(function(n){return 0===e(n,r)}),Xn(0),r)),[r]):[]},n.filter=v,n.find=j,n.findIndex=N,n.first=function(n){return n[0]},n.flip=Bn,n.fuzzySearch=Or,n.gcd=Yn,n.groupBy=p,n.gt=En,n.gte=In,n.has=x,n.height=gn,n.identity=y,n.inc=function(n){return n+1},n.includes=Zn,n.insert=k,n.intersection=P,n.isEmpty=function(n){return b(n)||!mn(n)},n.isEven=function(n){return an(!bn(n,NaN),bn(n%2,0))},n.isNil=b,n.isOdd=function(n){if(!bn(n,NaN)){var r=bn(n%2);return!r(NaN)&&!r(0)}return!1},n.isPrime=function(n){for(var r=Math.sqrt(n),t=2;t<=r;t++)if(!e(t,n))return!1;return n&&1!==n},n.isZero=$n,n.join=jr,n.juxt=C,n.last=function(n){return n[n.length-1]},n.lcm=nr,n.length=vn,n.lt=Mn,n.lte=Un,n.map=U,n.match=Nr,n.max=T,n.maxBy=W,n.mean=rr,n.median=function(n){var r=n.length;if(0===r)return NaN;var t=2-r%2,e=(r-t)/2;return Wn([Q(V),Ln(e,e+t),rr],n)},n.memoizeWith=Cn,n.min=function(n){return n.reduce(function(n,r){return n<=r?n:r})},n.minBy=R,n.mod=tr,n.multiply=er,n.negate=Vn,n.not=_,n.nth=Gn,n.omit=yr,n.on=Y,n.or=Tn,n.over=dr,n.partition=D,n.path=hr,n.pathOr=vr,n.pipe=Wn,n.pipeP=Rn,n.plan=gr,n.pow=ur,n.prepend=F,n.product=cr,n.prop=mr,n.props=br,n.range=Xn,n.reduce=a,n.reduceRight=L,n.reduced=w,n.reject=G,n.rem=e,n.remove=H,n.replace=kr,n.reverse=function(n){return Array.isArray(n)?n.slice().reverse():n.split("").reverse().join("")},n.round=or,n.sift=wr,n.size=function(n){return n.size},n.slice=Ln,n.some=J,n.somePass=K,n.sort=Q,n.sortBy=$,n.sortWith=nn,n.split=Sr,n.subtract=ir,n.sum=ar,n.take=rn,n.takeWhile=tn,n.test=xr,n.toLower=function(n){return n.toLowerCase()},n.toUpper=function(n){return n.toUpperCase()},n.trim=function(n){return n.trim()},n.type=S,n.union=en,n.uniq=h,n.uniqBy=d,n.unless=Dn,n.update=un,n.when=Fn,n.whole=Ar,n.within=fr,n.zip=cn,Object.defineProperty(n,"__esModule",{value:!0})});
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((n=n||self).kyanite={})}(this,function(n){"use strict";function r(n){return function r(t,e){return arguments.length?1===arguments.length?function(r){return n(t,r)}:n(t,e):r}}var t=function(n,r){return n.push(r),n},e=r(function(n,r){return r%n}),u=r(function(n,r){return r.reduce(function(u,c,o){return e(n,o)?u:t(u,r.slice(o,o+n))},[])}),c=r(function(n,r){return r.concat(n)});function o(n){return function t(e,u,c){switch(arguments.length){case 0:return t;case 1:return r(function(r,t){return n(e,r,t)});case 2:return function(r){return n(e,u,r)};default:return n(e,u,c)}}}var i=function(n){return{"@@transducer/result":function(n){return n},"@@transducer/step":n}},a=o(function(n,r,t){var e=i(n),u=!0,c=!1,o=void 0;try{for(var a,f=t[Symbol.iterator]();!(u=(a=f.next()).done);u=!0){var s=a.value;if((r=e["@@transducer/step"](s,r))&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}}}catch(n){c=!0,o=n}finally{try{u||null==f.return||f.return()}finally{if(c)throw o}}return e["@@transducer/result"](r)}),f=r(function(n,r){return a(function(r,t){return c(n(r),t)},[],r)}),s=o(function(n,r,t){return n[r]=t,n}),l=r(function(n,r){return a(function(r,t){var e=n(r),u=s(t,e);return t.hasOwnProperty(e)?u(t[e]+1):u(1)},{},r)}),p=r(function(n,r){return a(function(r,e){var u=n(r),c=s(e,u);return e.hasOwnProperty(u)?c(t(e[u],r)):c([r])},{},r)}),y=function(n){return n},d=r(function(n,r){return Object.values(r.reduce(function(r,t){var e=n(t);return r.hasOwnProperty(e)?r:s(r,e,t)},{}))}),h=d(y),v=r(function(n,r){return a(function(r,e){return n(r)?t(e,r):e},[],r)}),g=r(function(n,r){return r.slice(n,1/0)}),m=r(function(n,r){var t=r.findIndex(function(r){return!n(r)});return t<0?[]:r.slice(t)}),b=function(n){return null==n},w=function(n){return n&&n["@@transducer/reduced"]?n:{"@@transducer/value":n,"@@transducer/reduced":!0}},A=r(function(n,r){return a(function(r,t){return n(r)?t:w(!1)},!0,r)}),O=r(function(n,r){return a(function(n,t){return n(r)?t:w(!1)},!0,n)}),j=r(function(n,r){return a(function(r,t){return n(r)?w(r):t},null,r)}),N=r(function(n,r){return r.findIndex(n)}),k=o(function(n,r,t){var e=n<t.length&&n>=0?n:t.length,u=t.slice(0);return u.splice(e,0,r),u}),S=function(n){return Object.prototype.toString.call(n).slice(8,-1)},x=r(function(n,r){var t=S(r);switch(t){case"Array":case"String":return r.includes(n);case"Object":case"Arguments":return r.hasOwnProperty(n);case"Map":case"Set":return r.has(n);default:throw new TypeError("Unsupported type: ".concat(t))}}),P=r(function(n,r){var t=p(y,r);return h(n.filter(function(n){return x(n,t)}))});function q(n){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function E(n,r){return B(n)||function(n,r){var t=[],e=!0,u=!1,c=void 0;try{for(var o,i=n[Symbol.iterator]();!(e=(o=i.next()).done)&&(t.push(o.value),!r||t.length!==r);e=!0);}catch(n){u=!0,c=n}finally{try{e||null==i.return||i.return()}finally{if(u)throw c}}return t}(n,r)||M()}function z(n){return function(n){if(Array.isArray(n)){for(var r=0,t=new Array(n.length);r<n.length;r++)t[r]=n[r];return t}}(n)||I(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function B(n){if(Array.isArray(n))return n}function I(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}function M(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var U=r(function(n,r){for(var t=r.length,e=Array(t),u=0;u<t;u++)s(e,u,n(r[u]));return e}),C=r(function(n,r){return U(function(n){return n.apply(void 0,z(r))},n)}),T=a(function(n,r){return n>=r?n:r},""),W=r(function(n,r){return r.reduce(function(r,t){return n(r)>=n(t)?r:t})}),R=r(function(n,r){return r.reduce(function(r,t){return n(r)<=n(t)?r:t})}),D=r(function(n,r){return a(function(r,e){var u=E(e,2),c=u[0],o=u[1];return n(r)?[t(c,r),o]:[c,t(o,r)]},[[],[]],r)}),F=r(function(n,r){return[].concat(n,r)}),L=o(function(n,r,t){for(var e=i(n),u=t.length-1;u>=0;u--)if((r=e["@@transducer/step"](t[u],r))&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}return e["@@transducer/result"](r)}),_=function(n){return!n},Z=r(function(n,r){return _(n(r))}),G=r(function(n,r){return v(Z(n),r)}),H=r(function(n,r){return f(y,[r.slice(0,n),r.slice(n+1)])}),J=r(function(n,r){return a(function(r,t){return n(r)?w(!0):t},!1,r)}),K=r(function(n,r){return a(function(n,t){return n(r)?w(!0):t},!1,n)}),Q=r(function(n,r){return r.slice().sort(n)}),V=function(n,r){return n<r?-1:n>r?1:0};function X(n){return function t(e,u,c,i){switch(arguments.length){case 0:return t;case 1:return o(function(r,t,u){return n(e,r,t,u)});case 2:return r(function(r,t){return n(e,u,r,t)});case 3:return function(r){return n(e,u,c,r)};default:return n(e,u,c,i)}}}var Y=X(function(n,r,t,e){return n(r(t),r(e))}),$=r(function(n,r){return Q(Y(V,n),r)}),nn=r(function(n,r){return z(r).sort(function(r,t){return n.reduce(function(n,e){return 0===n?e(r,t):n},0)})}),rn=r(function(n,r){return r.slice(0,n)}),tn=r(function(n,r){var t=r.findIndex(function(r){return!n(r)});return t<0?r:r.slice(0,t)}),en=r(function(n,r){return h(n.concat(r))}),un=o(function(n,r,t){return f(y,[t.slice(0,n),r,t.slice(n+1)])}),cn=r(function(n,r){return(n.length<r.length?n:r).reduce(function(t,e,u){return s(t,n[u],r[u])},{})}),on=r(function(n,r){return n}),an=r(function(n,r){return n&&r}),fn=o(function(n,r,t){return n(t)(r(t))}),sn=r(function(n,r){return n.apply(void 0,z(r))}),ln=o(function(n,r,t){return V(n(r),n(t))}),pn=o(function(n,r,t){return n(t)&&r(t)}),yn=X(function(n,r,t,e){return n(e)?r(e):t(e)}),dn=o(function(n,r,t){return n(r(t))}),hn=o(function(n,r,t){return r(t).then(n)}),vn=function(n){return n.length},gn=dn(vn,Object.values),mn=function(n){var r=S(n);switch(r){case"Array":case"String":return n.length;case"Object":return gn(n);case"Map":case"Set":return n.size;default:throw new TypeError("Unsupported type: ".concat(r))}},bn=r(function(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}),wn=function(n,r,t){for(var e=0,u=t.length;e<u;e++)if(n(r,t[e]))return!0;return!1},An=function(n){for(var r=[],t=null;!(t=n.next()).done;)r.push(t.value);return r},On=function(n,r,t,e){var u=An(n),c=An(r);function o(n,r){return jn(n,r,t.slice(),e.slice())}return!wn(function(n,r){return!wn(o,r,n)},c,u)},jn=function n(r,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(bn(r,t))return!0;var c,o,i=S(r);if(i!==S(t)||null==r||null==t)return!1;if("function"==typeof r.equals||"function"==typeof t.equals)return"function"==typeof r.equals&&r.equals(t)&&"function"==typeof t.equals&&t.equals(r);switch(i){case"Arguments":case"Array":case"Object":if("function"==typeof r.constructor&&"Promise"===(c=r.constructor,null==(o=String(c).match(/^function (\w*)/))?"":o[1]))return r===t;break;case"Boolean":case"Number":case"String":if(q(r)!==q(t)||!bn(r.valueOf(),t.valueOf()))return!1;break;case"Date":if(!bn(r.valueOf(),t.valueOf()))return!1;break;case"Error":return r.name===t.name&&r.message===t.message;case"RegExp":if(r.source!==t.source||r.global!==t.global||r.ignoreCase!==t.ignoreCase||r.multiline!==t.multiline||r.sticky!==t.sticky||r.unicode!==t.unicode)return!1}for(var a=e.length-1;a>=0;a--)if(e[a]===r)return u[a]===t;switch(i){case"Map":return r.size===t.size&&On(r.entries(),t.entries(),e.concat([r]),u.concat([t]));case"Set":return r.size===t.size&&On(r.values(),t.values(),e.concat([r]),u.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=Object.keys(r);if(f.length!==Object.values(t).length)return!1;for(var s=e.concat([r]),l=u.concat([t]),p=f.length-1;p>=0;p--){var y=f[p];if(!Object.prototype.hasOwnProperty.call(t,y)||!n(t[y],r[y],s,l))return!1}return!0},Nn=r(jn),kn=r(function(n,r){return b(r)||bn(NaN,r)?n:r}),Sn=function(n,r){return n>r?-1:n<r?1:0},xn=o(function(n,r,t){return Sn(n(r),n(t))}),Pn=o(function(n,r,t){return n(t)||r(t)}),qn=r(function(n,r){try{return n(r)}catch(n){return}}),En=o(function(n,r,t){return bn(n(r),n(t))}),zn=o(function(n,r,t){return n(t,r)}),Bn=r(function(n,r){return r>n}),In=r(function(n,r){return r>=n}),Mn=r(function(n,r){return r<n}),Un=r(function(n,r){return r<=n}),Cn=r(function(n,r){var t={};return function(e){var u=n(e);return x(u,t)||(t[u]=r(e)),t[u]}}),Tn=r(function(n,r){return Z(bn(n),r)}),Wn=r(function(n,r){return n||r}),Rn=r(function(n,r){return a(function(n,r){return n(r)},r,n)}),Dn=r(function(n,r){return a(function(n,r){return r.then(n)},Promise.resolve(r),n)}),Fn=o(function(n,r,t){return n(t)?t:r(t)}),Ln=o(function(n,r,t){return n(t)?r(t):t}),_n=o(function(n,r,t){return t.slice(n,r)}),Zn=r(function(n,r){return dn(Nn(n),_n(-n.length,1/0),r)}),Gn=r(function(n,r){return-1!==r.indexOf(n)}),Hn=r(function(n,r){return r[n<0?r.length+n:n]}),Jn=r(function(n,r){return n+r}),Kn=o(function(n,r,t){return n<=t&&r>=t}),Qn=o(function(n,r,t){if(n>r)throw new Error("Min cannot be greater than max in clamp");return t>n&&t<r?t:t<=n?n:r}),Vn=r(function(n,r){return r/n}),Xn=function(n){return-n},Yn=r(function(n,r){for(var t=[],e=Number(n),u=Number(r);e<u;e++)t.push(e);return t}),$n=r(function n(r,t){return t?n(t,r%t):r}),nr=bn(0),rr=r(function(n,r){return Math.abs(Math.floor(n/$n(n,r)*r))}),tr=function(n){return Vn(vn(n),a(Jn,0,n))},er=r(function(n,r){return J(y,[!Number.isInteger(n),!Number.isInteger(r),r<1])?NaN:(n%r+r)%r}),ur=r(function(n,r){return n*r}),cr=r(function(n,r){return Math.pow(r,n)}),or=a(ur,1),ir=r(function(n,r){return Number("".concat(Math.round("".concat(r,"e").concat(n)),"e-").concat(n))}),ar=r(function(n,r){return r-n}),fr=a(Jn,0),sr=o(function(n,r,t){return n<t&&r>t}),lr=r(function(n,r){return Object.assign({},n,r)}),pr=r(function(n,r){return Object.keys(n).some(function(t){return n[t](r[t])})}),yr=r(function(n,r){return a(function(t,e){return s(e,t,n(r[t]))},{},Object.keys(r))}),dr=r(function(n,r){return a(function(t,e){return _(Gn(t,n))?s(e,t,r[t]):e},{},Object.keys(r))}),hr=o(function(n,r,t){return Object.assign({},t,function(n,r,t){return r in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}({},n,r(t[n])))}),vr=r(function n(r,t){var e,u=B(e=r)||I(e)||M(),c=u[0],o=u.slice(1);if(!b(t)&&!b(t[c]))return o.length?n(o,t[c]):t[c]}),gr=o(function(n,r,t){var e=vr(r,t);return b(e)?n:e}),mr=r(function(n,r){return Object.assign({},r,a(function(t,e){return r.hasOwnProperty(t)?s(e,t,n[t](r[t])):e},{},Object.keys(n)))}),br=r(function(n,r){return r[n]}),wr=o(function(n,r,t){return dn(bn(r),br(n),t)}),Ar=r(function(n,r){return U(function(n){return r[n]},n)}),Or=r(function(n,r){return a(function(t,e){return n(r[t])?s(e,t,r[t]):e},{},Object.keys(r))}),jr=r(function(n,r){return Object.keys(n).every(function(t){return n[t](r[t])})}),Nr=r(function(n,r){var t=r.length,e=n.length,u=0;if(e>t)return!1;if(e===t)return n===r;n:for(var c=0;c<e;c++){for(var o=n.charCodeAt(c);u<t;u++)if(r.charCodeAt(u)===o)continue n;return!1}return!0}),kr=r(function(n,r){return r.join(n)}),Sr=r(function(n,r){return r.match(n)}),xr=o(function(n,r,t){return t.replace(n,r)}),Pr=r(function(n,r){return r.split(n)}),qr=r(function(n,r){return n.test(r)});n.add=Jn,n.addIndex=function(n){return function(){for(var r=0,t=arguments.length,e=new Array(t),u=0;u<t;u++)e[u]=arguments[u];var c=e[0],o=e[e.length-1],i=e.slice();return i[0]=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];var u=c.apply(void 0,z(f(y,[t,[r,o]])));return r+=1,u},n.apply(void 0,z(i))}},n.always=on,n.amend=lr,n.and=an,n.any=pr,n.ap=fn,n.apply=sn,n.ascend=V,n.ascendBy=ln,n.between=Kn,n.both=pn,n.branch=yn,n.capitalize=function(n){return n.charAt(0).toUpperCase()+n.slice(1)},n.chunk=u,n.clamp=Qn,n.complement=Z,n.compose=dn,n.composeP=hn,n.concat=c,n.concatMap=f,n.count=mn,n.countBy=l,n.curry=function n(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),u=1;u<t;u++)e[u-1]=arguments[u];return r.length<=e.length?r.apply(void 0,e):function(){for(var t=arguments.length,u=new Array(t),c=0;c<t;c++)u[c]=arguments[c];return n.apply(void 0,[r].concat(e,u))}},n.curryN=function n(r,t){for(var e=arguments.length,u=new Array(e>2?e-2:0),c=2;c<e;c++)u[c-2]=arguments[c];return r<=0?t.apply(void 0,u):function(){for(var e=arguments.length,c=new Array(e),o=0;o<e;o++)c[o]=arguments[o];return n.apply(void 0,[r-c.length,t].concat(u,c))}},n.dec=function(n){return n-1},n.deepEq=Nn,n.defaultTo=kn,n.descend=Sn,n.descendBy=xn,n.difference=function(n){var r=f(h,n),t=p(y,r);return v(function(n){return 1===t[n].length},r)},n.divide=Vn,n.draft=yr,n.drop=g,n.dropWhile=m,n.either=Pn,n.encase=qn,n.endsWith=Zn,n.ensureArray=function(n){return Array.isArray(n)?n:b(n)?[]:[n]},n.eq=bn,n.eqBy=En,n.every=A,n.everyPass=O,n.factors=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=n<0?Xn(n):n;return n?[].concat(z(dn(v(function(n){return 0===e(n,r)}),Yn(0),r)),[r]):[]},n.filter=v,n.find=j,n.findIndex=N,n.first=function(n){return n[0]},n.flip=zn,n.fuzzySearch=Nr,n.gcd=$n,n.groupBy=p,n.gt=Bn,n.gte=In,n.has=x,n.height=gn,n.identity=y,n.inc=function(n){return n+1},n.includes=Gn,n.insert=k,n.intersection=P,n.isEmpty=function(n){return b(n)||!mn(n)},n.isEven=function(n){return an(!bn(n,NaN),bn(n%2,0))},n.isNil=b,n.isOdd=function(n){if(!bn(n,NaN)){var r=bn(n%2);return!r(NaN)&&!r(0)}return!1},n.isPrime=function(n){for(var r=Math.sqrt(n),t=2;t<=r;t++)if(!e(t,n))return!1;return n&&1!==n},n.isZero=nr,n.join=kr,n.juxt=C,n.last=function(n){return n[n.length-1]},n.lcm=rr,n.length=vn,n.lt=Mn,n.lte=Un,n.map=U,n.match=Sr,n.max=T,n.maxBy=W,n.mean=tr,n.median=function(n){var r=n.length;if(0===r)return NaN;var t=2-r%2,e=(r-t)/2;return Rn([Q(V),_n(e,e+t),tr],n)},n.memoizeWith=Cn,n.min=function(n){return n.reduce(function(n,r){return n<=r?n:r})},n.minBy=R,n.mod=er,n.multiply=ur,n.negate=Xn,n.not=_,n.notEq=Tn,n.nth=Hn,n.omit=dr,n.on=Y,n.or=Wn,n.over=hr,n.partition=D,n.path=vr,n.pathOr=gr,n.pipe=Rn,n.pipeP=Dn,n.plan=mr,n.pow=cr,n.prepend=F,n.product=or,n.prop=br,n.propEq=wr,n.props=Ar,n.range=Yn,n.reduce=a,n.reduceRight=L,n.reduced=w,n.reject=G,n.rem=e,n.remove=H,n.replace=xr,n.reverse=function(n){return Array.isArray(n)?n.slice().reverse():n.split("").reverse().join("")},n.round=ir,n.sift=Or,n.size=function(n){return n.size},n.slice=_n,n.some=J,n.somePass=K,n.sort=Q,n.sortBy=$,n.sortWith=nn,n.split=Pr,n.subtract=ar,n.sum=fr,n.take=rn,n.takeWhile=tn,n.test=qr,n.toLower=function(n){return n.toLowerCase()},n.toUpper=function(n){return n.toUpperCase()},n.trim=function(n){return n.trim()},n.type=S,n.union=en,n.uniq=h,n.uniqBy=d,n.unless=Fn,n.update=un,n.when=Ln,n.whole=jr,n.within=sr,n.zip=cn,Object.defineProperty(n,"__esModule",{value:!0})});

@@ -43,13 +43,6 @@ // const { eachDayOfInterval, isSunday, isMonday, isTuesday, isWednesday, isThursday, isFriday, isSaturday } = require('date-fns')

const data = { a: 1, b: 2, c: 4, z: 5, w: 6, d: 7 }
const and = (a, b) => a && b
const or = (a, b) => a || b
const omit = (keys, obj) =>
Object.keys(obj).reduce((acc, p) => {
if (!keys.includes(p)) {
acc[p] = obj[p]
}
return acc
}, {})
console.log(omit(['z', 'w'], data))
console.log(and(true, 'I am a test string (AND)'))
console.log(or(false, 'I am a test string (OR)'))
{
"name": "kyanite",
"version": "0.12.1",
"version": "0.12.2",
"description": "A small library of pure functional utilities to make life easier and data better",

@@ -15,11 +15,11 @@ "main": "dist/kyanite.min.js",

"devDependencies": {
"@babel/core": "7.4.0",
"@babel/preset-env": "7.4.2",
"@babel/core": "7.4.3",
"@babel/preset-env": "7.4.3",
"@killparadise/docdash": "github:dhershman1/docdash",
"esm": "3.2.21",
"globby": "9.1.0",
"esm": "3.2.22",
"globby": "9.2.0",
"jsdoc": "3.5.5",
"npm-run-all": "4.1.5",
"nyc": "13.3.0",
"rollup": "1.7.4",
"nyc": "14.0.0",
"rollup": "1.10.0",
"rollup-plugin-babel": "4.3.2",

@@ -26,0 +26,0 @@ "rollup-plugin-cleanup": "3.1.1",

@@ -8,8 +8,8 @@ import _curry2 from '../_internals/_curry2'

* @category Function
* @sig Boolean -> Boolean -> Boolean
* @sig a -> b -> a | b
* @description
* Runs an and comparison on the two values passed in
* @param {Boolean} a The first value to compare
* @param {Boolean} b The second value to compare
* @return {Boolean} The evaluated outcome of the parameters
* @param {Any} a The first value to compare
* @param {Any} b The second value to compare
* @return {Any} The evaluated outcome of the parameters
*

@@ -16,0 +16,0 @@ * @example

@@ -73,2 +73,3 @@ export { default as chunk } from './array/chunk.js'

export { default as not } from './function/not.js'
export { default as notEq } from './function/notEq.js'
export { default as on } from './function/on.js'

@@ -129,2 +130,3 @@ export { default as or } from './function/or.js'

export { default as prop } from './object/prop.js'
export { default as propEq } from './object/propEq.js'
export { default as props } from './object/props.js'

@@ -131,0 +133,0 @@ export { default as sift } from './object/sift.js'

@@ -552,2 +552,8 @@ // Type definitions for Kyanite v0.12.x

/**
* Takes in two values and checks to make sure they're not equal to each other
*/
notEq(a: any, b: any): boolean;
notEq(a: any): (b: any) => boolean;
/**
* Returns the nth element of a given array

@@ -657,2 +663,9 @@ */

/**
* Takes a desired property from an object and compares the value against a provided value to make sure they're equal
*/
propEq<P extends string, T>(key: P, val: T, obj: Record<P, T>): boolean;
propEq<P extends string, T>(key: P, val: T): (obj: Record<P, T>) => boolean;
propEq<P extends string>(key: P): <T>(val: T) => (obj: Record<P, T>) => boolean;
/**
* Pulls a list of values from an object and returns them as an array

@@ -659,0 +672,0 @@ */

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