Comparing version 0.18.0 to 0.19.1
@@ -0,1 +1,29 @@ | ||
## v0.19.1 | ||
### Fixes | ||
* `trace` now correctly returns a tapped function. This was broken after function naming was implemented. | ||
## v0.19.0 | ||
### Migration path | ||
* `mapValues` has been deprecated because `map` now supports objects. Replace | ||
usage of `mapValues` with `map`. | ||
* `identical` now implements [SameValueZero](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) semantics. The only breaking change here is that `NaN` is now treated as identical to `NaN`. | ||
### Features | ||
* Added `intersection`. | ||
* Added `match`. | ||
* Added `pad`. | ||
* Added `padLeft`. | ||
* Added `padRight`. | ||
* Added `unique`. | ||
### Fixes | ||
* Functions with an arity > 3 now properly report their arity when partially applied. | ||
### Improvements | ||
* `map` now supports plain objects. | ||
* Curried functions now provide better stringified representations for a better debugging experience. | ||
* `identical` now implements [SameValueZero](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) semantics. This affects any function, such as `equals`, that performs identity checks. | ||
## v0.18.0 | ||
@@ -2,0 +30,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.redash=t()}(this,function(){"use strict";function n(n){return function t(r){return arguments.length?n(r):t}}function t(t){return function r(e,u){switch(arguments.length){case 0:return r;case 1:return n(function(n){return t(e,n)});default:return t(e,u)}}}function r(n){return function(){return n}}function e(r){return function e(u,o,i){switch(arguments.length){case 0:return e;case 1:return t(function(n,t){return r(u,n,t)});case 2:return n(function(n){return r(u,o,n)});default:return r(u,o,i)}}}function u(n){return null==n?"Nil":hn.call(n).slice(8,-1)}function o(n){for(var t=[],r=t.length,e=n.next();!e.done;)t[r++]=e,e=n.next();return e}function i(n,t){var r,e,u;if(r=Object.keys(n),r.length!==Object.keys(t).length)return!1;for(e=r.length-1;e>=0;){if(!pn.call(t,r[e]))return!1;e-=1}for(e=r.length-1;e>=0;){if(u=r[e],!f(n[u],t[u]))return!1;e-=1}return!0}function f(n,t){var r,e;if(n===t)return!0;if(u(n)!==u(t))return!1;if(!n||!t||"object"!=typeof n)return!1;switch(u(n)){case"Array":return n.length===t.length&&i(n,t);case"Date":return n.valueOf()===t.valueOf();case"Promise":return n===t;case"Map":case"Set":return r=o(n.entries()),e=o(t.entries()),r.length===e.length&&f(r,e);default:return i(n,t)}}function c(n,t){var r;if("string"==typeof t)return t.indexOf(n)!==-1;for(r=t.length-1;r>=0;)if(f(n,t[r--]))return!0;return!1}function a(n){return n}function l(n,t){for(var r=0,e=t.length,u=[];r<e;)n(t[r])&&(u[u.length]=t[r]),r++;return u}function s(n,t){var r,e={};for(r in t)pn.call(t,r)&&n(t[r])&&(e[r]=t[r]);return e}function h(n,t){switch(n){case 0:return function(){return t.apply(null,arguments)};case 1:return function(n){return t.apply(null,arguments)};case 2:return function(n,r){return t.apply(null,arguments)};case 3:return function(n,r,e){return t.apply(null,arguments)};case 4:return function(n,r,e,u){return t.apply(null,arguments)};case 5:return function(n,r,e,u,o){return t.apply(null,arguments)};case 6:return function(n,r,e,u,o,i){return t.apply(null,arguments)};default:throw new Error("Function arity must be <= 6.")}}function p(n){return bn(n.length,function(){return!n.apply(null,arguments)})}function g(n){for(var t=0;t<n.length;t++)if(!vn("function",n[t]))throw new TypeError("Invalid argument supplied to `pipe`. The value at index ["+t+"] was not a function; what was received was of type: "+u(n[t])+".");return bn(n[0].length,function(){for(var t=0,r=n.length,e=n[t++].apply(null,arguments);t<r;t++)e=n[t](e);return e})}function v(n){for(var t=0;t<n.length;t++)if(!vn("function",n[t]))throw new TypeError("Invalid argument supplied to `compose`. The value at index ["+t+"] was not a function; what was received was of type: "+u(n[t])+".");return g(jn.call(n))}function d(n){return bn(n.length,n)}function y(n){return n-1}function m(n){if(null!=n){if("function"==typeof n.empty)return n.empty();if(n.constructor&&"function"==typeof n.constructor.empty)return n.constructor.empty();switch(u(n)){case"Array":return[];case"String":return"";case"Object":return{};default:return}}}function w(){return!1}function b(n){for(var t,r,e,u=[],o=0,i=n.length;o<i;o++)if(t=n[o],Array.isArray(t))for(r=0,e=t.length;r<e;r++)u.push(t[r]);else u.push(t);return u}function j(n){for(var t,r,e,u=[],o=0,i=n.length;o<i;o++)if(t=n[o],Array.isArray(t))for(t=j(t),r=0,e=t.length;r<e;r++)u[u.length]=t[r];else u[u.length]=t;return u}function E(n){return bn(n.length,function(){return n.apply(null,jn.call(arguments))})}function O(n,t){for(var r=0,e=t.length;r<e;)n(t[r]),r++}function T(n){for(var t=0,r=n.length,e={};t<r;t++)e[n[t][0]]=n[t][1];return e}function k(n){return n[0]}function A(n){return n+1}function x(n){return mn.call(n,0,n.length-1)}function M(n){return null!=n&&f(n,m(n))}function N(n){return!isNaN(n)&&isFinite(n)&&n%2===0}function B(n){return null==n}function C(n){return!isNaN(n)&&isFinite(n)&&!!n&&n===Math.floor(n)&&n%2!==0}function L(n){return function(){var t=mn.call(arguments);return Wn(function(n){return n.apply(null,t)},n)}}function P(n){return Object.keys(n)}function R(n){return n[n.length-1]}function z(n){return n.length}function F(n){return Kn(Vn(n),fn(n))}function I(n,t,r){for(var e=0,u=r.length;e<u;e++)t=n(t,r[e]);return t}function S(n){for(var t=n.length-1,r=n[t--];t>=0;)n[t]>r&&(r=n[t]),t--;return r}function U(n){for(var t=0,r=n.length,e=0;t<r;t++)e+=n[t];return e}function q(n){if(!n.length)throw new Error("Cannot calculate the mean of an empty list.");return U(n)/n.length}function D(n,t){for(var r in t)pn.call(t,r)&&n(r,t[r])}function W(n){for(var t=n.length-1,r=n[t--];t>=0;)n[t]<r&&(r=n[t]),t--;return r}function K(n){return[n]}function V(n){return jn.call(mn.call(n))}function G(){return!0}function H(n){return mn.call(n,1)}function J(n){return function(t){return n(t),t}}function Q(n){return n.toLowerCase()}function X(n){return n.toUpperCase()}function Y(n){var t=[];return D(function(n,r){t.push([n,r])},n),t}function Z(n){return J(function(t){console.log(n,t)})}function $(n){return n.trim()}function _(n){for(var t=Object.keys(n),r=0,e=t.length,u=new Array(t.length);r<e;)u[r]=n[t[r]],r+=1;return u}function nn(n){for(var t,r=Object.keys(Nt),e=r.length,u=0;u<e;)t=r[u],n[t]=Nt[t],u+=1}var tn=t(function(n,t){return n+t}),rn=t(function(n,t){for(var r=0,e=t.length;r<e;r++)if(!n(t[r]))return!1;return!0}),en=t(function(n,t){for(var r=0,e=t.length;r<e;r++)if(n(t[r]))return!0;return!1}),un=[].concat,on=t(function(n,t){return"string"==typeof t?t+n:un.call(t,[n])}),fn=e(function(n,t,r){var e,u={};for(e in r)u[e]=r[e];return u[n]=t,u}),cn=t(function(n,t){for(var r,e,u=0,o=t.length,i=[];u<o;u++)if(e=n(t[u]),Array.isArray(e))for(r=0;r<e.length;r++)i.push(e[r]);else i.push(e);return i}),an=e(function(n,t,r){return r<n?n:r>t?t:r}),ln=t(function(n,t){return n.concat(t)}),sn=t(function(n,t){for(var r=0,e=n.length;r<e;r++)if(n[r][0](t))return n[r][1](t)}),hn=Object.prototype.toString,pn=Object.prototype.hasOwnProperty,gn=t(c),vn=t(function(n,t){return"undefined"==typeof n?"undefined"==typeof t:null==n?null==t&&"undefined"!=typeof t:"string"==typeof n?u(t).toLowerCase()===n.toLowerCase():t instanceof n||t.constructor===n}),dn=t(function(n,t){return vn("Object",t)?s(n,t):l(n,t)}),yn=dn(a),mn=[].slice,wn=function n(t,r,e){return h(t,function(){var u,o=r;if(arguments.length)for(o=mn.call(r),u=0;u<arguments.length;u++)o.push(arguments[u]);return o.length>=t?e.apply(null,o):n(t,o,e)})},bn=t(function(n,t){return wn(n,[],t)}),jn=[].reverse,En=t(function(n,t){var r,e={};for(r in t)r!==n&&(e[r]=t[r]);return e}),On=t(function(n,t){if(!n)throw new Error("Cannot divide by 0.");return t/n}),Tn=t(function(n,t){return mn.call(t,n)}),kn=t(function(n,t){for(var r=0,e=t.length;r<e&&!n(t[r]);)r+=1;return mn.call(t,r)}),An=t(function(n,t){for(var r=0,e=t.length;r<e&&n(t[r]);)r+=1;return mn.call(t,r)}),xn=t(f),Mn=t(function(n,t){for(var r,e=0,u=t.length;e<u;e++)if(r=t[e],n(r))return r}),Nn=t(function(n,t){for(var r=0,e=t.length;r<e;r++)if(n(t[r]))return r;return-1}),Bn=t(function(n,t){for(var r=t.length-1;r>=0;){if(n(t[r]))return t[r];r--}}),Cn=t(function(n,t){if(t.fmap)return t.fmap(n);if(t.map)return t.map(n);throw new Error("The functor provided to fmap does not implement `map`.")}),Ln=t(O),Pn=t(function(n,t){var r={};return O(function(t){var e=n(t);r[e]=(r[e]||[]).concat(t)},t),r}),Rn=t(function(n,t){return t>n}),zn=t(function(n,t){return t>=n}),Fn=t(function(n,t){return pn.call(t,n)}),In=t(function(n,t){return n===t}),Sn=e(function(n,t,r){return function(e){return n(e)?t(e):r(e)}}),Un=[].push,qn=e(function(n,t,r){var e=mn.call(r,0,n);return e[e.length]=t,Un.apply(e,mn.call(r,n)),e}),Dn=t(function(n,t){return t.join(n)}),Wn=t(function(n,t){for(var r=new Array(t.length),e=0,u=t.length;e<u;e++)r[e]=n(t[e]);return r}),Kn=t(function(n,t){return{get:n,set:t,toString:function(){return"Lens"}}}),Vn=t(function(n,t){return t[n]}),Gn=t(function(n,t){return t<n}),Hn=t(function(n,t){return t<=n}),Jn=t(function(n,t){for(var r=new Array(t.length),e=0,u=t.length;e<u;e++)r[e]=n(t[e],e);return r}),Qn=t(function(n,t){return I(function(r,e){return r[n(e)]=t[e],r},{},Object.keys(t))}),Xn=t(function(n,t){return I(function(r,e){return r[e]=n(t[e]),r},{},Object.keys(t))}),Yn=t(function(n,t){var r={},e=function(n,t){r[n]=t};return D(e,n),D(e,t),r}),Zn=t(function(n,t){return n*t}),$n=t(function(n,t){var r,e,u,o={};for(r in t){for(e=!1,u=0;u<n.length;u++)if(n[u]===r){e=!0;break}e||(o[r]=t[r])}return o}),_n=e(function(n,t,r){return n.set(t,r)}),nt=e(function(n,t,r){return _n(n,t(n.get(r)),r)}),tt=t(function(n,t){return[n,t]}),rt=t(function(n,t){for(var r=[],e=[],u=t.length,o=0;o<u;o++)n(t[o])?r[r.length]=t[o]:e[e.length]=t[o];return[r,e]}),et=t(function(n,t){var r=0,e=t;if(null==e)throw new TypeError("The second argument to `path` must not be undefined or null.");for(;r<n.length;){if(null==e)return e;e=e[n[r]],r+=1}return e}),ut=t(function(n,t){for(var r=0,e=n.length,u={};r<e;)u[n[r]]=t[n[r]],r++;return u}),ot=t(function(n,t){return"string"==typeof t?n+t:un.call([n],t)}),it=e(function(n,t,r){return f(r[n],t)}),ft=e(function(n,t,r){var e,u,o=[];if(0===n)throw new Error("The `increment` value provided to `rangeBy` must be a non-zero number.");if(t===r)throw new Error("The `start` value provided to `rangeBy` must be greater than or less than the `end` value. Received the same value for both: "+t+".");if(n>0&&t>r)throw new Error("The `increment` value provided to `rangeBy` must be negative when the start value ("+t+") is greater than the end value ("+r+"). Received: "+n+".");if(n<0&&t<r)throw new Error("The `increment` value provided to `rangeBy` must be positive when the start value ("+t+") is less than the end value ("+r+"). Received: "+n+".");for(e=Math.abs(Math.ceil((r-t)/n)),u=0;u<e;u++)o.push(t+n*u);return o}),ct=t(function(n,t){if(n<t)return ft(1,n,t);if(n>t)return ft(-1,n,t);throw new Error("The `start` value provided to `range` must be greater than or less than the `end` value. Received the same value for both: "+n+".")}),at=e(I),lt=e(function(n,t,r){return I(n,t,jn.call(r))}),st=t(function(n,t){return dn(p(n),t)}),ht=e(function(n,t,r){return r.replace(n,t)}),pt=e(function(n,t,r){for(var e=0,u=r.length,o=[t];e<u;e++)t=n(t,r[e]),o[o.length]=t;return o}),gt=t(function(n,t){return t.split(n)}),vt=t(function(n,t){return t-n}),dt=t(function(n,t){return mn.call(t,0,n)}),yt=t(function(n,t){for(var r=0,e=t.length;r<e;r++)if(!n(t[r]))return mn.call(t,0,r);return mn.call(t)}),mt=t(function(n,t){return yt(p(n),t)}),wt=t(function(n,t){return n.test(t)}),bt=t(function(n,t){for(var r=0,e=[];r<t;r++)e.push(n(r));return e}),jt=t(function n(t,r){var e,u={};for(e in r)if(pn.call(r,e)&&pn.call(t,e))if("object"==typeof t[e])u[e]=n(t[e],r[e]);else{if("function"!=typeof t[e])throw new Error('Invalid transformation supplied under the key "'+e+'". Transformation must be either a function or object, but was "'+typeof t[e]+'".');u[e]=t[e](r[e])}else u[e]=r[e];return u}),Et=t(function(n,t){return function(r){return n(r)?t(r):r}}),Ot=t(function(n,t){return Et(p(n),t)}),Tt=t(function(n,t){return n.get(t)}),kt=t(function(n,t){var r;for(r in n)if(pn.call(n,r)&&!n[r](t[r]))return!1;return!0}),At=t(function(n,t){for(var r=0,e=t.length,u=[];r<e;)c(t[r],n)||(u[u.length]=t[r]),r++;return u}),xt=t(function(n,t){for(var r=0,e=Math.min(n.length,t.length),u=new Array(e);r<e;r++)u[r]=[n[r],t[r]];return u}),Mt=t(function(n,t){for(var r=0,e=Math.min(n.length,t.length),u={};r<e;r++)u[n[r]]=t[r];return u}),Nt=Object.freeze({add:tn,all:rn,always:r,any:en,append:on,assoc:fn,chain:cn,clamp:an,concat:ln,cond:sn,contains:gn,compact:yn,complement:p,compose:v,curry:d,curryN:bn,dec:y,dissoc:En,divide:On,drop:Tn,dropUntil:kn,dropWhile:An,empty:m,equals:xn,F:w,filter:dn,find:Mn,findIndex:Nn,findLast:Bn,flatMap:cn,flatten:b,flattenDeep:j,flip:E,fmap:Cn,forEach:Ln,fromPairs:T,groupBy:Pn,gt:Rn,gte:zn,has:Fn,head:k,identical:In,identity:a,ifElse:Sn,inc:A,init:x,insert:qn,isEmpty:M,isEven:N,isNil:B,isOdd:C,isType:vn,join:Dn,juxt:L,keys:P,last:R,length:z,lens:Kn,lensProp:F,lt:Gn,lte:Hn,map:Wn,mapi:Jn,mapKeys:Qn,mapValues:Xn,max:S,mean:q,merge:Yn,min:W,multiply:Zn,of:K,omit:$n,over:nt,pair:tt,partition:rt,path:et,pick:ut,pipe:g,prepend:ot,prop:Vn,propEq:it,range:ct,rangeBy:ft,reduce:at,foldl:at,reduceRight:lt,foldr:lt,reject:st,replace:ht,reverse:V,scan:pt,set:_n,split:gt,subtract:vt,sum:U,T:G,tail:H,take:dt,takeUntil:mt,takeWhile:yt,tap:J,test:wt,times:bt,toLower:Q,toUpper:X,toPairs:Y,trace:Z,transform:jt,trim:$,type:u,unless:Ot,values:_,view:Tt,when:Et,where:kt,without:At,zip:xt,zipObj:Mt});return nn}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.redash=t()}(this,function(){"use strict";function n(n,t){for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=n(t[r]);return e}function t(n){return n.displayName||n.name||n.toString()}function e(n){return Array.isArray(n)?"["+n.map(e).join(", ")+"]":"function"==typeof n?t(n):JSON.stringify(n)}function r(t,r){return r.length?t+"("+n(e,r).join(", ")+")":t}function u(n,t){return Object.defineProperty(t,"name",{value:n}),Object.defineProperty(t,"displayName",{value:n,configurable:!0,enumerable:!1}),t.toString=function(){return n},t}function i(n,t){if(Object.getOwnPropertyDescriptor(t,"length").writable)return Object.defineProperty(t,"length",{value:n}),t;switch(n){case 0:return function(){return t.apply(null,arguments)};case 1:return function(n){return t.apply(null,arguments)};case 2:return function(n,e){return t.apply(null,arguments)};case 3:return function(n,e,r){return t.apply(null,arguments)};case 4:return function(n,e,r,u){return t.apply(null,arguments)};case 5:return function(n,e,r,u,i){return t.apply(null,arguments)};case 6:return function(n,e,r,u,i,o){return t.apply(null,arguments)};default:throw new Error("Function arity must be <= 6.")}}function o(n,t,e){var a=i(n,function(){var r,u=t,i=n-arguments.length;if(arguments.length)for(u=A.call(u),r=0;r<arguments.length;r++)u[u.length]=arguments[r];return i<=0?e.apply(null,u):o(i,u,e)});return u(r(e.displayName||e.name,t),a),a}function a(n,t){var e=t.length;switch(e){case 0:case 1:return u(n,i(e,t));default:return o(e,[],u(n,t))}}function f(n){return null==n?"Nil":C.call(n).slice(8,-1)}function c(n){for(var t=[],e=t.length,r=n.next();!r.done;)t[e++]=r,r=n.next();return r}function l(n,t){return n===t||n!==n&&t!==t}function s(n,t){var e,r,u;if(e=Object.keys(n),e.length!==Object.keys(t).length)return!1;for(r=e.length-1;r>=0;){if(!z.call(t,e[r]))return!1;r-=1}for(r=e.length-1;r>=0;){if(u=e[r],!h(n[u],t[u]))return!1;r-=1}return!0}function h(n,t){var e,r;if(l(n,t))return!0;if(U(n)!==U(t))return!1;if(!n||!t||"object"!=typeof n)return!1;switch(U(n)){case"Array":return n.length===t.length&&s(n,t);case"Date":return n.valueOf()===t.valueOf();case"Promise":return n===t;case"Map":case"Set":return e=c(n.entries()),r=c(t.entries()),e.length===r.length&&h(e,r);default:return s(n,t)}}function p(n,t){var e;if("string"==typeof t)return t.indexOf(n)!==-1;for(e=t.length-1;e>=0;){if(h(n,t[e]))return!0;e--}return!1}function g(n,t){for(var e=0,r=[];e<t.length;)n(t[e])&&(r[r.length]=t[e]),e++;return r}function d(n){return Object.keys(n)}function y(n,t,e){for(var r=0;r<e.length;r++)t=n(t,e[r]);return t}function m(n,t){return y(function(e,r){return n(t[r])&&(e[r]=t[r]),e},{},d(t))}function v(n,t){for(var e=0;e<t.length;)n(t[e]),e++}function w(){this._items={}}function b(n,t){return y(function(e,r){return e[r]=n(t[r]),e},{},d(t))}function j(n,t){for(var e in t)z.call(t,e)&&n(e,t[e])}function O(n){var t,e={};for(t in n)e[t]=n[t];return e}function E(n){return A.call(n)}function k(n){if(Array.isArray(n))return E(n);if("object"==typeof n&&n)return O(n);throw new TypeError('Cannot shallow clone value of type: "'+typeof n+'".')}function T(n){for(var t,e=Object.keys(Ht),r=e.length,u=0;u<r;)t=e[u],n[t]=Ht[t],u+=1}var A=[].slice,_=a("add",function(n,t){return n+t}),x=a("all",function(n,t){for(var e=0,r=t.length;e<r;e++)if(!n(t[e]))return!1;return!0}),N=a("always",function(n){return function(){return n}}),P=a("any",function(n,t){for(var e=0;e<t.length;e++)if(n(t[e]))return!0;return!1}),I=[].concat,L=a("append",function(n,t){return"string"==typeof t?t+n:I.call(t,[n])}),B=a("assoc",function(n,t,e){var r,u={};for(r in e)u[r]=e[r];return u[n]=t,u}),M=a("chain",function(n,t){for(var e,r,u=0,i=[];u<t.length;u++)if(e=n(t[u]),Array.isArray(e))for(r=0;r<e.length;r++)i[i.length]=e[r];else i[i.length]=e;return i}),R=a("clamp",function(n,t,e){return e<n?n:e>t?t:e}),S=a("concat",function(n,t){return n.concat(t)}),q=a("cond",function(n,t){for(var e=0;e<n.length;e++)if(n[e][0](t))return n[e][1](t)}),C=Object.prototype.toString,U=a("type",f),z=Object.prototype.hasOwnProperty,F=a("contains",p),D=a("identity",function(n){return n}),W=a("isType",function(n,t){return null==n?typeof n==typeof t:"string"==typeof n?U(t).toLowerCase()===n.toLowerCase():t instanceof n||t.constructor===n}),K=a("filter",function(n,t){return W("Object",t)?m(n,t):g(n,t)}),J=a("compact",K(D)),G=a("curryN",function(n,t){return o(n,[],t)}),H=a("complement",function(n){return G(n.length,function(){return!n.apply(null,arguments)})}),Q=[].reverse,V=a("pipe",function(n){for(var t,e=0;e<n.length;e++)if(!W("function",n[e]))throw new TypeError("Invalid argument supplied to `pipe`. The value at index ["+e+"] was not a function; what was received was of type: "+U(n[e])+".");return t=o(n[0].length,[],function(){for(var t=0,e=n.length,r=n[t++].apply(null,arguments);t<e;t++)r=n[t](r);return r}),u("pipe",[n],t),t}),X=a("compose",function(n){for(var t=0;t<n.length;t++)if(!W("function",n[t]))throw new TypeError("Invalid argument supplied to `compose`. The value at index ["+t+"] was not a function; what was received was of type: "+U(n[t])+".");return V(Q.call(n))}),Y=a("curry",function(n){return G(n.length,n)}),Z=a("dec",function(n){return n-1}),$=a("dissoc",function(n,t){var e,r={};for(e in t)e!==n&&(r[e]=t[e]);return r}),nn=a("divide",function(n,t){if(!n)throw new Error("Cannot divide by 0.");return t/n}),tn=a("drop",function(n,t){return A.call(t,n)}),en=a("dropUntil",function(n,t){for(var e=0;e<t.length&&!n(t[e]);)e+=1;return A.call(t,e)}),rn=a("dropWhile",function(n,t){for(var e=0;e<t.length&&n(t[e]);)e+=1;return A.call(t,e)}),un=a("empty",function(n){if(null!=n){if("function"==typeof n.empty)return n.empty();if(n.constructor&&"function"==typeof n.constructor.empty)return n.constructor.empty();switch(U(n)){case"Array":return[];case"String":return"";case"Object":return{};default:return}}}),on=a("equals",h),an=a("F",N(!1)),fn=a("find",function(n,t){for(var e=0;e<t.length;e++)if(n(t[e]))return t[e]}),cn=a("findIndex",function(n,t){for(var e=0;e<t.length;e++)if(n(t[e]))return e;return-1}),ln=a("findLast",function(n,t){for(var e=t.length-1;e>=0;){if(n(t[e]))return t[e];e--}}),sn=a("flatten",function(n){for(var t,e,r=[],u=0;u<n.length;u++)if(t=n[u],Array.isArray(t))for(e=0;e<t.length;e++)r.push(t[e]);else r.push(t);return r}),hn=a("flattenDeep",function n(t){for(var e,r,u=[],i=0;i<t.length;i++)if(e=t[i],Array.isArray(e))for(e=n(e),r=0;r<e.length;r++)u[u.length]=e[r];else u[u.length]=e;return u}),pn=a("flip",function(n){return G(n.length,function(){return n.apply(null,Q.call(arguments))})}),gn=a("fmap",function(n,t){if(t.fmap)return t.fmap(n);if(t.map)return t.map(n);throw new Error("The functor provided to fmap does not implement `map`.")}),dn=a("forEach",v),yn=a("fromPairs",function(n){for(var t=0,e={};t<n.length;t++)e[n[t][0]]=n[t][1];return e}),mn=a("groupBy",function(n,t){return y(function(t,e){var r=n(e);return t[r]=(t[r]||[]).concat(e),t},{},t)}),vn=a("get",function(n,t){return t[n]}),wn=a("getEq",function(n,t,e){return h(e[n],t)}),bn=a("getIn",function(n,t){var e=0,r=t;if(null==r)throw new TypeError("The second argument to `getIn` must not be undefined or null.");for(;e<n.length;){if(null==r)return r;r=r[n[e]],e+=1}return r}),jn=a("gt",function(n,t){return t>n}),On=a("gte",function(n,t){return t>=n}),En=a("has",function(n,t){return z.call(t,n)}),kn=a("head",function(n){return n[0]}),Tn=a("identical",l),An=a("ifElse",function(n,t,e){return function(r){return n(r)?t(r):e(r)}}),_n=a("inc",function(n){return n+1}),xn=a("init",function(n){return A.call(n,0,n.length-1)}),Nn=a("insert",function(n,t,e){var r=A.call(e,0,n);return r[r.length]=t,r.concat(A.call(e,n))}),Pn=a("isEmpty",function(n){return!n||h(n,un(n))}),In=a("isEven",function(n){return!isNaN(n)&&isFinite(n)&&n%2===0}),Ln=a("isNil",function(n){return null==n}),Bn=a("isOdd",function(n){return!isNaN(n)&&isFinite(n)&&!!n&&n===Math.floor(n)&&n%2!==0});w.prototype.add=function(n){var t=typeof n;switch(t){case"boolean":case"number":case"string":return this._items[t]?!this._items[t][n]&&(this._items[t][n]=!0,!0):(this._items[t]={},this._items[t][n]=!0,!0);case"undefined":return!this._items.undefined&&(this._items.undefined=!0,!0);case"object":if(null==n)return!this._items.null&&(this._items.null=!0,!0);default:return this._items[t]?!p(n,this._items[t])&&(this._items[t][this._items[t].length]=n,!0):(this._items[t]=[n],!0)}},w.prototype.clear=function(){this._items={}};var Mn=a("intersection",function(n,t){var e,r,u=0,i=[],o=new w;for(n.length<t.length?(e=t,r=n):(r=t,e=n);u<e.length;u++)o.add(e[u]);for(u=0;u<r.length;u++)o.add(r[u])||(i[i.length]=r[u]);return i}),Rn=a("join",function(n,t){return t.join(n)}),Sn=a("map",function(t,e){return W("Object",e)?b(t,e):n(t,e)}),qn=a("juxt",function(n){return function(){var t=A.call(arguments);return Sn(function(n){return n.apply(null,t)},n)}}),Cn=a("keys",d),Un=a("last",function(n){return n[n.length-1]}),zn=a("length",function(n){return n.length}),Fn=a("lens",function(n,t){return{get:n,set:t,toString:function(){return"Lens"}}}),Dn=a("lensProp",function(n){return Fn(vn(n),B(n))}),Wn=a("lt",function(n,t){return t<n}),Kn=a("lte",function(n,t){return t<=n}),Jn=a("mapi",function(n,t){for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=n(t[r],r);return e}),Gn=a("mapKeys",function(n,t){return y(function(e,r){return e[n(r)]=t[r],e},{},Object.keys(t))}),Hn=String.prototype.match,Qn=a("match",function(n,t){return Hn.call(t,n)||[]}),Vn=a("max",function(n){for(var t=n.length-1,e=n[t--];t>=0;)n[t]>e&&(e=n[t]),t--;return e}),Xn=a("sum",function(n){for(var t=0,e=0;t<n.length;t++)e+=n[t];return e}),Yn=a("mean",function(n){if(!n.length)throw new Error("Cannot calculate the mean of an empty list.");return Xn(n)/n.length}),Zn=a("merge",function(n,t){var e={},r=function(n,t){e[n]=t};return j(r,n),j(r,t),e}),$n=a("min",function(n){for(var t=n.length-1,e=n[t--];t>=0;)n[t]<e&&(e=n[t]),t--;return e}),nt=a("multiply",function(n,t){return n*t}),tt=a("of",function(n){return[n]}),et=a("omit",function(n,t){var e,r,u,i={};for(e in t){for(r=!1,u=0;u<n.length;u++)if(n[u]===e){r=!0;break}r||(i[e]=t[e])}return i}),rt=a("set",function(n,t,e){return n.set(t,e)}),ut=a("over",function(n,t,e){return rt(n,t(n.get(e)),e)}),it=a("padLeft",function(n,t,e){for(;e.length<n;)e=t+e;return e}),ot=a("padRight",function(n,t,e){for(;e.length<n;)e+=t;return e}),at=a("pad",function(n,t,e){var r=e.length+Math.ceil((n-e.length)/2);return ot(n,t,it(r,t,e))}),ft=a("pair",function(n,t){return[n,t]}),ct=a("partition",function(n,t){for(var e=[],r=[],u=0;u<t.length;u++)n(t[u])?e[e.length]=t[u]:r[r.length]=t[u];return[e,r]}),lt=a("pick",function(n,t){for(var e=0,r={};e<n.length;)r[n[e]]=t[n[e]],e++;return r}),st=a("prepend",function(n,t){return"string"==typeof t?n+t:I.call([n],t)}),ht=a("rangeBy",function(n,t,e){var r,u,i=[];if(0===n)throw new Error("The `increment` value provided to `rangeBy` must be a non-zero number.");if(t===e)throw new Error("The `start` value provided to `rangeBy` must be greater than or less than the `end` value. Received the same value for both: "+t+".");if(n>0&&t>e)throw new Error("The `increment` value provided to `rangeBy` must be negative when the start value ("+t+") is greater than the end value ("+e+"). Received: "+n+".");if(n<0&&t<e)throw new Error("The `increment` value provided to `rangeBy` must be positive when the start value ("+t+") is less than the end value ("+e+"). Received: "+n+".");for(r=Math.abs(Math.ceil((e-t)/n)),u=0;u<r;u++)i.push(t+n*u);return i}),pt=a("range",function(n,t){if(n<t)return ht(1,n,t);if(n>t)return ht(-1,n,t);throw new Error("The `start` value provided to `range` must be greater than or less than the `end` value. Received the same value for both: "+n+".")}),gt=a("reduce",y),dt=a("reduceRight",function(n,t,e){return y(n,t,Q.call(e))}),yt=a("reject",function(n,t){return K(H(n),t)}),mt=a("replace",function(n,t,e){return e.replace(n,t)}),vt=a("reverse",function(n){return Q.call(A.call(n))}),wt=a("scan",function(n,t,e){for(var r=0,u=[t];r<e.length;r++)t=n(t,e[r]),u[u.length]=t;return u}),bt=a("split",function(n,t){return t.split(n)}),jt=a("subtract",function(n,t){return t-n}),Ot=a("T",N(!0)),Et=a("tail",function(n){return A.call(n,1)}),kt=a("take",function(n,t){return A.call(t,0,n)}),Tt=a("takeWhile",function(n,t){for(var e=0;e<t.length;e++)if(!n(t[e]))return A.call(t,0,e);return A.call(t)}),At=a("takeUntil",function(n,t){return Tt(H(n),t)}),_t=a("tap",function(n){return function(t){return n(t),t}}),xt=a("test",function(n,t){return n.test(t)}),Nt=a("times",function(n,t){for(var e=0,r=[];e<t;e++)r.push(n(e));return r}),Pt=a("toLower",function(n){return n.toLowerCase()}),It=a("toUpper",function(n){return n.toUpperCase()}),Lt=a("toPairs",function(n){var t=[];return j(function(n,e){t.push([n,e])},n),t}),Bt=a("trace",function(n){return u(r("trace",[n]),_t(function(t){console.log(n,t)}))}),Mt=a("transform",function n(t,e){var r,u={};for(r in e)if(z.call(e,r)&&z.call(t,r))if("object"==typeof t[r])u[r]=n(t[r],e[r]);else{if("function"!=typeof t[r])throw new Error('Invalid transformation supplied under the key "'+r+'". Transformation must be either a function or object, but was "'+typeof t[r]+'".');u[r]=t[r](e[r])}else u[r]=e[r];return u}),Rt=a("trim",function(n){return n.trim()}),St=a("unique",function(n){for(var t=0,e=[],r=new w;t<n.length;t++)r.add(n[t])&&(e[e.length]=n[t]);return r.clear(),e}),qt=a("when",function(n,t){return function(e){return n(e)?t(e):e}}),Ct=a("unless",function(n,t){return qt(H(n),t)}),Ut=a("updateIn",function(n,t,e){var r=k(e),u=n[0];return n.length>1?(r[u]=r[u]||{},r[u]=Ut(n.slice(1),t,r[u]),r):(r[u]=t(r[u]),r)}),zt=a("update",function(n,t,e){return Ut([n],t,e)}),Ft=a("values",function(n){for(var t=Object.keys(n),e=0,r=new Array(t.length);e<t.length;)r[e]=n[t[e]],e+=1;return r}),Dt=a("view",function(n,t){return n.get(t)}),Wt=a("where",function(n,t){var e;for(e in n)if(z.call(n,e)&&!n[e](t[e]))return!1;return!0}),Kt=a("without",function(n,t){for(var e=0,r=[];e<t.length;)p(t[e],n)||(r[r.length]=t[e]),e++;return r}),Jt=a("zip",function(n,t){for(var e=0,r=Math.min(n.length,t.length),u=new Array(r);e<r;e++)u[e]=[n[e],t[e]];return u}),Gt=a("zipObj",function(n,t){for(var e=0,r=Math.min(n.length,t.length),u={};e<r;e++)u[n[e]]=t[e];return u}),Ht=Object.freeze({add:_,all:x,always:N,any:P,append:L,assoc:B,chain:M,clamp:R,concat:S,cond:q,contains:F,compact:J,complement:H,compose:X,curry:Y,curryN:G,dec:Z,dissoc:$,divide:nn,drop:tn,dropUntil:en,dropWhile:rn,empty:un,equals:on,F:an,filter:K,find:fn,findIndex:cn,findLast:ln,flatten:sn,flattenDeep:hn,flip:pn,fmap:gn,forEach:dn,fromPairs:yn,groupBy:mn,get:vn,getEq:wn,getIn:bn,gt:jn,gte:On,has:En,head:kn,identical:Tn,identity:D,ifElse:An,inc:_n,init:xn,insert:Nn,isEmpty:Pn,isEven:In,isNil:Ln,isOdd:Bn,isType:W,intersection:Mn,join:Rn,juxt:qn,keys:Cn,last:Un,length:zn,lens:Fn,lensProp:Dn,lt:Wn,lte:Kn,map:Sn,mapi:Jn,mapKeys:Gn,match:Qn,max:Vn,mean:Yn,merge:Zn,min:$n,multiply:nt,of:tt,omit:et,over:ut,pad:at,padLeft:it,padRight:ot,pair:ft,partition:ct,pick:lt,pipe:V,prepend:st,range:pt,rangeBy:ht,reduce:gt,foldl:gt,reduceRight:dt,foldr:dt,reject:yt,replace:mt,reverse:vt,scan:wt,set:rt,split:bt,subtract:jt,sum:Xn,T:Ot,tail:Et,take:kt,takeUntil:At,takeWhile:Tt,tap:_t,test:xt,times:Nt,toLower:Pt,toUpper:It,toPairs:Lt,trace:Bt,transform:Mt,trim:Rt,type:U,unique:St,unless:Ct,update:zt,updateIn:Ut,values:Ft,view:Dt,when:qt,where:Wt,without:Kt,zip:Jt,zipObj:Gt,flatMap:M,path:bn,prop:vn,propEq:wn});return T}); |
{ | ||
"name": "redash", | ||
"version": "0.18.0", | ||
"version": "0.19.1", | ||
"description": "A better Standard Library for JavaScript", | ||
@@ -31,3 +31,4 @@ "main": "redash.js", | ||
"docs:cache": "node docs/scripts/parse-docs", | ||
"docs:start": "nodemon docs/scripts/build-docs --watch docs", | ||
"docs:start": "node docs/scripts/run-docs", | ||
"docs:build": "node docs/scripts/build-docs", | ||
"prepublish": "npm run deploy" | ||
@@ -52,3 +53,6 @@ }, | ||
"ava": "^0.16.0", | ||
"babel-eslint": "^7.1.1", | ||
"brace": "^0.9.1", | ||
"eslint": "^2.13.1", | ||
"genesis-core": "technologyadvice/genesis-core", | ||
"jsdoc": "^3.4.2", | ||
@@ -58,2 +62,3 @@ "marked": "^0.3.6", | ||
"react": "^15.4.1", | ||
"react-ace": "^4.1.5", | ||
"react-dom": "^15.4.1", | ||
@@ -60,0 +65,0 @@ "rollup": "^0.21.0", |
@@ -16,6 +16,6 @@ # Redash | ||
### First Class Functional Programming | ||
Redash's guiding principle is to support and encourage functional programming styles. Unlike some other libraries that simply offer FP-_ish_ wrappers, functional programming is a first class citizen in redash. This means that every function is immutable, auto-curried, and written to expect data last to facilitate composition. Redash also compares objects by value, not reference, which allows you to start working with data in a meaningful way without concerning yourself with how it's stored in memory. | ||
Redash's guiding principle is to support and encourage functional programming styles. Unlike some other libraries that simply offer FP-_ish_ wrappers, functional programming is a first class citizen in Redash. This means that every function is immutable, auto-curried, and written to expect data last to facilitate composition. Redash also compares objects by value, not reference, which allows you to start working with data in a meaningful way without concerning yourself with how it's stored in memory. | ||
### Built for the Next Generation of JavaScript | ||
The redash codebase is written with ES2015 modules and packaged with rollup, allowing you to take advantage of tree shaking to produce slimmer bundles without the need for extra tooling. | ||
The Redash codebase is written with ES2015 modules and packaged with rollup, allowing you to take advantage of tree shaking to produce slimmer bundles without the need for extra tooling. | ||
@@ -28,11 +28,9 @@ ## Usage | ||
After that's done, just import it in your code and get on to building awesome stuff. If you haven't already done so, you should check out the [API documentation](https://redash.zuko.me) to see what functions are available and learn how to use them. With that out of the way, here are two of the most common ways to use redash: | ||
After that's done, just import it in your code and get on to building awesome stuff. If you haven't already done so, you should check out the [API documentation](https://redash.zuko.me) to see what functions are available and learn how to use them. With that out of the way, here are two of the most common ways to use Redash: | ||
### ES2015 Module | ||
```js | ||
import * as _ from 'redash' // import everything | ||
import { prop } from 'redash' // or just what you need | ||
import { map, prop } from 'redash' | ||
const getName = _.prop('name') | ||
_.map(getName, [{ name: 'Dwight' }, { name: 'Jim' }]) // => ['Dwight', 'Jim'] | ||
map(prop('name'), [{ name: 'Dwight' }, { name: 'Jim' }]) // => ['Dwight', 'Jim'] | ||
``` | ||
@@ -46,8 +44,4 @@ | ||
// Node/Webpack/etc: | ||
install(global) | ||
// Directly in the browser: | ||
install(window) | ||
// Now all of the functions are available on the scope you installed it to: | ||
@@ -54,0 +48,0 @@ prop('name', { name: 'Michael' }) // => 'Michael' |
@@ -1,1 +0,1 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.redash={})}(this,function(n){"use strict";function t(n){return function t(r){return arguments.length?n(r):t}}function r(n){return function r(e,u){switch(arguments.length){case 0:return r;case 1:return t(function(t){return n(e,t)});default:return n(e,u)}}}function e(n){return function(){return n}}function u(n){return function e(u,o,i){switch(arguments.length){case 0:return e;case 1:return r(function(t,r){return n(u,t,r)});case 2:return t(function(t){return n(u,o,t)});default:return n(u,o,i)}}}function o(n){return null==n?"Nil":hn.call(n).slice(8,-1)}function i(n){for(var t=[],r=t.length,e=n.next();!e.done;)t[r++]=e,e=n.next();return e}function f(n,t){var r,e,u;if(r=Object.keys(n),r.length!==Object.keys(t).length)return!1;for(e=r.length-1;e>=0;){if(!pn.call(t,r[e]))return!1;e-=1}for(e=r.length-1;e>=0;){if(u=r[e],!c(n[u],t[u]))return!1;e-=1}return!0}function c(n,t){var r,e;if(n===t)return!0;if(o(n)!==o(t))return!1;if(!n||!t||"object"!=typeof n)return!1;switch(o(n)){case"Array":return n.length===t.length&&f(n,t);case"Date":return n.valueOf()===t.valueOf();case"Promise":return n===t;case"Map":case"Set":return r=i(n.entries()),e=i(t.entries()),r.length===e.length&&c(r,e);default:return f(n,t)}}function a(n,t){var r;if("string"==typeof t)return t.indexOf(n)!==-1;for(r=t.length-1;r>=0;)if(c(n,t[r--]))return!0;return!1}function l(n){return n}function s(n,t){for(var r=0,e=t.length,u=[];r<e;)n(t[r])&&(u[u.length]=t[r]),r++;return u}function h(n,t){var r,e={};for(r in t)pn.call(t,r)&&n(t[r])&&(e[r]=t[r]);return e}function p(n,t){switch(n){case 0:return function(){return t.apply(null,arguments)};case 1:return function(n){return t.apply(null,arguments)};case 2:return function(n,r){return t.apply(null,arguments)};case 3:return function(n,r,e){return t.apply(null,arguments)};case 4:return function(n,r,e,u){return t.apply(null,arguments)};case 5:return function(n,r,e,u,o){return t.apply(null,arguments)};case 6:return function(n,r,e,u,o,i){return t.apply(null,arguments)};default:throw new Error("Function arity must be <= 6.")}}function g(n){return bn(n.length,function(){return!n.apply(null,arguments)})}function v(n){for(var t=0;t<n.length;t++)if(!vn("function",n[t]))throw new TypeError("Invalid argument supplied to `pipe`. The value at index ["+t+"] was not a function; what was received was of type: "+o(n[t])+".");return bn(n[0].length,function(){for(var t=0,r=n.length,e=n[t++].apply(null,arguments);t<r;t++)e=n[t](e);return e})}function d(n){for(var t=0;t<n.length;t++)if(!vn("function",n[t]))throw new TypeError("Invalid argument supplied to `compose`. The value at index ["+t+"] was not a function; what was received was of type: "+o(n[t])+".");return v(jn.call(n))}function y(n){return bn(n.length,n)}function m(n){return n-1}function w(n){if(null!=n){if("function"==typeof n.empty)return n.empty();if(n.constructor&&"function"==typeof n.constructor.empty)return n.constructor.empty();switch(o(n)){case"Array":return[];case"String":return"";case"Object":return{};default:return}}}function b(){return!1}function j(n){for(var t,r,e,u=[],o=0,i=n.length;o<i;o++)if(t=n[o],Array.isArray(t))for(r=0,e=t.length;r<e;r++)u.push(t[r]);else u.push(t);return u}function E(n){for(var t,r,e,u=[],o=0,i=n.length;o<i;o++)if(t=n[o],Array.isArray(t))for(t=E(t),r=0,e=t.length;r<e;r++)u[u.length]=t[r];else u[u.length]=t;return u}function O(n){return bn(n.length,function(){return n.apply(null,jn.call(arguments))})}function T(n,t){for(var r=0,e=t.length;r<e;)n(t[r]),r++}function k(n){for(var t=0,r=n.length,e={};t<r;t++)e[n[t][0]]=n[t][1];return e}function A(n){return n[0]}function x(n){return n+1}function M(n){return mn.call(n,0,n.length-1)}function N(n){return null!=n&&c(n,w(n))}function B(n){return!isNaN(n)&&isFinite(n)&&n%2===0}function C(n){return null==n}function L(n){return!isNaN(n)&&isFinite(n)&&!!n&&n===Math.floor(n)&&n%2!==0}function P(n){return function(){var t=mn.call(arguments);return Wn(function(n){return n.apply(null,t)},n)}}function R(n){return Object.keys(n)}function F(n){return n[n.length-1]}function I(n){return n.length}function S(n){return Kn(Vn(n),fn(n))}function U(n,t,r){for(var e=0,u=r.length;e<u;e++)t=n(t,r[e]);return t}function z(n){for(var t=n.length-1,r=n[t--];t>=0;)n[t]>r&&(r=n[t]),t--;return r}function q(n){for(var t=0,r=n.length,e=0;t<r;t++)e+=n[t];return e}function D(n){if(!n.length)throw new Error("Cannot calculate the mean of an empty list.");return q(n)/n.length}function W(n,t){for(var r in t)pn.call(t,r)&&n(r,t[r])}function K(n){for(var t=n.length-1,r=n[t--];t>=0;)n[t]<r&&(r=n[t]),t--;return r}function V(n){return[n]}function G(n){return jn.call(mn.call(n))}function H(){return!0}function J(n){return mn.call(n,1)}function Q(n){return function(t){return n(t),t}}function X(n){return n.toLowerCase()}function Y(n){return n.toUpperCase()}function Z(n){var t=[];return W(function(n,r){t.push([n,r])},n),t}function $(n){return Q(function(t){console.log(n,t)})}function _(n){return n.trim()}function nn(n){for(var t=Object.keys(n),r=0,e=t.length,u=new Array(t.length);r<e;)u[r]=n[t[r]],r+=1;return u}var tn=r(function(n,t){return n+t}),rn=r(function(n,t){for(var r=0,e=t.length;r<e;r++)if(!n(t[r]))return!1;return!0}),en=r(function(n,t){for(var r=0,e=t.length;r<e;r++)if(n(t[r]))return!0;return!1}),un=[].concat,on=r(function(n,t){return"string"==typeof t?t+n:un.call(t,[n])}),fn=u(function(n,t,r){var e,u={};for(e in r)u[e]=r[e];return u[n]=t,u}),cn=r(function(n,t){for(var r,e,u=0,o=t.length,i=[];u<o;u++)if(e=n(t[u]),Array.isArray(e))for(r=0;r<e.length;r++)i.push(e[r]);else i.push(e);return i}),an=u(function(n,t,r){return r<n?n:r>t?t:r}),ln=r(function(n,t){return n.concat(t)}),sn=r(function(n,t){for(var r=0,e=n.length;r<e;r++)if(n[r][0](t))return n[r][1](t)}),hn=Object.prototype.toString,pn=Object.prototype.hasOwnProperty,gn=r(a),vn=r(function(n,t){return"undefined"==typeof n?"undefined"==typeof t:null==n?null==t&&"undefined"!=typeof t:"string"==typeof n?o(t).toLowerCase()===n.toLowerCase():t instanceof n||t.constructor===n}),dn=r(function(n,t){return vn("Object",t)?h(n,t):s(n,t)}),yn=dn(l),mn=[].slice,wn=function n(t,r,e){return p(t,function(){var u,o=r;if(arguments.length)for(o=mn.call(r),u=0;u<arguments.length;u++)o.push(arguments[u]);return o.length>=t?e.apply(null,o):n(t,o,e)})},bn=r(function(n,t){return wn(n,[],t)}),jn=[].reverse,En=r(function(n,t){var r,e={};for(r in t)r!==n&&(e[r]=t[r]);return e}),On=r(function(n,t){if(!n)throw new Error("Cannot divide by 0.");return t/n}),Tn=r(function(n,t){return mn.call(t,n)}),kn=r(function(n,t){for(var r=0,e=t.length;r<e&&!n(t[r]);)r+=1;return mn.call(t,r)}),An=r(function(n,t){for(var r=0,e=t.length;r<e&&n(t[r]);)r+=1;return mn.call(t,r)}),xn=r(c),Mn=r(function(n,t){for(var r,e=0,u=t.length;e<u;e++)if(r=t[e],n(r))return r}),Nn=r(function(n,t){for(var r=0,e=t.length;r<e;r++)if(n(t[r]))return r;return-1}),Bn=r(function(n,t){for(var r=t.length-1;r>=0;){if(n(t[r]))return t[r];r--}}),Cn=r(function(n,t){if(t.fmap)return t.fmap(n);if(t.map)return t.map(n);throw new Error("The functor provided to fmap does not implement `map`.")}),Ln=r(T),Pn=r(function(n,t){var r={};return T(function(t){var e=n(t);r[e]=(r[e]||[]).concat(t)},t),r}),Rn=r(function(n,t){return t>n}),Fn=r(function(n,t){return t>=n}),In=r(function(n,t){return pn.call(t,n)}),Sn=r(function(n,t){return n===t}),Un=u(function(n,t,r){return function(e){return n(e)?t(e):r(e)}}),zn=[].push,qn=u(function(n,t,r){var e=mn.call(r,0,n);return e[e.length]=t,zn.apply(e,mn.call(r,n)),e}),Dn=r(function(n,t){return t.join(n)}),Wn=r(function(n,t){for(var r=new Array(t.length),e=0,u=t.length;e<u;e++)r[e]=n(t[e]);return r}),Kn=r(function(n,t){return{get:n,set:t,toString:function(){return"Lens"}}}),Vn=r(function(n,t){return t[n]}),Gn=r(function(n,t){return t<n}),Hn=r(function(n,t){return t<=n}),Jn=r(function(n,t){for(var r=new Array(t.length),e=0,u=t.length;e<u;e++)r[e]=n(t[e],e);return r}),Qn=r(function(n,t){return U(function(r,e){return r[n(e)]=t[e],r},{},Object.keys(t))}),Xn=r(function(n,t){return U(function(r,e){return r[e]=n(t[e]),r},{},Object.keys(t))}),Yn=r(function(n,t){var r={},e=function(n,t){r[n]=t};return W(e,n),W(e,t),r}),Zn=r(function(n,t){return n*t}),$n=r(function(n,t){var r,e,u,o={};for(r in t){for(e=!1,u=0;u<n.length;u++)if(n[u]===r){e=!0;break}e||(o[r]=t[r])}return o}),_n=u(function(n,t,r){return n.set(t,r)}),nt=u(function(n,t,r){return _n(n,t(n.get(r)),r)}),tt=r(function(n,t){return[n,t]}),rt=r(function(n,t){for(var r=[],e=[],u=t.length,o=0;o<u;o++)n(t[o])?r[r.length]=t[o]:e[e.length]=t[o];return[r,e]}),et=r(function(n,t){var r=0,e=t;if(null==e)throw new TypeError("The second argument to `path` must not be undefined or null.");for(;r<n.length;){if(null==e)return e;e=e[n[r]],r+=1}return e}),ut=r(function(n,t){for(var r=0,e=n.length,u={};r<e;)u[n[r]]=t[n[r]],r++;return u}),ot=r(function(n,t){return"string"==typeof t?n+t:un.call([n],t)}),it=u(function(n,t,r){return c(r[n],t)}),ft=u(function(n,t,r){var e,u,o=[];if(0===n)throw new Error("The `increment` value provided to `rangeBy` must be a non-zero number.");if(t===r)throw new Error("The `start` value provided to `rangeBy` must be greater than or less than the `end` value. Received the same value for both: "+t+".");if(n>0&&t>r)throw new Error("The `increment` value provided to `rangeBy` must be negative when the start value ("+t+") is greater than the end value ("+r+"). Received: "+n+".");if(n<0&&t<r)throw new Error("The `increment` value provided to `rangeBy` must be positive when the start value ("+t+") is less than the end value ("+r+"). Received: "+n+".");for(e=Math.abs(Math.ceil((r-t)/n)),u=0;u<e;u++)o.push(t+n*u);return o}),ct=r(function(n,t){if(n<t)return ft(1,n,t);if(n>t)return ft(-1,n,t);throw new Error("The `start` value provided to `range` must be greater than or less than the `end` value. Received the same value for both: "+n+".")}),at=u(U),lt=u(function(n,t,r){return U(n,t,jn.call(r))}),st=r(function(n,t){return dn(g(n),t)}),ht=u(function(n,t,r){return r.replace(n,t)}),pt=u(function(n,t,r){for(var e=0,u=r.length,o=[t];e<u;e++)t=n(t,r[e]),o[o.length]=t;return o}),gt=r(function(n,t){return t.split(n)}),vt=r(function(n,t){return t-n}),dt=r(function(n,t){return mn.call(t,0,n)}),yt=r(function(n,t){for(var r=0,e=t.length;r<e;r++)if(!n(t[r]))return mn.call(t,0,r);return mn.call(t)}),mt=r(function(n,t){return yt(g(n),t)}),wt=r(function(n,t){return n.test(t)}),bt=r(function(n,t){for(var r=0,e=[];r<t;r++)e.push(n(r));return e}),jt=r(function n(t,r){var e,u={};for(e in r)if(pn.call(r,e)&&pn.call(t,e))if("object"==typeof t[e])u[e]=n(t[e],r[e]);else{if("function"!=typeof t[e])throw new Error('Invalid transformation supplied under the key "'+e+'". Transformation must be either a function or object, but was "'+typeof t[e]+'".');u[e]=t[e](r[e])}else u[e]=r[e];return u}),Et=r(function(n,t){return function(r){return n(r)?t(r):r}}),Ot=r(function(n,t){return Et(g(n),t)}),Tt=r(function(n,t){return n.get(t)}),kt=r(function(n,t){var r;for(r in n)if(pn.call(n,r)&&!n[r](t[r]))return!1;return!0}),At=r(function(n,t){for(var r=0,e=t.length,u=[];r<e;)a(t[r],n)||(u[u.length]=t[r]),r++;return u}),xt=r(function(n,t){for(var r=0,e=Math.min(n.length,t.length),u=new Array(e);r<e;r++)u[r]=[n[r],t[r]];return u}),Mt=r(function(n,t){for(var r=0,e=Math.min(n.length,t.length),u={};r<e;r++)u[n[r]]=t[r];return u});n.add=tn,n.all=rn,n.always=e,n.any=en,n.append=on,n.assoc=fn,n.chain=cn,n.clamp=an,n.concat=ln,n.cond=sn,n.contains=gn,n.compact=yn,n.complement=g,n.compose=d,n.curry=y,n.curryN=bn,n.dec=m,n.dissoc=En,n.divide=On,n.drop=Tn,n.dropUntil=kn,n.dropWhile=An,n.empty=w,n.equals=xn,n.F=b,n.filter=dn,n.find=Mn,n.findIndex=Nn,n.findLast=Bn,n.flatMap=cn,n.flatten=j,n.flattenDeep=E,n.flip=O,n.fmap=Cn,n.forEach=Ln,n.fromPairs=k,n.groupBy=Pn,n.gt=Rn,n.gte=Fn,n.has=In,n.head=A,n.identical=Sn,n.identity=l,n.ifElse=Un,n.inc=x,n.init=M,n.insert=qn,n.isEmpty=N,n.isEven=B,n.isNil=C,n.isOdd=L,n.isType=vn,n.join=Dn,n.juxt=P,n.keys=R,n.last=F,n.length=I,n.lens=Kn,n.lensProp=S,n.lt=Gn,n.lte=Hn,n.map=Wn,n.mapi=Jn,n.mapKeys=Qn,n.mapValues=Xn,n.max=z,n.mean=D,n.merge=Yn,n.min=K,n.multiply=Zn,n.of=V,n.omit=$n,n.over=nt,n.pair=tt,n.partition=rt,n.path=et,n.pick=ut,n.pipe=v,n.prepend=ot,n.prop=Vn,n.propEq=it,n.range=ct,n.rangeBy=ft,n.reduce=at,n.foldl=at,n.reduceRight=lt,n.foldr=lt,n.reject=st,n.replace=ht,n.reverse=G,n.scan=pt,n.set=_n,n.split=gt,n.subtract=vt,n.sum=q,n.T=H,n.tail=J,n.take=dt,n.takeUntil=mt,n.takeWhile=yt,n.tap=Q,n.test=wt,n.times=bt,n.toLower=X,n.toUpper=Y,n.toPairs=Z,n.trace=$,n.transform=jt,n.trim=_,n.type=o,n.unless=Ot,n.values=nn,n.view=Tt,n.when=Et,n.where=kt,n.without=At,n.zip=xt,n.zipObj=Mt}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.redash={})}(this,function(n){"use strict";function t(n,t){for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=n(t[r]);return e}function e(n){return n.displayName||n.name||n.toString()}function r(n){return Array.isArray(n)?"["+n.map(r).join(", ")+"]":"function"==typeof n?e(n):JSON.stringify(n)}function u(n,e){return e.length?n+"("+t(r,e).join(", ")+")":n}function i(n,t){return Object.defineProperty(t,"name",{value:n}),Object.defineProperty(t,"displayName",{value:n,configurable:!0,enumerable:!1}),t.toString=function(){return n},t}function o(n,t){if(Object.getOwnPropertyDescriptor(t,"length").writable)return Object.defineProperty(t,"length",{value:n}),t;switch(n){case 0:return function(){return t.apply(null,arguments)};case 1:return function(n){return t.apply(null,arguments)};case 2:return function(n,e){return t.apply(null,arguments)};case 3:return function(n,e,r){return t.apply(null,arguments)};case 4:return function(n,e,r,u){return t.apply(null,arguments)};case 5:return function(n,e,r,u,i){return t.apply(null,arguments)};case 6:return function(n,e,r,u,i,o){return t.apply(null,arguments)};default:throw new Error("Function arity must be <= 6.")}}function a(n,t,e){var r=o(n,function(){var r,u=t,i=n-arguments.length;if(arguments.length)for(u=A.call(u),r=0;r<arguments.length;r++)u[u.length]=arguments[r];return i<=0?e.apply(null,u):a(i,u,e)});return i(u(e.displayName||e.name,t),r),r}function f(n,t){var e=t.length;switch(e){case 0:case 1:return i(n,o(e,t));default:return a(e,[],i(n,t))}}function c(n){return null==n?"Nil":C.call(n).slice(8,-1)}function l(n){for(var t=[],e=t.length,r=n.next();!r.done;)t[e++]=r,r=n.next();return r}function s(n,t){return n===t||n!==n&&t!==t}function h(n,t){var e,r,u;if(e=Object.keys(n),e.length!==Object.keys(t).length)return!1;for(r=e.length-1;r>=0;){if(!z.call(t,e[r]))return!1;r-=1}for(r=e.length-1;r>=0;){if(u=e[r],!p(n[u],t[u]))return!1;r-=1}return!0}function p(n,t){var e,r;if(s(n,t))return!0;if(U(n)!==U(t))return!1;if(!n||!t||"object"!=typeof n)return!1;switch(U(n)){case"Array":return n.length===t.length&&h(n,t);case"Date":return n.valueOf()===t.valueOf();case"Promise":return n===t;case"Map":case"Set":return e=l(n.entries()),r=l(t.entries()),e.length===r.length&&p(e,r);default:return h(n,t)}}function g(n,t){var e;if("string"==typeof t)return t.indexOf(n)!==-1;for(e=t.length-1;e>=0;){if(p(n,t[e]))return!0;e--}return!1}function d(n,t){for(var e=0,r=[];e<t.length;)n(t[e])&&(r[r.length]=t[e]),e++;return r}function y(n){return Object.keys(n)}function m(n,t,e){for(var r=0;r<e.length;r++)t=n(t,e[r]);return t}function v(n,t){return m(function(e,r){return n(t[r])&&(e[r]=t[r]),e},{},y(t))}function w(n,t){for(var e=0;e<t.length;)n(t[e]),e++}function b(){this._items={}}function j(n,t){return m(function(e,r){return e[r]=n(t[r]),e},{},y(t))}function E(n,t){for(var e in t)z.call(t,e)&&n(e,t[e])}function O(n){var t,e={};for(t in n)e[t]=n[t];return e}function T(n){return A.call(n)}function k(n){if(Array.isArray(n))return T(n);if("object"==typeof n&&n)return O(n);throw new TypeError('Cannot shallow clone value of type: "'+typeof n+'".')}var A=[].slice,_=f("add",function(n,t){return n+t}),x=f("all",function(n,t){for(var e=0,r=t.length;e<r;e++)if(!n(t[e]))return!1;return!0}),N=f("always",function(n){return function(){return n}}),P=f("any",function(n,t){for(var e=0;e<t.length;e++)if(n(t[e]))return!0;return!1}),I=[].concat,L=f("append",function(n,t){return"string"==typeof t?t+n:I.call(t,[n])}),B=f("assoc",function(n,t,e){var r,u={};for(r in e)u[r]=e[r];return u[n]=t,u}),M=f("chain",function(n,t){for(var e,r,u=0,i=[];u<t.length;u++)if(e=n(t[u]),Array.isArray(e))for(r=0;r<e.length;r++)i[i.length]=e[r];else i[i.length]=e;return i}),R=f("clamp",function(n,t,e){return e<n?n:e>t?t:e}),S=f("concat",function(n,t){return n.concat(t)}),q=f("cond",function(n,t){for(var e=0;e<n.length;e++)if(n[e][0](t))return n[e][1](t)}),C=Object.prototype.toString,U=f("type",c),z=Object.prototype.hasOwnProperty,F=f("contains",g),D=f("identity",function(n){return n}),W=f("isType",function(n,t){return null==n?typeof n==typeof t:"string"==typeof n?U(t).toLowerCase()===n.toLowerCase():t instanceof n||t.constructor===n}),K=f("filter",function(n,t){return W("Object",t)?v(n,t):d(n,t)}),J=f("compact",K(D)),G=f("curryN",function(n,t){return a(n,[],t)}),H=f("complement",function(n){return G(n.length,function(){return!n.apply(null,arguments)})}),Q=[].reverse,V=f("pipe",function(n){for(var t,e=0;e<n.length;e++)if(!W("function",n[e]))throw new TypeError("Invalid argument supplied to `pipe`. The value at index ["+e+"] was not a function; what was received was of type: "+U(n[e])+".");return t=a(n[0].length,[],function(){for(var t=0,e=n.length,r=n[t++].apply(null,arguments);t<e;t++)r=n[t](r);return r}),i("pipe",[n],t),t}),X=f("compose",function(n){for(var t=0;t<n.length;t++)if(!W("function",n[t]))throw new TypeError("Invalid argument supplied to `compose`. The value at index ["+t+"] was not a function; what was received was of type: "+U(n[t])+".");return V(Q.call(n))}),Y=f("curry",function(n){return G(n.length,n)}),Z=f("dec",function(n){return n-1}),$=f("dissoc",function(n,t){var e,r={};for(e in t)e!==n&&(r[e]=t[e]);return r}),nn=f("divide",function(n,t){if(!n)throw new Error("Cannot divide by 0.");return t/n}),tn=f("drop",function(n,t){return A.call(t,n)}),en=f("dropUntil",function(n,t){for(var e=0;e<t.length&&!n(t[e]);)e+=1;return A.call(t,e)}),rn=f("dropWhile",function(n,t){for(var e=0;e<t.length&&n(t[e]);)e+=1;return A.call(t,e)}),un=f("empty",function(n){if(null!=n){if("function"==typeof n.empty)return n.empty();if(n.constructor&&"function"==typeof n.constructor.empty)return n.constructor.empty();switch(U(n)){case"Array":return[];case"String":return"";case"Object":return{};default:return}}}),on=f("equals",p),an=f("F",N(!1)),fn=f("find",function(n,t){for(var e=0;e<t.length;e++)if(n(t[e]))return t[e]}),cn=f("findIndex",function(n,t){for(var e=0;e<t.length;e++)if(n(t[e]))return e;return-1}),ln=f("findLast",function(n,t){for(var e=t.length-1;e>=0;){if(n(t[e]))return t[e];e--}}),sn=f("flatten",function(n){for(var t,e,r=[],u=0;u<n.length;u++)if(t=n[u],Array.isArray(t))for(e=0;e<t.length;e++)r.push(t[e]);else r.push(t);return r}),hn=f("flattenDeep",function n(t){for(var e,r,u=[],i=0;i<t.length;i++)if(e=t[i],Array.isArray(e))for(e=n(e),r=0;r<e.length;r++)u[u.length]=e[r];else u[u.length]=e;return u}),pn=f("flip",function(n){return G(n.length,function(){return n.apply(null,Q.call(arguments))})}),gn=f("fmap",function(n,t){if(t.fmap)return t.fmap(n);if(t.map)return t.map(n);throw new Error("The functor provided to fmap does not implement `map`.")}),dn=f("forEach",w),yn=f("fromPairs",function(n){for(var t=0,e={};t<n.length;t++)e[n[t][0]]=n[t][1];return e}),mn=f("groupBy",function(n,t){return m(function(t,e){var r=n(e);return t[r]=(t[r]||[]).concat(e),t},{},t)}),vn=f("get",function(n,t){return t[n]}),wn=f("getEq",function(n,t,e){return p(e[n],t)}),bn=f("getIn",function(n,t){var e=0,r=t;if(null==r)throw new TypeError("The second argument to `getIn` must not be undefined or null.");for(;e<n.length;){if(null==r)return r;r=r[n[e]],e+=1}return r}),jn=f("gt",function(n,t){return t>n}),En=f("gte",function(n,t){return t>=n}),On=f("has",function(n,t){return z.call(t,n)}),Tn=f("head",function(n){return n[0]}),kn=f("identical",s),An=f("ifElse",function(n,t,e){return function(r){return n(r)?t(r):e(r)}}),_n=f("inc",function(n){return n+1}),xn=f("init",function(n){return A.call(n,0,n.length-1)}),Nn=f("insert",function(n,t,e){var r=A.call(e,0,n);return r[r.length]=t,r.concat(A.call(e,n))}),Pn=f("isEmpty",function(n){return!n||p(n,un(n))}),In=f("isEven",function(n){return!isNaN(n)&&isFinite(n)&&n%2===0}),Ln=f("isNil",function(n){return null==n}),Bn=f("isOdd",function(n){return!isNaN(n)&&isFinite(n)&&!!n&&n===Math.floor(n)&&n%2!==0});b.prototype.add=function(n){var t=typeof n;switch(t){case"boolean":case"number":case"string":return this._items[t]?!this._items[t][n]&&(this._items[t][n]=!0,!0):(this._items[t]={},this._items[t][n]=!0,!0);case"undefined":return!this._items.undefined&&(this._items.undefined=!0,!0);case"object":if(null==n)return!this._items.null&&(this._items.null=!0,!0);default:return this._items[t]?!g(n,this._items[t])&&(this._items[t][this._items[t].length]=n,!0):(this._items[t]=[n],!0)}},b.prototype.clear=function(){this._items={}};var Mn=f("intersection",function(n,t){var e,r,u=0,i=[],o=new b;for(n.length<t.length?(e=t,r=n):(r=t,e=n);u<e.length;u++)o.add(e[u]);for(u=0;u<r.length;u++)o.add(r[u])||(i[i.length]=r[u]);return i}),Rn=f("join",function(n,t){return t.join(n)}),Sn=f("map",function(n,e){return W("Object",e)?j(n,e):t(n,e)}),qn=f("juxt",function(n){return function(){var t=A.call(arguments);return Sn(function(n){return n.apply(null,t)},n)}}),Cn=f("keys",y),Un=f("last",function(n){return n[n.length-1]}),zn=f("length",function(n){return n.length}),Fn=f("lens",function(n,t){return{get:n,set:t,toString:function(){return"Lens"}}}),Dn=f("lensProp",function(n){return Fn(vn(n),B(n))}),Wn=f("lt",function(n,t){return t<n}),Kn=f("lte",function(n,t){return t<=n}),Jn=f("mapi",function(n,t){for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=n(t[r],r);return e}),Gn=f("mapKeys",function(n,t){return m(function(e,r){return e[n(r)]=t[r],e},{},Object.keys(t))}),Hn=String.prototype.match,Qn=f("match",function(n,t){return Hn.call(t,n)||[]}),Vn=f("max",function(n){for(var t=n.length-1,e=n[t--];t>=0;)n[t]>e&&(e=n[t]),t--;return e}),Xn=f("sum",function(n){for(var t=0,e=0;t<n.length;t++)e+=n[t];return e}),Yn=f("mean",function(n){if(!n.length)throw new Error("Cannot calculate the mean of an empty list.");return Xn(n)/n.length}),Zn=f("merge",function(n,t){var e={},r=function(n,t){e[n]=t};return E(r,n),E(r,t),e}),$n=f("min",function(n){for(var t=n.length-1,e=n[t--];t>=0;)n[t]<e&&(e=n[t]),t--;return e}),nt=f("multiply",function(n,t){return n*t}),tt=f("of",function(n){return[n]}),et=f("omit",function(n,t){var e,r,u,i={};for(e in t){for(r=!1,u=0;u<n.length;u++)if(n[u]===e){r=!0;break}r||(i[e]=t[e])}return i}),rt=f("set",function(n,t,e){return n.set(t,e)}),ut=f("over",function(n,t,e){return rt(n,t(n.get(e)),e)}),it=f("padLeft",function(n,t,e){for(;e.length<n;)e=t+e;return e}),ot=f("padRight",function(n,t,e){for(;e.length<n;)e+=t;return e}),at=f("pad",function(n,t,e){var r=e.length+Math.ceil((n-e.length)/2);return ot(n,t,it(r,t,e))}),ft=f("pair",function(n,t){return[n,t]}),ct=f("partition",function(n,t){for(var e=[],r=[],u=0;u<t.length;u++)n(t[u])?e[e.length]=t[u]:r[r.length]=t[u];return[e,r]}),lt=f("pick",function(n,t){for(var e=0,r={};e<n.length;)r[n[e]]=t[n[e]],e++;return r}),st=f("prepend",function(n,t){return"string"==typeof t?n+t:I.call([n],t)}),ht=f("rangeBy",function(n,t,e){var r,u,i=[];if(0===n)throw new Error("The `increment` value provided to `rangeBy` must be a non-zero number.");if(t===e)throw new Error("The `start` value provided to `rangeBy` must be greater than or less than the `end` value. Received the same value for both: "+t+".");if(n>0&&t>e)throw new Error("The `increment` value provided to `rangeBy` must be negative when the start value ("+t+") is greater than the end value ("+e+"). Received: "+n+".");if(n<0&&t<e)throw new Error("The `increment` value provided to `rangeBy` must be positive when the start value ("+t+") is less than the end value ("+e+"). Received: "+n+".");for(r=Math.abs(Math.ceil((e-t)/n)),u=0;u<r;u++)i.push(t+n*u);return i}),pt=f("range",function(n,t){if(n<t)return ht(1,n,t);if(n>t)return ht(-1,n,t);throw new Error("The `start` value provided to `range` must be greater than or less than the `end` value. Received the same value for both: "+n+".")}),gt=f("reduce",m),dt=f("reduceRight",function(n,t,e){return m(n,t,Q.call(e))}),yt=f("reject",function(n,t){return K(H(n),t)}),mt=f("replace",function(n,t,e){return e.replace(n,t)}),vt=f("reverse",function(n){return Q.call(A.call(n))}),wt=f("scan",function(n,t,e){for(var r=0,u=[t];r<e.length;r++)t=n(t,e[r]),u[u.length]=t;return u}),bt=f("split",function(n,t){return t.split(n)}),jt=f("subtract",function(n,t){return t-n}),Et=f("T",N(!0)),Ot=f("tail",function(n){return A.call(n,1)}),Tt=f("take",function(n,t){return A.call(t,0,n)}),kt=f("takeWhile",function(n,t){for(var e=0;e<t.length;e++)if(!n(t[e]))return A.call(t,0,e);return A.call(t)}),At=f("takeUntil",function(n,t){return kt(H(n),t)}),_t=f("tap",function(n){return function(t){return n(t),t}}),xt=f("test",function(n,t){return n.test(t)}),Nt=f("times",function(n,t){for(var e=0,r=[];e<t;e++)r.push(n(e));return r}),Pt=f("toLower",function(n){return n.toLowerCase()}),It=f("toUpper",function(n){return n.toUpperCase()}),Lt=f("toPairs",function(n){var t=[];return E(function(n,e){t.push([n,e])},n),t}),Bt=f("trace",function(n){return i(u("trace",[n]),_t(function(t){console.log(n,t)}))}),Mt=f("transform",function n(t,e){var r,u={};for(r in e)if(z.call(e,r)&&z.call(t,r))if("object"==typeof t[r])u[r]=n(t[r],e[r]);else{if("function"!=typeof t[r])throw new Error('Invalid transformation supplied under the key "'+r+'". Transformation must be either a function or object, but was "'+typeof t[r]+'".');u[r]=t[r](e[r])}else u[r]=e[r];return u}),Rt=f("trim",function(n){return n.trim()}),St=f("unique",function(n){for(var t=0,e=[],r=new b;t<n.length;t++)r.add(n[t])&&(e[e.length]=n[t]);return r.clear(),e}),qt=f("when",function(n,t){return function(e){return n(e)?t(e):e}}),Ct=f("unless",function(n,t){return qt(H(n),t)}),Ut=f("updateIn",function(n,t,e){var r=k(e),u=n[0];return n.length>1?(r[u]=r[u]||{},r[u]=Ut(n.slice(1),t,r[u]),r):(r[u]=t(r[u]),r)}),zt=f("update",function(n,t,e){return Ut([n],t,e)}),Ft=f("values",function(n){for(var t=Object.keys(n),e=0,r=new Array(t.length);e<t.length;)r[e]=n[t[e]],e+=1;return r}),Dt=f("view",function(n,t){return n.get(t)}),Wt=f("where",function(n,t){var e;for(e in n)if(z.call(n,e)&&!n[e](t[e]))return!1;return!0}),Kt=f("without",function(n,t){for(var e=0,r=[];e<t.length;)g(t[e],n)||(r[r.length]=t[e]),e++;return r}),Jt=f("zip",function(n,t){for(var e=0,r=Math.min(n.length,t.length),u=new Array(r);e<r;e++)u[e]=[n[e],t[e]];return u}),Gt=f("zipObj",function(n,t){for(var e=0,r=Math.min(n.length,t.length),u={};e<r;e++)u[n[e]]=t[e];return u});n.add=_,n.all=x,n.always=N,n.any=P,n.append=L,n.assoc=B,n.chain=M,n.clamp=R,n.concat=S,n.cond=q,n.contains=F,n.compact=J,n.complement=H,n.compose=X,n.curry=Y,n.curryN=G,n.dec=Z,n.dissoc=$,n.divide=nn,n.drop=tn,n.dropUntil=en,n.dropWhile=rn,n.empty=un,n.equals=on,n.F=an,n.filter=K,n.find=fn,n.findIndex=cn,n.findLast=ln,n.flatten=sn,n.flattenDeep=hn,n.flip=pn,n.fmap=gn,n.forEach=dn,n.fromPairs=yn,n.groupBy=mn,n.get=vn,n.getEq=wn,n.getIn=bn,n.gt=jn,n.gte=En,n.has=On,n.head=Tn,n.identical=kn,n.identity=D,n.ifElse=An,n.inc=_n,n.init=xn,n.insert=Nn,n.isEmpty=Pn,n.isEven=In,n.isNil=Ln,n.isOdd=Bn,n.isType=W,n.intersection=Mn,n.join=Rn,n.juxt=qn,n.keys=Cn,n.last=Un,n.length=zn,n.lens=Fn,n.lensProp=Dn,n.lt=Wn,n.lte=Kn,n.map=Sn,n.mapi=Jn,n.mapKeys=Gn,n.match=Qn,n.max=Vn,n.mean=Yn,n.merge=Zn,n.min=$n,n.multiply=nt,n.of=tt,n.omit=et,n.over=ut,n.pad=at,n.padLeft=it,n.padRight=ot,n.pair=ft,n.partition=ct,n.pick=lt,n.pipe=V,n.prepend=st,n.range=pt,n.rangeBy=ht,n.reduce=gt,n.foldl=gt,n.reduceRight=dt,n.foldr=dt,n.reject=yt,n.replace=mt,n.reverse=vt,n.scan=wt,n.set=rt,n.split=bt,n.subtract=jt,n.sum=Xn,n.T=Et,n.tail=Ot,n.take=Tt,n.takeUntil=At,n.takeWhile=kt,n.tap=_t,n.test=xt,n.times=Nt,n.toLower=Pt,n.toUpper=It,n.toPairs=Lt,n.trace=Bt,n.transform=Mt,n.trim=Rt,n.type=U,n.unique=St,n.unless=Ct,n.update=zt,n.updateIn=Ut,n.values=Ft,n.view=Dt,n.when=qt,n.where=Wt,n.without=Kt,n.zip=Jt,n.zipObj=Gt,n.flatMap=M,n.path=bn,n.prop=vn,n.propEq=wn}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
294302
8881
15
57