Comparing version 0.12.0 to 0.12.1
# Changelog | ||
## v0.12.1 | ||
### Fixed | ||
- `pathOr` and `path` breaking on `null` value | ||
## v0.12.0 | ||
@@ -4,0 +10,0 @@ |
@@ -1104,8 +1104,8 @@ (function (global, factory) { | ||
keys = _ref2.slice(1); | ||
if (isNil(obj) || isNil(obj[p])) { | ||
return undefined; | ||
} | ||
if (!keys.length) { | ||
return obj[p]; | ||
} | ||
if (isNil(obj[p])) { | ||
return undefined; | ||
} | ||
return path(keys, obj[p]); | ||
@@ -1112,0 +1112,0 @@ }; |
@@ -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);return o.length?b(t[c])?void 0: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 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})}); |
{ | ||
"name": "kyanite", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"description": "A small library of pure functional utilities to make life easier and data better", | ||
@@ -16,5 +16,5 @@ "main": "dist/kyanite.min.js", | ||
"@babel/core": "7.4.0", | ||
"@babel/preset-env": "7.4.1", | ||
"@babel/preset-env": "7.4.2", | ||
"@killparadise/docdash": "github:dhershman1/docdash", | ||
"esm": "3.2.18", | ||
"esm": "3.2.21", | ||
"globby": "9.1.0", | ||
@@ -24,3 +24,3 @@ "jsdoc": "3.5.5", | ||
"nyc": "13.3.0", | ||
"rollup": "1.7.0", | ||
"rollup": "1.7.4", | ||
"rollup-plugin-babel": "4.3.2", | ||
@@ -27,0 +27,0 @@ "rollup-plugin-cleanup": "3.1.1", |
@@ -28,2 +28,6 @@ import _curry2 from '../_internals/_curry2' | ||
const path = ([p, ...keys], obj) => { | ||
if (isNil(obj) || isNil(obj[p])) { | ||
return undefined | ||
} | ||
if (!keys.length) { | ||
@@ -33,6 +37,2 @@ return obj[p] | ||
if (isNil(obj[p])) { | ||
return undefined | ||
} | ||
return path(keys, obj[p]) | ||
@@ -39,0 +39,0 @@ } |
@@ -1,2 +0,2 @@ | ||
// Type definitions for Kyanite v0.10.2 | ||
// Type definitions for Kyanite v0.12.x | ||
// Project: Kyanite | ||
@@ -3,0 +3,0 @@ // Definitions by: Dustin Hershman <dustinh17@gmail.com> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
270897