Comparing version 0.3.0 to 0.3.1
@@ -311,3 +311,3 @@ (function (global, factory) { | ||
var i = 0 | ||
, len = as.length < bs.length ? as.length: bs.length | ||
, len = Math.min(as.length, bs.length) | ||
, ys = new Array(len) | ||
@@ -321,9 +321,9 @@ | ||
var zipObj = _curry2(function zipObj (as, bs) { | ||
var zipObj = _curry2(function zipObj (keys, vals) { | ||
var i = 0 | ||
, len = as.length < bs.length ? as.length: bs.length | ||
, len = Math.min(keys.length, vals.length) | ||
, res = {} | ||
for (; i < len; i++) { | ||
res[as[i]] = bs[i] | ||
res[keys[i]] = vals[i] | ||
} | ||
@@ -330,0 +330,0 @@ return res |
@@ -1,1 +0,1 @@ | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(n.Redash={})}(this,function(n){"use strict";function r(n,t,e){return a(n,function(){var u=t.concat(c.call(arguments));return u.length>=n?e.apply(null,u):r(n,u,e)})}var t=function(n){return function r(t){return arguments.length?n(t):r}},e=function(n){return function r(e,u){switch(arguments.length){case 0:return r;case 1:return t(function(r){return n(e,r)});default:return n(e,u)}}},u=e(function(n,r){return n+r}),c=[].slice,a=function(n,r){switch(n){case 0:return function(){return r.apply(this,arguments)};case 1:return function(n){return r.apply(this,arguments)};case 2:return function(n,t){return r.apply(this,arguments)};case 3:return function(n,t,e){return r.apply(this,arguments)};case 4:return function(n,t,e,u){return r.apply(this,arguments)};case 5:return function(n,t,e,u,c){return r.apply(this,arguments)};case 6:return function(n,t,e,u,c,a){return r.apply(this,arguments)};case 7:return function(n,t,e,u,c,a,i){return r.apply(this,arguments)};case 8:return function(n,t,e,u,c,a,i,o){return r.apply(this,arguments)};case 9:return function(n,t,e,u,c,a,i,o,f){return r.apply(this,arguments)};case 10:return function(n,t,e,u,c,a,i,o,f,s){return r.apply(this,arguments)};default:throw new Error("Arity must be less than or equal to 10.")}},i=function(){var n=arguments,t=n.length-1;return r(n[t].length,[],function(){for(var r=t,e=n[r--].apply(null,arguments);r>=0;r--)e=n[r](e);return e})},o=function(n){return function r(u,c,a){switch(arguments.length){case 0:return r;case 1:return e(function(r,t){return n(u,r,t)});case 2:return t(function(r){return n(u,c,r)});default:return n(u,c,a)}}},f=function(n){switch(n.length){case 0:return n;case 1:return t(n);case 2:return e(n);case 3:return o(n);default:return r(n.length,[],n)}},s=e(function(n,u){switch(n){case 0:return u;case 1:return t(u);case 2:return e(u);case 3:return o(u);default:return r(u.length,[],u)}}),l=e(function(n,r){for(var t,e=0,u=r.length,c=[];u>e;e++)t=r[e],n(t,e)&&c.push(t);return c}),h=e(function(n,r){for(var t=0,e=r.length;e>t;t++)if(n(r[t]))return t;return-1}),g=e(function(n,r){for(var t=0,e=r.length,u=[];e>t;t++)u=u.concat(n(r[t],t));return u}),p=function C(n){for(var r,t=0,e=n.length,u=[];e>t;t++)r=Array.isArray(n[t])?C(n[t]):n[t],u=u.concat(r);return u},y=e(function(n,r){for(var t=0,e=r.length;e>t;t++)n(r[t],t)}),m=function(n){return n[0]},d=e(function(n,r){for(var t=0,e=r.length;e>t;t++)if(r[t]===n)return t;return-1}),v=Object.keys,w=function(n){return n[n.length-1]},b=e(function(n,r){for(var t=0,e=r.length,u=new Array(e);e>t;t++)u[t]=n(r[t],t);return u}),j=function(){var n=arguments,t=n.length;return r(n[0].length,[],function(){for(var r=0,e=n[r++].apply(null,arguments);t>r;r++)e=n[r](e);return e})},x=e(function(n,r){return r[n]}),A=o(function(n,r,t){return t[n]===r}),O=o(function(n,r,t){for(var e=0,u=t.length;u>e;e++)r=n(r,t[e],e);return r}),k=o(function(n,r,t){for(var e=t.length-1;e>=0;e--)r=n(r,t[e],e);return r}),z=e(function(n,r){for(var t,e=0,u=r.length,c=[];u>e;e++)t=r[e],n(t,e)||c.push(t);return c}),E=[].reverse,q=function(n){return E.call(n.slice(0))},R=function(n){return n.slice(1)},I=e(function(n,r){return r.slice(0,n)}),M=e(function(n,r){for(var t=0,e=r.length;e>t;t++)if(n(r[t],t))return r.slice(0,t);return r.slice(0)}),N=function(n){return function(r){return console.log(n,r),r}},P=function(n){var r,t=[];for(r in n)n.hasOwnProperty(r)&&t.push([r,n[r]]);return t},U=e(function(n,r){for(var t=0,e=n.length<r.length?n.length:r.length,u=new Array(e);e>t;t++)u[t]=[n[t],r[t]];return u}),B=e(function(n,r){for(var t=0,e=n.length<r.length?n.length:r.length,u={};e>t;t++)u[n[t]]=r[t];return u});n.add=u,n.compose=i,n.curry=f,n.curryN=s,n.filter=l,n.findIndex=h,n.flatMap=g,n.flatten=p,n.forEach=y,n.head=m,n.indexOf=d,n.keys=v,n.last=w,n.map=b,n.pipe=j,n.prop=x,n.propEq=A,n.reduce=O,n.foldl=O,n.reduceRight=k,n.foldr=k,n.reject=z,n.reverse=q,n.tail=R,n.take=I,n.takeUntil=M,n.trace=N,n.unzipObj=P,n.zip=U,n.zipObj=B}); | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(n.Redash={})}(this,function(n){"use strict";function r(n,t,e){return a(n,function(){var u=t.concat(c.call(arguments));return u.length>=n?e.apply(null,u):r(n,u,e)})}var t=function(n){return function r(t){return arguments.length?n(t):r}},e=function(n){return function r(e,u){switch(arguments.length){case 0:return r;case 1:return t(function(r){return n(e,r)});default:return n(e,u)}}},u=e(function(n,r){return n+r}),c=[].slice,a=function(n,r){switch(n){case 0:return function(){return r.apply(this,arguments)};case 1:return function(n){return r.apply(this,arguments)};case 2:return function(n,t){return r.apply(this,arguments)};case 3:return function(n,t,e){return r.apply(this,arguments)};case 4:return function(n,t,e,u){return r.apply(this,arguments)};case 5:return function(n,t,e,u,c){return r.apply(this,arguments)};case 6:return function(n,t,e,u,c,a){return r.apply(this,arguments)};case 7:return function(n,t,e,u,c,a,i){return r.apply(this,arguments)};case 8:return function(n,t,e,u,c,a,i,o){return r.apply(this,arguments)};case 9:return function(n,t,e,u,c,a,i,o,f){return r.apply(this,arguments)};case 10:return function(n,t,e,u,c,a,i,o,f,s){return r.apply(this,arguments)};default:throw new Error("Arity must be less than or equal to 10.")}},i=function(){var n=arguments,t=n.length-1;return r(n[t].length,[],function(){for(var r=t,e=n[r--].apply(null,arguments);r>=0;r--)e=n[r](e);return e})},o=function(n){return function r(u,c,a){switch(arguments.length){case 0:return r;case 1:return e(function(r,t){return n(u,r,t)});case 2:return t(function(r){return n(u,c,r)});default:return n(u,c,a)}}},f=function(n){switch(n.length){case 0:return n;case 1:return t(n);case 2:return e(n);case 3:return o(n);default:return r(n.length,[],n)}},s=e(function(n,u){switch(n){case 0:return u;case 1:return t(u);case 2:return e(u);case 3:return o(u);default:return r(u.length,[],u)}}),l=e(function(n,r){for(var t,e=0,u=r.length,c=[];u>e;e++)t=r[e],n(t,e)&&c.push(t);return c}),h=e(function(n,r){for(var t=0,e=r.length;e>t;t++)if(n(r[t]))return t;return-1}),p=e(function(n,r){for(var t=0,e=r.length,u=[];e>t;t++)u=u.concat(n(r[t],t));return u}),g=function C(n){for(var r,t=0,e=n.length,u=[];e>t;t++)r=Array.isArray(n[t])?C(n[t]):n[t],u=u.concat(r);return u},y=e(function(n,r){for(var t=0,e=r.length;e>t;t++)n(r[t],t)}),m=function(n){return n[0]},d=e(function(n,r){for(var t=0,e=r.length;e>t;t++)if(r[t]===n)return t;return-1}),v=Object.keys,w=function(n){return n[n.length-1]},b=e(function(n,r){for(var t=0,e=r.length,u=new Array(e);e>t;t++)u[t]=n(r[t],t);return u}),j=function(){var n=arguments,t=n.length;return r(n[0].length,[],function(){for(var r=0,e=n[r++].apply(null,arguments);t>r;r++)e=n[r](e);return e})},x=e(function(n,r){return r[n]}),A=o(function(n,r,t){return t[n]===r}),O=o(function(n,r,t){for(var e=0,u=t.length;u>e;e++)r=n(r,t[e],e);return r}),k=o(function(n,r,t){for(var e=t.length-1;e>=0;e--)r=n(r,t[e],e);return r}),z=e(function(n,r){for(var t,e=0,u=r.length,c=[];u>e;e++)t=r[e],n(t,e)||c.push(t);return c}),E=[].reverse,M=function(n){return E.call(n.slice(0))},q=function(n){return n.slice(1)},R=e(function(n,r){return r.slice(0,n)}),I=e(function(n,r){for(var t=0,e=r.length;e>t;t++)if(n(r[t],t))return r.slice(0,t);return r.slice(0)}),N=function(n){return function(r){return console.log(n,r),r}},P=function(n){var r,t=[];for(r in n)n.hasOwnProperty(r)&&t.push([r,n[r]]);return t},U=e(function(n,r){for(var t=0,e=Math.min(n.length,r.length),u=new Array(e);e>t;t++)u[t]=[n[t],r[t]];return u}),B=e(function(n,r){for(var t=0,e=Math.min(n.length,r.length),u={};e>t;t++)u[n[t]]=r[t];return u});n.add=u,n.compose=i,n.curry=f,n.curryN=s,n.filter=l,n.findIndex=h,n.flatMap=p,n.flatten=g,n.forEach=y,n.head=m,n.indexOf=d,n.keys=v,n.last=w,n.map=b,n.pipe=j,n.prop=x,n.propEq=A,n.reduce=O,n.foldl=O,n.reduceRight=k,n.foldr=k,n.reject=z,n.reverse=M,n.tail=q,n.take=R,n.takeUntil=I,n.trace=N,n.unzipObj=P,n.zip=U,n.zipObj=B}); |
{ | ||
"name": "redash", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/redash.js", |
@@ -5,3 +5,3 @@ import _curry2 from './internal/_curry2' | ||
var i = 0 | ||
, len = as.length < bs.length ? as.length: bs.length | ||
, len = Math.min(as.length, bs.length) | ||
, ys = new Array(len) | ||
@@ -8,0 +8,0 @@ |
import _curry2 from './internal/_curry2' | ||
var zipObj = _curry2(function zipObj (as, bs) { | ||
var zipObj = _curry2(function zipObj (keys, vals) { | ||
var i = 0 | ||
, len = as.length < bs.length ? as.length: bs.length | ||
, len = Math.min(keys.length, vals.length) | ||
, res = {} | ||
for (; i < len; i++) { | ||
res[as[i]] = bs[i] | ||
res[keys[i]] = vals[i] | ||
} | ||
@@ -11,0 +11,0 @@ return res |
50368