diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index 1f9589af3..121312e04 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -3011,11 +3011,9 @@ fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; if (isArray(collection)) { result = indexOf(collection, target, fromIndex) > -1; - } - else if (typeof length == 'number' && isString(collection)) { - result = collection.indexOf(target, fromIndex) > -1; - } - else { + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { baseEach(collection, function(value) { if (++index >= fromIndex) { return !(result = value === target); @@ -6593,7 +6591,7 @@ // expose Lo-Dash var _ = runInContext(); - // some AMD build optimizers, like r.js, check for specific condition patterns like the following: + // some AMD build optimizers, like r.js, check for condition patterns like the following: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { // Expose Lo-Dash to the global object even when an AMD loader is present in // case Lo-Dash was injected by a third-party script and not intended to be diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index eb1e06951..6dcc9e024 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -17,7 +17,7 @@ var g=n&&n.__bindData__;if(g)return!a||1&g[1]||(g[4]=u),!a&&1&g[1]&&(t|=8),!l||4 var u=[];if(Le.enumPrototypes&&u.push('!(G&&n=="prototype")'),Le.enumErrorProps&&u.push('!(F&&(n=="message"||n=="name"))'),n.j&&n.f)r+="var C=-1,D=B[typeof t]&&v(t),u=D?D.length:0;while(++Ck;k++)r+="n='"+n.h[k]+"';if((!(r&&x[n])&&m.call(t,n))",n.j||(r+="||(!x[n]&&t[n]!==A[n])"),r+="){"+n.g+"}"; r+="}"}return(n.b||Le.nonEnumArgs)&&(r+="}"),r+=n.c+";return E",t=t("d,j,k,m,o,p,q,s,v,A,B,y,I,J,L",e+r+"}"),s(n),t(V,q,oe,ve,_,pt,qe,dt,n.f,ae,U,ze,M,ie,we)}function at(n){return yt(n)?Ce(n):{}}function it(n){return He[n]}function lt(){var t=(t=y.indexOf)===Rt?n:t;return t}function ft(n){var t,e;return!n||we.call(n)!=G||(t=n.constructor,vt(t)&&!(t instanceof t))||!Le.argsClass&&pt(n)||!Le.nodeClass&&f(n)?!1:Le.ownLast?(nr(n,function(n,t,r){return e=ve.call(r,t),!1}),false!==e):(nr(n,function(n,t){e=t }),e===v||ve.call(n,e))}function ct(n){return Ue[n]}function pt(n){return n&&typeof n=="object"?we.call(n)==$:!1}function st(n,t,e){var r=We(n),u=r.length;for(t=V(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function gt(n){var t=[];return nr(n,function(n,e){vt(n)&&t.push(e)}),t.sort()}function ht(n){for(var t=-1,e=We(n),r=e.length,u={};++te?Ie(0,o+e):e)||0,qe(n)?a=-1e?Ie(0,o+e):e)||0,qe(n)?a=-1o&&(o=i)}}else t=!t&&dt(n)?r:y.createCallback(t,e,3),Xe(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function St(n,t,e,r){var u=3>arguments.length;if(t=V(t,r,4),qe(n)){var o=-1,a=n.length;for(u&&(e=n[++o]);++oarguments.length;return t=V(t,r,4),Ct(n,function(n,r,o){e=u?(u=!1,n):t(e,n,r,o)}),e}function It(n){var t=-1,e=n?n.length:0,r=Ut(typeof e=="number"?e:0); diff --git a/dist/lodash.js b/dist/lodash.js index 9a907e12e..98740742e 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -2661,11 +2661,9 @@ fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; if (isArray(collection)) { result = indexOf(collection, target, fromIndex) > -1; - } - else if (typeof length == 'number' && isString(collection)) { - result = collection.indexOf(target, fromIndex) > -1; - } - else { + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { forOwn(collection, function(value) { if (++index >= fromIndex) { return !(result = value === target); @@ -6227,7 +6225,7 @@ // expose Lo-Dash var _ = runInContext(); - // some AMD build optimizers, like r.js, check for specific condition patterns like the following: + // some AMD build optimizers, like r.js, check for condition patterns like the following: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { // Expose Lo-Dash to the global object even when an AMD loader is present in // case Lo-Dash was injected by a third-party script and not intended to be diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 29c700fa8..a2a6404ca 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -16,7 +16,7 @@ if(f!=q)return!1;var f=n.constructor,p=t.constructor;if(f!=p&&!(ht(f)&&f instanc }for(;++af(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(c(h.b),p(h)):u&&c(h),s}function ut(n){return function(t,e,r){var u={};e=Q.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++re?Ie(0,o+e):e)||0,ze(n)?a=-1e?Ie(0,o+e):e)||0,ze(n)?a=-1o&&(o=i)}}else t=!t&&mt(n)?r:Q.createCallback(t,e,3),kt(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Et(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Ht(r);++earguments.length;t=Z(t,r,4);var o=-1,a=n.length;if(typeof a=="number")for(u&&(e=n[++o]);++o -1; - } - else if (typeof length == 'number' && isString(collection)) { - result = collection.indexOf(target, fromIndex) > -1; - } - else { + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { baseEach(collection, function(value) { if (++index >= fromIndex) { return !(result = value === target); @@ -6617,7 +6615,7 @@ // expose Lo-Dash var _ = runInContext(); - // some AMD build optimizers, like r.js, check for specific condition patterns like the following: + // some AMD build optimizers, like r.js, check for condition patterns like the following: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { // Expose Lo-Dash to the global object even when an AMD loader is present in // case Lo-Dash was injected by a third-party script and not intended to be diff --git a/vendor/benchmark.js/benchmark.js b/vendor/benchmark.js/benchmark.js index 9b2b94a07..037d8ee08 100644 --- a/vendor/benchmark.js/benchmark.js +++ b/vendor/benchmark.js/benchmark.js @@ -2841,7 +2841,7 @@ /*--------------------------------------------------------------------------*/ // expose Benchmark - // some AMD build optimizers, like r.js, check for specific condition patterns like the following: + // some AMD build optimizers, like r.js, check for condition patterns like the following: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { // define as an anonymous module so, through path mapping, it can be aliased define(['lodash', 'platform'], function(_, platform) { diff --git a/vendor/platform.js/platform.js b/vendor/platform.js/platform.js index a11a5ac46..62cf73fa0 100644 --- a/vendor/platform.js/platform.js +++ b/vendor/platform.js/platform.js @@ -986,7 +986,7 @@ /*--------------------------------------------------------------------------*/ // expose platform - // some AMD build optimizers, like r.js, check for specific condition patterns like the following: + // some AMD build optimizers, like r.js, check for condition patterns like the following: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { // define as an anonymous module so, through path mapping, it can be aliased define(function() {