Comparing version 0.17.0 to 0.18.0
@@ -0,1 +1,21 @@ | ||
## v0.18.0 | ||
### Migration path | ||
* Internal `arity` function no longer preserves `this` context. This should not affect the public API, but always be sure that you are not implicitly relying on `this` when working with redash. | ||
### Features | ||
* Added `clamp`. | ||
* Added `groupBy`. | ||
* Added `takeUntil`. | ||
* Added `trace`. | ||
* Added `transform`. | ||
* Added `flatMap` alias for `chain`. | ||
### Improvements | ||
* `concat` now dispatches to the first argument's `concat` method. | ||
* `concat` now supports strings. | ||
* `curry` now supplies _all_ arguments to the wrapped function. This improves support for functions that do not properly report their arities. | ||
* `filter` now works for objects. | ||
* `reject` now works for objects. | ||
## v0.17.0 | ||
@@ -2,0 +22,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.fp=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":cn.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(!an.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){for(var t=0,r=n.length,e=[];t<r;t++)n[t]&&(e[e.length]=n[t]);return e}function l(n,t){switch(n){case 4:return function(n,r,e,u){return t.apply(this,arguments)};case 5:return function(n,r,e,u,o){return t.apply(this,arguments)};case 6:return function(n,r,e,u,o,i){return t.apply(this,arguments)};default:throw new Error("Arity must be less than or equal to 6.")}}function h(n){return pn(n.length,function(){return!n.apply(null,arguments)})}function s(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 pn(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 p(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 s(gn.call(n))}function g(n){return pn(n.length,n)}function v(n){return n-1}function d(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 y(){return!1}function m(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 w(n){for(var t,r,e,u=[],o=0,i=n.length;o<i;o++)if(t=n[o],Array.isArray(t))for(t=w(t),r=0,e=t.length;r<e;r++)u[u.length]=t[r];else u[u.length]=t;return u}function b(n){return pn(n.length,function(){return n.apply(null,gn.call(arguments))})}function j(n){for(var t=0,r=n.length,e={};t<r;t++)e[n[t][0]]=n[t][1];return e}function E(n){return n[0]}function O(n){return n}function T(n){return n+1}function A(n){return hn.call(n,0,n.length-1)}function k(n){return null!=n&&f(n,d(n))}function x(n){return!isNaN(n)&&isFinite(n)&&n%2===0}function N(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=hn.call(arguments);return Sn(function(n){return n.apply(null,t)},n)}}function M(n){return Object.keys(n)}function B(n){return n[n.length-1]}function P(n){return n.length}function R(n){return qn(Fn(n),en(n))}function z(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 q(n){for(var t=0,r=n.length,e=0;t<r;t++)e+=n[t];return e}function F(n){if(!n.length)throw new Error("Cannot calculate the mean of an empty list.");return q(n)/n.length}function I(n,t){for(var r in t)an.call(t,r)&&n(r,t[r])}function U(n){for(var t=n.length-1,r=n[t--];t>=0;)n[t]<r&&(r=n[t]),t--;return r}function D(n){return[n]}function W(n){return gn.call(hn.call(n,0))}function K(){return!0}function V(n){return hn.call(n,1)}function G(n){return n.toLowerCase()}function H(n){return n.toUpperCase()}function J(n){return function(t){return n(t),t}}function Q(n){var t=[];return I(function(n,r){t.push([n,r])},n),t}function X(n){return n.trim()}function Y(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 Z(n){for(var t,r=Object.keys(jt),e=r.length,u=0;u<e;)t=r[u],n[t]=jt[t],u+=1}var $=t(function(n,t){return n+t}),_=t(function(n,t){for(var r=0,e=t.length;r<e;r++)if(!n(t[r]))return!1;return!0}),nn=t(function(n,t){for(var r=0,e=t.length;r<e;r++)if(n(t[r]))return!0;return!1}),tn=[].concat,rn=t(function(n,t){return"string"==typeof t?t+n:tn.call(t,[n])}),en=e(function(n,t,r){var e,u={};for(e in r)u[e]=r[e];return u[n]=t,u}),un=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}),on=t(function(n,t){return tn.call(n,t)}),fn=t(function(n,t){for(var r=0,e=n.length;r<e;r++)if(n[r][0](t))return n[r][1](t)}),cn=Object.prototype.toString,an=Object.prototype.hasOwnProperty,ln=t(c),hn=[].slice,sn=function n(t,r,e){return l(t,function(){var u,o=r;if(arguments.length)for(o=hn.call(r),u=0;u<arguments.length;u++)o.push(arguments[u]);return o.length>=t?e.apply(null,o):n(t,o,e)})},pn=t(function(r,u){switch(r){case 0:return u;case 1:return n(u);case 2:return t(u);case 3:return e(u);default:return sn(r,[],u)}}),gn=[].reverse,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){var r,e={};for(r in t)r!==n&&(e[r]=t[r]);return e}),yn=t(function(n,t){if(!n)throw new Error("Cannot divide by 0.");return t/n}),mn=t(function(n,t){return hn.call(t,n)}),wn=t(function(n,t){for(var r=0,e=t.length;r<e&&!n(t[r]);)r+=1;return hn.call(t,r)}),bn=t(function(n,t){for(var r=0,e=t.length;r<e&&n(t[r]);)r+=1;return hn.call(t,r)}),jn=t(f),En=t(function(n,t){for(var r,e=0,u=t.length,o=[];e<u;)r=t[e++],n(r)&&(o[o.length]=r);return o}),On=t(function(n,t){for(var r,e=0,u=t.length;e<u;e++)if(r=t[e],n(r))return r}),Tn=t(function(n,t){for(var r=0,e=t.length;r<e;r++)if(n(t[r]))return r;return-1}),An=t(function(n,t){for(var r=t.length-1;r>=0;){if(n(t[r]))return t[r];r--}}),kn=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`.")}),xn=t(function(n,t){for(var r=0,e=t.length;r<e;r++)n(t[r])}),Nn=t(function(n,t){return t>n}),Cn=t(function(n,t){return t>=n}),Ln=t(function(n,t){return an.call(t,n)}),Mn=t(function(n,t){return n===t}),Bn=e(function(n,t,r){return function(e){return n(e)?t(e):r(e)}}),Pn=[].push,Rn=e(function(n,t,r){var e=hn.call(r,0,n);return e[e.length]=t,Pn.apply(e,hn.call(r,n)),e}),zn=t(function(n,t){return t.join(n)}),Sn=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}),qn=t(function(n,t){return{get:n,set:t,toString:function(){return"Lens"}}}),Fn=t(function(n,t){return t[n]}),In=t(function(n,t){return t<n}),Un=t(function(n,t){return t<=n}),Dn=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}),Wn=t(function(n,t){return z(function(r,e){return r[n(e)]=t[e],r},{},Object.keys(t))}),Kn=t(function(n,t){return z(function(r,e){return r[e]=n(t[e]),r},{},Object.keys(t))}),Vn=t(function(n,t){var r={},e=function(n,t){r[n]=t};return I(e,n),I(e,t),r}),Gn=t(function(n,t){return n*t}),Hn=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}),Jn=e(function(n,t,r){return n.set(t,r)}),Qn=e(function(n,t,r){return Jn(n,t(n.get(r)),r)}),Xn=t(function(n,t){return[n,t]}),Yn=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]}),Zn=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}),$n=t(function(n,t){for(var r=0,e=n.length,u={};r<e;)u[n[r]]=t[n[r]],r++;return u}),_n=t(function(n,t){return"string"==typeof t?n+t:tn.call([n],t)}),nt=e(function(n,t,r){return f(r[n],t)}),tt=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}),rt=t(function(n,t){if(n<t)return tt(1,n,t);if(n>t)return tt(-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+".")}),et=e(z),ut=e(function(n,t,r){return z(n,t,gn.call(r))}),ot=t(function(n,t){for(var r,e=0,u=t.length,o=[];e<u;)r=t[e++],n(r)||(o[o.length]=r);return o}),it=e(function(n,t,r){return r.replace(n,t)}),ft=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}),ct=t(function(n,t){return t.split(n)}),at=t(function(n,t){return t-n}),lt=t(function(n,t){return hn.call(t,0,n)}),ht=t(function(n,t){for(var r=0,e=t.length;r<e;r++)if(!n(t[r]))return hn.call(t,0,r);return hn.call(t)}),st=t(function(n,t){return n.test(t)}),pt=t(function(n,t){for(var r=0,e=[];r<t;r++)e.push(n(r));return e}),gt=t(function(n,t){return function(r){return n(r)?t(r):r}}),vt=t(function(n,t){return gt(h(n),t)}),dt=t(function(n,t){return n.get(t)}),yt=t(function(n,t){var r;for(r in n)if(an.call(n,r)&&!n[r](t[r]))return!1;return!0}),mt=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}),wt=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}),bt=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}),jt=Object.freeze({add:$,all:_,always:r,any:nn,append:rn,assoc:en,chain:un,concat:on,cond:fn,contains:ln,compact:a,complement:h,compose:p,curry:g,curryN:pn,dec:v,dissoc:dn,divide:yn,drop:mn,dropUntil:wn,dropWhile:bn,empty:d,equals:jn,F:y,filter:En,find:On,findIndex:Tn,findLast:An,flatten:m,flattenDeep:w,flip:b,fmap:kn,forEach:xn,fromPairs:j,gt:Nn,gte:Cn,has:Ln,head:E,identical:Mn,identity:O,ifElse:Bn,inc:T,init:A,insert:Rn,isEmpty:k,isEven:x,isNil:N,isOdd:C,isType:vn,join:zn,juxt:L,keys:M,last:B,length:P,lens:qn,lensProp:R,lt:In,lte:Un,map:Sn,mapi:Dn,mapKeys:Wn,mapValues:Kn,max:S,mean:F,merge:Vn,min:U,multiply:Gn,of:D,omit:Hn,over:Qn,pair:Xn,partition:Yn,path:Zn,pick:$n,pipe:s,prepend:_n,prop:Fn,propEq:nt,range:rt,rangeBy:tt,reduce:et,foldl:et,reduceRight:ut,foldr:ut,reject:ot,replace:it,reverse:W,scan:ft,set:Jn,split:ct,subtract:at,sum:q,T:K,tail:V,take:lt,takeWhile:ht,test:st,times:pt,toLower:G,toUpper:H,tap:J,toPairs:Q,trim:X,type:u,unless:vt,values:Y,view:dt,when:gt,where:yt,without:mt,zip:wt,zipObj:bt});return Z}); | ||
!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}); |
{ | ||
"name": "redash", | ||
"version": "0.17.0", | ||
"version": "0.18.0", | ||
"description": "A better Standard Library for JavaScript", | ||
@@ -21,5 +21,5 @@ "main": "redash.js", | ||
"bundle": "npm run bundle:main && npm run bundle:next && npm run bundle:installer", | ||
"bundle:main": "rollup --format umd --name fp -i src/bundles/index.js -o dist/redash.js", | ||
"bundle:next": "rollup --format es6 --name fp -i src/bundles/index.js -o dist/redash.next.js", | ||
"bundle:installer": "rollup --format umd --name fp -i src/bundles/installer.js -o dist/installer.js", | ||
"bundle:main": "rollup --format umd --name redash -i src/bundles/index.js -o dist/redash.js", | ||
"bundle:next": "rollup --format es6 --name redash -i src/bundles/index.js -o dist/redash.next.js", | ||
"bundle:installer": "rollup --format umd --name redash -i src/bundles/installer.js -o dist/installer.js", | ||
"minify": "npm run minify:main && npm run minify:installer", | ||
@@ -31,3 +31,4 @@ "minify:main": "uglifyjs dist/redash.js --compress --mangle -o dist/redash.min.js", | ||
"test": "ava", | ||
"build:docs": "node scripts/generate-docs", | ||
"docs:cache": "node docs/scripts/parse-docs", | ||
"docs:start": "nodemon docs/scripts/build-docs --watch docs", | ||
"prepublish": "npm run deploy" | ||
@@ -51,11 +52,9 @@ }, | ||
"devDependencies": { | ||
"async": "^2.1.4", | ||
"ava": "^0.16.0", | ||
"benchmark": "^2.1.1", | ||
"eslint": "^2.13.1", | ||
"jsdoc": "^3.4.2", | ||
"lodash": "^4.16.3", | ||
"marked": "^0.3.6", | ||
"mocha": "^2.3.4", | ||
"ramda": "^0.22.1", | ||
"react": "^15.4.1", | ||
"react-dom": "^15.4.1", | ||
"rollup": "^0.21.0", | ||
@@ -62,0 +61,0 @@ "shelljs": "^0.7.4", |
@@ -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.fp={})}(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":cn.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(!an.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){for(var t=0,r=n.length,e=[];t<r;t++)n[t]&&(e[e.length]=n[t]);return e}function h(n,t){switch(n){case 4:return function(n,r,e,u){return t.apply(this,arguments)};case 5:return function(n,r,e,u,o){return t.apply(this,arguments)};case 6:return function(n,r,e,u,o,i){return t.apply(this,arguments)};default:throw new Error("Arity must be less than or equal to 6.")}}function s(n){return pn(n.length,function(){return!n.apply(null,arguments)})}function p(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 pn(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 g(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 p(gn.call(n))}function v(n){return pn(n.length,n)}function d(n){return n-1}function y(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 m(){return!1}function w(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 b(n){for(var t,r,e,u=[],o=0,i=n.length;o<i;o++)if(t=n[o],Array.isArray(t))for(t=b(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 pn(n.length,function(){return n.apply(null,gn.call(arguments))})}function j(n){for(var t=0,r=n.length,e={};t<r;t++)e[n[t][0]]=n[t][1];return e}function O(n){return n[0]}function T(n){return n}function A(n){return n+1}function k(n){return hn.call(n,0,n.length-1)}function x(n){return null!=n&&c(n,y(n))}function N(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 M(n){return function(){var t=hn.call(arguments);return qn(function(n){return n.apply(null,t)},n)}}function B(n){return Object.keys(n)}function P(n){return n[n.length-1]}function R(n){return n.length}function S(n){return zn(Fn(n),en(n))}function q(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 F(n){for(var t=0,r=n.length,e=0;t<r;t++)e+=n[t];return e}function I(n){if(!n.length)throw new Error("Cannot calculate the mean of an empty list.");return F(n)/n.length}function U(n,t){for(var r in t)an.call(t,r)&&n(r,t[r])}function D(n){for(var t=n.length-1,r=n[t--];t>=0;)n[t]<r&&(r=n[t]),t--;return r}function W(n){return[n]}function K(n){return gn.call(hn.call(n,0))}function V(){return!0}function G(n){return hn.call(n,1)}function H(n){return n.toLowerCase()}function J(n){return n.toUpperCase()}function Q(n){return function(t){return n(t),t}}function X(n){var t=[];return U(function(n,r){t.push([n,r])},n),t}function Y(n){return n.trim()}function Z(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 $=r(function(n,t){return n+t}),_=r(function(n,t){for(var r=0,e=t.length;r<e;r++)if(!n(t[r]))return!1;return!0}),nn=r(function(n,t){for(var r=0,e=t.length;r<e;r++)if(n(t[r]))return!0;return!1}),tn=[].concat,rn=r(function(n,t){return"string"==typeof t?t+n:tn.call(t,[n])}),en=u(function(n,t,r){var e,u={};for(e in r)u[e]=r[e];return u[n]=t,u}),un=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}),on=r(function(n,t){return tn.call(n,t)}),fn=r(function(n,t){for(var r=0,e=n.length;r<e;r++)if(n[r][0](t))return n[r][1](t)}),cn=Object.prototype.toString,an=Object.prototype.hasOwnProperty,ln=r(a),hn=[].slice,sn=function n(t,r,e){return h(t,function(){var u,o=r;if(arguments.length)for(o=hn.call(r),u=0;u<arguments.length;u++)o.push(arguments[u]);return o.length>=t?e.apply(null,o):n(t,o,e)})},pn=r(function(n,e){switch(n){case 0:return e;case 1:return t(e);case 2:return r(e);case 3:return u(e);default:return sn(n,[],e)}}),gn=[].reverse,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){var r,e={};for(r in t)r!==n&&(e[r]=t[r]);return e}),yn=r(function(n,t){if(!n)throw new Error("Cannot divide by 0.");return t/n}),mn=r(function(n,t){return hn.call(t,n)}),wn=r(function(n,t){for(var r=0,e=t.length;r<e&&!n(t[r]);)r+=1;return hn.call(t,r)}),bn=r(function(n,t){for(var r=0,e=t.length;r<e&&n(t[r]);)r+=1;return hn.call(t,r)}),En=r(c),jn=r(function(n,t){for(var r,e=0,u=t.length,o=[];e<u;)r=t[e++],n(r)&&(o[o.length]=r);return o}),On=r(function(n,t){for(var r,e=0,u=t.length;e<u;e++)if(r=t[e],n(r))return r}),Tn=r(function(n,t){for(var r=0,e=t.length;r<e;r++)if(n(t[r]))return r;return-1}),An=r(function(n,t){for(var r=t.length-1;r>=0;){if(n(t[r]))return t[r];r--}}),kn=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`.")}),xn=r(function(n,t){for(var r=0,e=t.length;r<e;r++)n(t[r])}),Nn=r(function(n,t){return t>n}),Cn=r(function(n,t){return t>=n}),Ln=r(function(n,t){return an.call(t,n)}),Mn=r(function(n,t){return n===t}),Bn=u(function(n,t,r){return function(e){return n(e)?t(e):r(e)}}),Pn=[].push,Rn=u(function(n,t,r){var e=hn.call(r,0,n);return e[e.length]=t,Pn.apply(e,hn.call(r,n)),e}),Sn=r(function(n,t){return t.join(n)}),qn=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}),zn=r(function(n,t){return{get:n,set:t,toString:function(){return"Lens"}}}),Fn=r(function(n,t){return t[n]}),In=r(function(n,t){return t<n}),Un=r(function(n,t){return t<=n}),Dn=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}),Wn=r(function(n,t){return q(function(r,e){return r[n(e)]=t[e],r},{},Object.keys(t))}),Kn=r(function(n,t){return q(function(r,e){return r[e]=n(t[e]),r},{},Object.keys(t))}),Vn=r(function(n,t){var r={},e=function(n,t){r[n]=t};return U(e,n),U(e,t),r}),Gn=r(function(n,t){return n*t}),Hn=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}),Jn=u(function(n,t,r){return n.set(t,r)}),Qn=u(function(n,t,r){return Jn(n,t(n.get(r)),r)}),Xn=r(function(n,t){return[n,t]}),Yn=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]}),Zn=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}),$n=r(function(n,t){for(var r=0,e=n.length,u={};r<e;)u[n[r]]=t[n[r]],r++;return u}),_n=r(function(n,t){return"string"==typeof t?n+t:tn.call([n],t)}),nt=u(function(n,t,r){return c(r[n],t)}),tt=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}),rt=r(function(n,t){if(n<t)return tt(1,n,t);if(n>t)return tt(-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+".")}),et=u(q),ut=u(function(n,t,r){return q(n,t,gn.call(r))}),ot=r(function(n,t){for(var r,e=0,u=t.length,o=[];e<u;)r=t[e++],n(r)||(o[o.length]=r);return o}),it=u(function(n,t,r){return r.replace(n,t)}),ft=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}),ct=r(function(n,t){return t.split(n)}),at=r(function(n,t){return t-n}),lt=r(function(n,t){return hn.call(t,0,n)}),ht=r(function(n,t){for(var r=0,e=t.length;r<e;r++)if(!n(t[r]))return hn.call(t,0,r);return hn.call(t)}),st=r(function(n,t){return n.test(t)}),pt=r(function(n,t){for(var r=0,e=[];r<t;r++)e.push(n(r));return e}),gt=r(function(n,t){return function(r){return n(r)?t(r):r}}),vt=r(function(n,t){return gt(s(n),t)}),dt=r(function(n,t){return n.get(t)}),yt=r(function(n,t){var r;for(r in n)if(an.call(n,r)&&!n[r](t[r]))return!1;return!0}),mt=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}),wt=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}),bt=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=$,n.all=_,n.always=e,n.any=nn,n.append=rn,n.assoc=en,n.chain=un,n.concat=on,n.cond=fn,n.contains=ln,n.compact=l,n.complement=s,n.compose=g,n.curry=v,n.curryN=pn,n.dec=d,n.dissoc=dn,n.divide=yn,n.drop=mn,n.dropUntil=wn,n.dropWhile=bn,n.empty=y,n.equals=En,n.F=m,n.filter=jn,n.find=On,n.findIndex=Tn,n.findLast=An,n.flatten=w,n.flattenDeep=b,n.flip=E,n.fmap=kn,n.forEach=xn,n.fromPairs=j,n.gt=Nn,n.gte=Cn,n.has=Ln,n.head=O,n.identical=Mn,n.identity=T,n.ifElse=Bn,n.inc=A,n.init=k,n.insert=Rn,n.isEmpty=x,n.isEven=N,n.isNil=C,n.isOdd=L,n.isType=vn,n.join=Sn,n.juxt=M,n.keys=B,n.last=P,n.length=R,n.lens=zn,n.lensProp=S,n.lt=In,n.lte=Un,n.map=qn,n.mapi=Dn,n.mapKeys=Wn,n.mapValues=Kn,n.max=z,n.mean=I,n.merge=Vn,n.min=D,n.multiply=Gn,n.of=W,n.omit=Hn,n.over=Qn,n.pair=Xn,n.partition=Yn,n.path=Zn,n.pick=$n,n.pipe=p,n.prepend=_n,n.prop=Fn,n.propEq=nt,n.range=rt,n.rangeBy=tt,n.reduce=et,n.foldl=et,n.reduceRight=ut,n.foldr=ut,n.reject=ot,n.replace=it,n.reverse=K,n.scan=ft,n.set=Jn,n.split=ct,n.subtract=at,n.sum=F,n.T=V,n.tail=G,n.take=lt,n.takeWhile=ht,n.test=st,n.times=pt,n.toLower=H,n.toUpper=J,n.tap=Q,n.toPairs=X,n.trim=Y,n.type=o,n.unless=vt,n.values=Z,n.view=dt,n.when=gt,n.where=yt,n.without=mt,n.zip=wt,n.zipObj=bt}); | ||
!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}); |
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
264861
11
8237