mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Add _.zipObject.
Former-commit-id: 0fe17adc359fbc608025dced32f6dd509d019413
This commit is contained in:
6
lodash.min.js
vendored
6
lodash.min.js
vendored
@@ -27,6 +27,6 @@ function(e){var t=[];if(!e)return t;for(var n,r=-1,i=e.length,s=tt.call(argument
|
||||
(Math.random()*(n+1)),i[n]=i[t],i[t]=e[n];return i},s.size=function(e){if(!e)return 0;var t=e.length;return t===t>>>0?e.length:Ot(e).length},s.some=ct,s.sortBy=mt,s.sortedIndex=x,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){n||(n={});var i,o,u=s.templateSettings,a=n.escape,c=n.evaluate,h=n.interpolate,n=n.variable;return a==r&&(a=u.escape),c==r&&(c=u.evaluate),h==r&&(h=u.interpolate),a&&(e=e.replace(a,d)),h&&(o=e!=(e=e.replace(h,v))),c&&(i=e!=(e=e.replace(c,m))),e="__p='"+e.replace
|
||||
(B,l).replace(P,f)+"';",I.length=0,n||(n=u.variable,e="with("+n+"||{}){"+e+"}"),e="function("+n+"){var __p"+(o?",__t":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+e+"return __p}",i=Function("_","return "+e)(s),t?i(t):(i.source=e,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(a=r,s=e.apply(o,i)):u||(u=at(n,f)),s}},s.times=function(e,t,n){var r=-1
|
||||
;if(n)for(;++r<e;)t.call(n,r);else for(;++r<e;)t(r)},s.toArray=function(e){if(!e)return[];if(e.toArray&&nt.call(e.toArray)==V)return e.toArray();var t=e.length;return t===t>>>0?tt.call(e):Mt(e)},s.union=function(){for(var e=-1,t=[],n=Y.apply(t,arguments),r=n.length;++e<r;)0>w(t,n[e])&&t.push(n[e]);return t},s.uniq=T,s.uniqueId=function(e){var t=M++;return e?e+t:t},s.values=Mt,s.without=function(e){var t=[];if(!e)return t;for(var n=-1,r=e.length;++n<r;)0>w(arguments,e[n],1)&&t.push(e[n]);return t}
|
||||
,s.wrap=function(e,t){return function(){var n=[e];return arguments.length&&et.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){if(!e)return[];for(var t=-1,n=E(Tt(arguments,"length")),r=Array(n);++t<n;)r[t]=Tt(arguments,t);return r},s.all=yt,s.any=ct,s.collect=xt,s.detect=bt,s.each=wt,s.foldl=Nt,s.foldr=g,s.head=y,s.include=D,s.inject=Nt,s.methods=Lt,s.select=G,s.tail=S,s.take=y,s.unique=T,o.prototype=s.prototype,L(s),o.prototype.chain=function(){return this._chain=n,this},o.prototype.value=
|
||||
function(){return this._wrapped},wt("pop push reverse shift sort splice unshift".split(" "),function(e){var t=Q[e];o.prototype[e]=function(){var e=this._wrapped;return t.apply(e,arguments),e.length===0&&delete e[0],this._chain&&(e=new o(e),e._chain=n),e}}),wt(["concat","join","slice"],function(e){var t=Q[e];o.prototype[e]=function(){var e=t.apply(this._wrapped,arguments);return this._chain&&(e=new o(e),e._chain=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define
|
||||
(function(){return s})):A?"object"==typeof module&&module&&module.s==A?(module.s=s)._=s:A._=s:e._=s})(this);
|
||||
,s.wrap=function(e,t){return function(){var n=[e];return arguments.length&&et.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){if(!e)return[];for(var t=-1,n=E(Tt(arguments,"length")),r=Array(n);++t<n;)r[t]=Tt(arguments,t);return r},s.zipObject=function(e,t){if(!e)return{};var n=-1,r=e.length,i={};for(t||(t=[]);++n<r;)i[e[n]]=t[n];return i},s.all=yt,s.any=ct,s.collect=xt,s.detect=bt,s.each=wt,s.foldl=Nt,s.foldr=g,s.head=y,s.include=D,s.inject=Nt,s.methods=Lt,s.select=G,s.tail=S,s.take=y,s.unique=
|
||||
T,o.prototype=s.prototype,L(s),o.prototype.chain=function(){return this._chain=n,this},o.prototype.value=function(){return this._wrapped},wt("pop push reverse shift sort splice unshift".split(" "),function(e){var t=Q[e];o.prototype[e]=function(){var e=this._wrapped;return t.apply(e,arguments),e.length===0&&delete e[0],this._chain&&(e=new o(e),e._chain=n),e}}),wt(["concat","join","slice"],function(e){var t=Q[e];o.prototype[e]=function(){var e=t.apply(this._wrapped,arguments);return this._chain&&(e=new
|
||||
o(e),e._chain=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):A?"object"==typeof module&&module&&module.s==A?(module.s=s)._=s:A._=s:e._=s})(this);
|
||||
Reference in New Issue
Block a user