Skip to content
This repository
Browse code

Ensure `underscore` build internal `forOwn` will accept a `thisArg` a…

…rgument. [closes #220].
  • Loading branch information...
commit 212b05c658de7bc7851c8a1d87159503313f1523 1 parent 51fbb0b
John-David Dalton authored
6  build.js
@@ -1865,15 +1865,15 @@
1865 1865
             '  var index = -1,',
1866 1866
             '      length = collection ? collection.length : 0;',
1867 1867
             '',
  1868
+            "  callback = callback && typeof thisArg == 'undefined' ? callback : lodash.createCallback(callback, thisArg);",
1868 1869
             "  if (typeof length == 'number') {",
1869  
-            "    callback = callback && typeof thisArg == 'undefined' ? callback : lodash.createCallback(callback, thisArg);",
1870 1870
             '    while (++index < length) {',
1871 1871
             '      if (callback(collection[index], index, collection) === false) {',
1872 1872
             '        break;',
1873 1873
             '      }',
1874 1874
             '    }',
1875 1875
             '  } else {',
1876  
-            '    each(collection, callback, thisArg);',
  1876
+            '    each(collection, callback);',
1877 1877
             '  }',
1878 1878
             '  return collection;',
1879 1879
             '}',
@@ -2627,7 +2627,7 @@
2627 2627
             source = source.replace(matchFunction(source, data.methodName), function(match) {
2628 2628
               return match
2629 2629
                 .replace(/(callback), *thisArg/g, '$1')
2630  
-                .replace(/^( *)callback *=.+/m, '$1callback || (callback = identity);')
  2630
+                .replace(/^ *callback *=.+\n/m, '');
2631 2631
             });
2632 2632
           }
2633 2633
         });
6  dist/lodash.backbone.js
@@ -645,7 +645,6 @@
645 645
     var index, iterable = collection, result = iterable;
646 646
     if (!iterable) return result;
647 647
     if (!objectTypes[typeof iterable]) return result;
648  
-    callback || (callback = identity);
649 648
 
650 649
       for (index in iterable) {
651 650
         if (callback(iterable[index], index, collection) === indicatorObject) return result;    
@@ -678,7 +677,6 @@
678 677
     var index, iterable = collection, result = iterable;
679 678
     if (!iterable) return result;
680 679
     if (!objectTypes[typeof iterable]) return result;
681  
-    callback || (callback = identity);
682 680
 
683 681
       for (index in iterable) {
684 682
         if (hasOwnProperty.call(iterable, index)) {    
@@ -1451,15 +1449,15 @@
1451 1449
     var index = -1,
1452 1450
         length = collection ? collection.length : 0;
1453 1451
 
  1452
+    callback = callback && typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg);
1454 1453
     if (typeof length == 'number') {
1455  
-      callback = callback && typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg);
1456 1454
       while (++index < length) {
1457 1455
         if (callback(collection[index], index, collection) === indicatorObject) {
1458 1456
           break;
1459 1457
         }
1460 1458
       }
1461 1459
     } else {
1462  
-      forOwn(collection, callback, thisArg);
  1460
+      forOwn(collection, callback);
1463 1461
     };
1464 1462
   }
1465 1463
 
41  dist/lodash.backbone.min.js
@@ -4,24 +4,23 @@
4 4
  * Build: `lodash backbone exports="amd,commonjs,global,node" -o ./dist/lodash.backbone.js`
5 5
  * Underscore.js 1.4.4 underscorejs.org/LICENSE
6 6
  */
7  
-;(function(n){function t(n,t){var r;if(n&&Z[typeof n])for(r in t||(t=q),n)if(ut.call(n,r)&&t(n[r],r,n)===G)break}function r(n,t){var r;if(n&&Z[typeof n])for(r in t||(t=q),n)if(t(n[r],r,n)===G)break}function e(n){var t,r=[];if(!n||!Z[typeof n])return r;for(t in n)ut.call(n,t)&&r.push(t);return r}function u(n){return n instanceof u?n:new a(n)}function o(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function f(n,t,r){function e(){var u=arguments,o=t;
8  
-return r.length&&(u=u.length?r.concat(ft(u)):r),this instanceof e?(c.prototype=n.prototype,o=new c,c.prototype=T,u=n.apply(o,u),y(u)?u:o):n.apply(o,u)}if(!g(n))throw new TypeError;return e}function i(n){return bt[n]}function a(n){this.__wrapped__=n}function c(){}function l(n){return it.call(n)==J}function s(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]=e[u]}return n}function p(n){var t=[];return r(n,function(n,r){g(n)&&t.push(r)}),t.sort()}function v(n){for(var t=-1,r=mt(n),e=r.length,u={};++t<e;){var o=r[t];
9  
-u[n[o]]=o}return u}function h(n,t,e,o){if(n===t)return 0!==n||1/n==1/t;var f=typeof n,i=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=i&&"object"!=i))return z;if(n==T||t==T)return n===t;if(i=it.call(n),f=it.call(t),i!=f)return z;switch(i){case L:case Q:return+n==+t;case U:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case X:case Y:return n==t+""}if(f=i==K,!f){if(n instanceof u||t instanceof u)return h(n.__wrapped__||n,t.__wrapped__||t,e,o);if(i!=W)return z;var i=n.constructor,a=t.constructor;
10  
-if(i!=a&&(!g(i)||!(i instanceof i&&g(a)&&a instanceof a)))return z}for(e||(e=[]),o||(o=[]),i=e.length;i--;)if(e[i]==n)return o[i]==t;var c=N,l=0;if(e.push(n),o.push(t),f){if(l=t.length,c=l==n.length)for(;l--&&(c=h(n[l],t[l],e,o)););return c}return r(t,function(t,r,u){return ut.call(u,r)?(l++,!(c=ut.call(n,r)&&h(n[r],t,e,o))&&G):void 0}),c&&r(n,function(n,t,r){return ut.call(r,t)?!(c=-1<--l)&&G:void 0}),c}function g(n){return typeof n=="function"}function y(n){return n?Z[typeof n]:z}function m(n){return typeof n=="string"||it.call(n)==Y
11  
-}function b(n){for(var t=-1,r=mt(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function d(n,r){var e=z;return typeof(n?n.length:0)=="number"?e=-1<R(n,r):t(n,function(n){return(e=n===r)&&G}),e}function _(n,r,e){var u=N;r=F(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o&&(u=!!r(n[e],e,n)););else t(n,function(n,t,e){return!(u=!!r(n,t,e))&&G});return u}function j(n,r,e){var u=[];r=F(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o;){var f=n[e];r(f,e,n)&&u.push(f)}else t(n,function(n,t,e){r(n,t,e)&&u.push(n)
12  
-});return u}function w(n,r,e){r=F(r,e),e=-1;var u=n?n.length:0;if(typeof u!="number"){var o;return t(n,function(n,t,e){return r(n,t,e)?(o=n,G):void 0}),o}for(;++e<u;){var f=n[e];if(r(f,e,n))return f}}function x(n,r,e){var u=-1,o=n?n.length:0;if(typeof o=="number")for(r=r&&typeof e=="undefined"?r:F(r,e);++u<o&&r(n[u],u,n)!==G;);else t(n,r)}function A(n,r,e){var u=-1,o=n?n.length:0;if(r=F(r,e),typeof o=="number")for(var f=Array(o);++u<o;)f[u]=r(n[u],u,n);else f=[],t(n,function(n,t,e){f[++u]=r(n,t,e)
13  
-});return f}function O(n,r,e,u){if(!n)return e;var o=3>arguments.length;r=F(r,u,4);var f=-1,i=n.length;if(typeof i=="number")for(o&&(e=n[++f]);++f<i;)e=r(e,n[f],f,n);else t(n,function(n,t,u){e=o?(o=z,n):r(e,n,t,u)});return e}function E(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var f=mt(n),u=f.length;return t=F(t,e,4),x(n,function(e,i,a){i=f?f[--u]:--u,r=o?(o=z,n[i]):t(r,n[i],i,a)}),r}function k(n,r,e){var u;r=F(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o&&!(u=r(n[e],e,n)););else t(n,function(n,t,e){return(u=r(n,t,e))&&G
14  
-});return!!u}function B(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=T){var o=-1;for(t=F(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,e==T||r)return n[0];return ft.call(n,0,pt(st(0,e),u))}}function R(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?st(0,u+r):r||0)-1;else if(r)return e=I(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function M(n,t,r){if(typeof t!="number"&&t!=T){var e=0,u=-1,o=n?n.length:0;for(t=F(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==T||r?1:st(0,t);
15  
-return ft.call(n,e)}function I(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?F(r,e,1):q,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function S(n,t){return gt.fastBind||at&&2<arguments.length?at.call.apply(at,arguments):f(n,t,ft.call(arguments,2))}function F(n,t,r){if(n==T)return q;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=mt(n);return function(t){for(var r=u.length,e=z;r--&&(e=t[u[r]]===n[u[r]]););return e}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)
16  
-}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function q(n){return n}function $(n){x(p(n),function(t){var r=u[t]=n[t];u.prototype[t]=function(){var n=[this.__wrapped__];return ot.apply(n,arguments),n=r.apply(u,n),this.__chain__&&(n=new a(n),n.__chain__=N),n}})}var N=!0,T=null,z=!1,D=typeof exports=="object"&&exports,P=typeof module=="object"&&module&&module.exports==D&&module,V=typeof global=="object"&&global;
17  
-V.global===V&&(n=V);var C=0,G={},H=/[&<>"']/g,J="[object Arguments]",K="[object Array]",L="[object Boolean]",Q="[object Date]",U="[object Number]",W="[object Object]",X="[object RegExp]",Y="[object String]",Z={"boolean":z,"function":N,object:N,number:z,string:z,undefined:z},nt=[],V={},tt=RegExp("^"+(V.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),rt=nt.concat,et=Math.floor,ut=V.hasOwnProperty,ot=nt.push,ft=nt.slice,it=V.toString,at=tt.test(at=ft.bind)&&at,ct=tt.test(ct=Array.isArray)&&ct,lt=tt.test(lt=Object.keys)&&lt,st=Math.max,pt=Math.min,vt=Math.random,V=tt.test(n.attachEvent),ht=at&&!/\n|true/.test(at+V),gt={};
18  
-(function(){var n={0:1,length:1};gt.argsObject=arguments.constructor==Object,gt.fastBind=at&&!ht,gt.spliceObjects=(nt.splice.call(n,0,1),!n[0])})(1),a.prototype=u.prototype,l(arguments)||(l=function(n){return n?ut.call(n,"callee"):z});var yt=ct||function(n){return gt.argsObject&&n instanceof Array||it.call(n)==K},mt=lt?function(n){return y(n)?lt(n):[]}:e,bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};v(bt),g(/x/)&&(g=function(n){return n instanceof Function||"[object Function]"==it.call(n)
19  
-}),u.bind=S,u.bindAll=function(n){for(var t=rt.apply(nt,arguments),r=1<t.length?0:(t=p(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=S(n[u],n)}return n},u.countBy=function(n,t,r){var e={};return t=F(t,r),x(n,function(n,r,u){r=t(n,r,u)+"",ut.call(e,r)?e[r]++:e[r]=1}),e},u.defaults=function(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]==T&&(n[u]=e[u])}return n},u.filter=j,u.forEach=x,u.functions=p,u.groupBy=function(n,t,r){var e={};return t=F(t,r),x(n,function(n,r,u){r=t(n,r,u)+"",(ut.call(e,r)?e[r]:e[r]=[]).push(n)
20  
-}),e},u.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&t!=T){var o=u;for(t=F(t,r);o--&&t(n[o],o,n);)e++}else e=t==T||r?1:t||e;return ft.call(n,0,pt(st(0,u-e),u))},u.invert=v,u.invoke=function(n,t){var r=ft.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,f=Array(typeof o=="number"?o:0);return x(n,function(n){f[++e]=(u?t:n[t]).apply(n,r)}),f},u.keys=mt,u.map=A,u.max=function(n,t,r){var e=-1/0,u=e,o=-1,f=n?n.length:0;if(t||typeof f!="number")t=F(t,r),x(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)
21  
-});else for(;++o<f;)r=n[o],r>u&&(u=r);return u},u.min=function(n,t,r){var e=1/0,u=e,o=-1,f=n?n.length:0;if(t||typeof f!="number")t=F(t,r),x(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});else for(;++o<f;)r=n[o],r<u&&(u=r);return u},u.omit=function(n){var t=rt.apply(nt,arguments),e={};return r(n,function(n,r){0>R(t,r,1)&&(e[r]=n)}),e},u.once=function(n){var t,r;return function(){return t?r:(t=N,r=n.apply(this,arguments),n=T,r)}},u.pairs=function(n){for(var t=-1,r=mt(n),e=r.length,u=Array(e);++t<e;){var o=r[t];
22  
-u[t]=[o,n[o]]}return u},u.pick=function(n){for(var t=0,r=rt.apply(nt,arguments),e=r.length,u={};++t<e;){var o=r[t];o in n&&(u[o]=n[o])}return u},u.reject=function(n,t,r){return t=F(t,r),j(n,function(n,r,e){return!t(n,r,e)})},u.rest=M,u.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return x(n,function(n){var r=et(vt()*(++t+1));e[t]=e[r],e[r]=n}),e},u.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,f=Array(typeof u=="number"?u:0);for(t=F(t,r),x(n,function(n,r,u){f[++e]={a:t(n,r,u),b:e,c:n}
23  
-}),u=f.length,f.sort(o);u--;)f[u]=f[u].c;return f},u.toArray=function(n){return yt(n)?ft.call(n):n&&typeof n.length=="number"?A(n):b(n)},u.values=b,u.without=function(n){for(var t=-1,r=n.length,e=[];++t<r;){var u=n[t];0>R(arguments,u,1)&&e.push(u)}return e},u.collect=A,u.drop=M,u.each=x,u.extend=s,u.methods=p,u.select=j,u.tail=M,u.clone=function(n){return y(n)?yt(n)?ft.call(n):s({},n):n},u.contains=d,u.escape=function(n){return n==T?"":(n+"").replace(H,i)},u.every=_,u.find=w,u.has=function(n,t){return n?ut.call(n,t):z
24  
-},u.identity=q,u.indexOf=R,u.isArguments=l,u.isArray=yt,u.isEmpty=function(n){if(!n)return N;if(yt(n)||m(n))return!n.length;for(var t in n)if(ut.call(n,t))return z;return N},u.isEqual=h,u.isFunction=g,u.isObject=y,u.isRegExp=function(n){return n instanceof RegExp||it.call(n)==X},u.isString=m,u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?st(0,e+r):pt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=$,u.reduce=O,u.reduceRight=E,u.result=function(n,t){var r=n?n[t]:T;
25  
-return g(r)?n[t]():r},u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:mt(n).length},u.some=k,u.sortedIndex=I,u.uniqueId=function(n){var t=++C+"";return n?n+t:t},u.all=_,u.any=k,u.detect=w,u.foldl=O,u.foldr=E,u.include=d,u.inject=O,u.first=B,u.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=T){var o=u;for(t=F(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,e==T||r)return n[u-1];return ft.call(n,st(0,u-e))}},u.take=B,u.head=B,u.chain=function(n){return n=new a(n),n.__chain__=N,n
26  
-},u.VERSION="1.1.0",$(u),u.prototype.chain=function(){return this.__chain__=N,this},u.prototype.value=function(){return this.__wrapped__},x("pop push reverse shift sort splice unshift".split(" "),function(n){var t=nt[n];u.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),!gt.spliceObjects&&0===n.length&&delete n[0],this}}),x(["concat","join","slice"],function(n){var t=nt[n];u.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new a(n),n.__chain__=N),n
27  
-}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=u,define(function(){return u})):D&&!D.nodeType?P?(P.exports=u)._=u:D._=u:n._=u})(this);
  7
+;(function(n){function r(n){return n instanceof r?n:new o(n)}function t(n,r){var t=n.b,e=r.b;if(n=n.a,r=r.a,n!==r){if(n>r||typeof n=="undefined")return 1;if(n<r||typeof r=="undefined")return-1}return t<e?-1:1}function e(n,r,t){function e(){var u=arguments,o=r;return t.length&&(u=u.length?t.concat(nr(u)):t),this instanceof e?(f.prototype=n.prototype,o=new f,f.prototype=null,u=n.apply(o,u),v(u)?u:o):n.apply(o,u)}if(!p(n))throw new TypeError;return e}function u(n){return pr[n]}function o(n){this.__wrapped__=n
  8
+}function f(){}function i(n){return rr.call(n)==D}function a(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n}function c(n){var r=[];return vr(n,function(n,t){p(n)&&r.push(t)}),r.sort()}function l(n){for(var r=-1,t=sr(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u}function s(n,t,e,u){if(n===t)return 0!==n||1/n==1/t;var o=typeof n,f=typeof t;if(n===n&&(!n||"function"!=o&&"object"!=o)&&(!t||"function"!=f&&"object"!=f))return!1;
  9
+if(null==n||null==t)return n===t;if(f=rr.call(n),o=rr.call(t),f!=o)return!1;switch(f){case V:case C:return+n==+t;case G:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case J:case K:return n==t+""}if(o=f==P,!o){if(n instanceof r||t instanceof r)return s(n.__wrapped__||n,t.__wrapped__||t,e,u);if(f!=H)return!1;var f=n.constructor,i=t.constructor;if(f!=i&&(!p(f)||!(f instanceof f&&p(i)&&i instanceof i)))return!1}for(e||(e=[]),u||(u=[]),f=e.length;f--;)if(e[f]==n)return u[f]==t;var a=!0,c=0;if(e.push(n),u.push(t),o){if(c=t.length,a=c==n.length)for(;c--&&(a=s(n[c],t[c],e,u)););return a
  10
+}return vr(t,function(r,t,o){return Y.call(o,t)?(c++,!(a=Y.call(n,t)&&s(n[t],r,e,u))&&$):void 0}),a&&vr(n,function(n,r,t){return Y.call(t,r)?!(a=-1<--c)&&$:void 0}),a}function p(n){return typeof n=="function"}function v(n){return n?L[typeof n]:!1}function h(n){return typeof n=="string"||rr.call(n)==K}function g(n){for(var r=-1,t=sr(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function y(n,r){var t=!1;return typeof(n?n.length:0)=="number"?t=-1<E(n,r):hr(n,function(n){return(t=n===r)&&$}),t}function m(n,r,t){var e=!0;
  11
+r=M(r,t),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else hr(n,function(n,t,u){return!(e=!!r(n,t,u))&&$});return e}function b(n,r,t){var e=[];r=M(r,t),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else hr(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function d(n,r,t){r=M(r,t),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return hr(n,function(n,t,e){return r(n,t,e)?(u=n,$):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o
  12
+}}function _(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:M(r,t),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==$;);else hr(n,r)}function j(n,r,t){var e=-1,u=n?n.length:0;if(r=M(r,t),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],hr(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function w(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=M(r,e,4);var o=-1,f=n.length;if(typeof f=="number")for(u&&(t=n[++o]);++o<f;)t=r(t,n[o],o,n);else hr(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)
  13
+});return t}function x(n,r,t,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var f=sr(n),u=f.length;return r=M(r,e,4),_(n,function(e,i,a){i=f?f[--u]:--u,t=o?(o=!1,n[i]):r(t,n[i],i,a)}),t}function A(n,r,t){var e;r=M(r,t),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else hr(n,function(n,t,u){return(e=r(n,t,u))&&$});return!!e}function O(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&null!=r){var o=-1;for(r=M(r,t);++o<u&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n[0];
  14
+return nr.call(n,0,fr(or(0,e),u))}}function E(n,r,t){var e=-1,u=n?n.length:0;if(typeof t=="number")e=(0>t?or(0,u+t):t||0)-1;else if(t)return e=R(n,r),n[e]===r?e:-1;for(;++e<u;)if(n[e]===r)return e;return-1}function B(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,o=n?n.length:0;for(r=M(r,t);++u<o&&r(n[u],u,n);)e++}else e=null==r||t?1:or(0,r);return nr.call(n,e)}function R(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?M(t,e,1):I,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function k(n,r){return cr.fastBind||tr&&2<arguments.length?tr.call.apply(tr,arguments):e(n,r,nr.call(arguments,2))
  15
+}function M(n,r,t){if(null==n)return I;var e=typeof n;if("function"!=e){if("object"!=e)return function(r){return r[n]};var u=sr(n);return function(r){for(var t=u.length,e=!1;t--&&(e=r[u[t]]===n[u[t]]););return e}}return typeof r!="undefined"?1===t?function(t){return n.call(r,t)}:2===t?function(t,e){return n.call(r,t,e)}:4===t?function(t,e,u,o){return n.call(r,t,e,u,o)}:function(t,e,u){return n.call(r,t,e,u)}:n}function I(n){return n}function S(n){_(c(n),function(t){var e=r[t]=n[t];r.prototype[t]=function(){var n=[this.__wrapped__];
  16
+return Z.apply(n,arguments),n=e.apply(r,n),this.__chain__&&(n=new o(n),n.__chain__=!0),n}})}var F=typeof exports=="object"&&exports,N=typeof module=="object"&&module&&module.exports==F&&module,T=typeof global=="object"&&global;T.global===T&&(n=T);var q=0,$={},z=/[&<>"']/g,D="[object Arguments]",P="[object Array]",V="[object Boolean]",C="[object Date]",G="[object Number]",H="[object Object]",J="[object RegExp]",K="[object String]",L={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Q=[],T={},U=RegExp("^"+(T.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),W=Q.concat,X=Math.floor,Y=T.hasOwnProperty,Z=Q.push,nr=Q.slice,rr=T.toString,tr=U.test(tr=nr.bind)&&tr,er=U.test(er=Array.isArray)&&er,ur=U.test(ur=Object.keys)&&ur,or=Math.max,fr=Math.min,ir=Math.random,T=U.test(n.attachEvent),ar=tr&&!/\n|true/.test(tr+T),cr={};
  17
+(function(){var n={0:1,length:1};cr.argsObject=arguments.constructor==Object,cr.fastBind=tr&&!ar,cr.spliceObjects=(Q.splice.call(n,0,1),!n[0])})(1),o.prototype=r.prototype,i(arguments)||(i=function(n){return n?Y.call(n,"callee"):!1});var lr=er||function(n){return cr.argsObject&&n instanceof Array||rr.call(n)==P},er=function(n){var r,t=[];if(!n||!L[typeof n])return t;for(r in n)Y.call(n,r)&&t.push(r);return t},sr=ur?function(n){return v(n)?ur(n):[]}:er,pr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};
  18
+l(pr);var vr=function(n,r){var t;if(!n||!L[typeof n])return n;for(t in n)if(r(n[t],t,n)===$)break;return n},hr=function(n,r){var t;if(!n||!L[typeof n])return n;for(t in n)if(Y.call(n,t)&&r(n[t],t,n)===$)break;return n};p(/x/)&&(p=function(n){return n instanceof Function||"[object Function]"==rr.call(n)}),r.bind=k,r.bindAll=function(n){for(var r=W.apply(Q,arguments),t=1<r.length?0:(r=c(n),-1),e=r.length;++t<e;){var u=r[t];n[u]=k(n[u],n)}return n},r.countBy=function(n,r,t){var e={};return r=M(r,t),_(n,function(n,t,u){t=r(n,t,u)+"",Y.call(e,t)?e[t]++:e[t]=1
  19
+}),e},r.defaults=function(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)null==n[u]&&(n[u]=e[u])}return n},r.filter=b,r.forEach=_,r.functions=c,r.groupBy=function(n,r,t){var e={};return r=M(r,t),_(n,function(n,t,u){t=r(n,t,u)+"",(Y.call(e,t)?e[t]:e[t]=[]).push(n)}),e},r.initial=function(n,r,t){if(!n)return[];var e=0,u=n.length;if(typeof r!="number"&&null!=r){var o=u;for(r=M(r,t);o--&&r(n[o],o,n);)e++}else e=null==r||t?1:r||e;return nr.call(n,0,fr(or(0,u-e),u))
  20
+},r.invert=l,r.invoke=function(n,r){var t=nr.call(arguments,2),e=-1,u=typeof r=="function",o=n?n.length:0,f=Array(typeof o=="number"?o:0);return _(n,function(n){f[++e]=(u?r:n[r]).apply(n,t)}),f},r.keys=sr,r.map=j,r.max=function(n,r,t){var e=-1/0,u=e,o=-1,f=n?n.length:0;if(r||typeof f!="number")r=M(r,t),_(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});else for(;++o<f;)t=n[o],t>u&&(u=t);return u},r.min=function(n,r,t){var e=1/0,u=e,o=-1,f=n?n.length:0;if(r||typeof f!="number")r=M(r,t),_(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)
  21
+});else for(;++o<f;)t=n[o],t<u&&(u=t);return u},r.omit=function(n){var r=W.apply(Q,arguments),t={};return vr(n,function(n,e){0>E(r,e,1)&&(t[e]=n)}),t},r.once=function(n){var r,t;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},r.pairs=function(n){for(var r=-1,t=sr(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},r.pick=function(n){for(var r=0,t=W.apply(Q,arguments),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},r.reject=function(n,r,t){return r=M(r,t),b(n,function(n,t,e){return!r(n,t,e)
  22
+})},r.rest=B,r.shuffle=function(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return _(n,function(n){var t=X(ir()*(++r+1));e[r]=e[t],e[t]=n}),e},r.sortBy=function(n,r,e){var u=-1,o=n?n.length:0,f=Array(typeof o=="number"?o:0);for(r=M(r,e),_(n,function(n,t,e){f[++u]={a:r(n,t,e),b:u,c:n}}),o=f.length,f.sort(t);o--;)f[o]=f[o].c;return f},r.toArray=function(n){return lr(n)?nr.call(n):n&&typeof n.length=="number"?j(n):g(n)},r.values=g,r.without=function(n){for(var r=-1,t=n.length,e=[];++r<t;){var u=n[r];
  23
+0>E(arguments,u,1)&&e.push(u)}return e},r.collect=j,r.drop=B,r.each=_,r.extend=a,r.methods=c,r.select=b,r.tail=B,r.clone=function(n){return v(n)?lr(n)?nr.call(n):a({},n):n},r.contains=y,r.escape=function(n){return null==n?"":(n+"").replace(z,u)},r.every=m,r.find=d,r.has=function(n,r){return n?Y.call(n,r):!1},r.identity=I,r.indexOf=E,r.isArguments=i,r.isArray=lr,r.isEmpty=function(n){if(!n)return!0;if(lr(n)||h(n))return!n.length;for(var r in n)if(Y.call(n,r))return!1;return!0},r.isEqual=s,r.isFunction=p,r.isObject=v,r.isRegExp=function(n){return n instanceof RegExp||rr.call(n)==J
  24
+},r.isString=h,r.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?or(0,e+t):fr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},r.mixin=S,r.reduce=w,r.reduceRight=x,r.result=function(n,r){var t=n?n[r]:null;return p(t)?n[r]():t},r.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:sr(n).length},r.some=A,r.sortedIndex=R,r.uniqueId=function(n){var r=++q+"";return n?n+r:r},r.all=m,r.any=A,r.detect=d,r.foldl=w,r.foldr=x,r.include=y,r.inject=w,r.first=O,r.last=function(n,r,t){if(n){var e=0,u=n.length;
  25
+if(typeof r!="number"&&null!=r){var o=u;for(r=M(r,t);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n[u-1];return nr.call(n,or(0,u-e))}},r.take=O,r.head=O,r.chain=function(n){return n=new o(n),n.__chain__=!0,n},r.VERSION="1.1.0",S(r),r.prototype.chain=function(){return this.__chain__=!0,this},r.prototype.value=function(){return this.__wrapped__},_("pop push reverse shift sort splice unshift".split(" "),function(n){var t=Q[n];r.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),!cr.spliceObjects&&0===n.length&&delete n[0],this
  26
+}}),_(["concat","join","slice"],function(n){var t=Q[n];r.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=r,define(function(){return r})):F&&!F.nodeType?N?(N.exports=r)._=r:F._=r:n._=r})(this);
4  dist/lodash.js
@@ -2346,15 +2346,15 @@
2346 2346
       var index = -1,
2347 2347
           length = collection ? collection.length : 0;
2348 2348
 
  2349
+      callback = callback && typeof thisArg == 'undefined' ? callback : lodash.createCallback(callback, thisArg);
2349 2350
       if (typeof length == 'number') {
2350  
-        callback = callback && typeof thisArg == 'undefined' ? callback : lodash.createCallback(callback, thisArg);
2351 2351
         while (++index < length) {
2352 2352
           if (callback(collection[index], index, collection) === false) {
2353 2353
             break;
2354 2354
           }
2355 2355
         }
2356 2356
       } else {
2357  
-        forOwn(collection, callback, thisArg);
  2357
+        forOwn(collection, callback);
2358 2358
       }
2359 2359
       return collection;
2360 2360
     }
2  dist/lodash.min.js
@@ -13,7 +13,7 @@ switch(p){case w:case j:return+n==+t;case C:return n!=+n?t!=+t:0==n?1/n==1/t:n==
13 13
 for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=L(n[l],s,e,r,u,o)););else if(!(c=L(n[v],s,e,r,u,o)))break;return c}return pe(t,function(t,a,i){return Ut.call(i,a)?(v++,c=Ut.call(n,a)&&L(n[a],t,e,r,u,o)):void 0}),c&&!f&&pe(n,function(n,t,e){return Ut.call(e,t)?c=-1<--v:void 0}),c}function Q(n){return typeof n=="function"}function W(n){return n?I[typeof n]:!1}function X(n){return typeof n=="number"||Jt.call(n)==C}function Y(n){return typeof n=="string"||Jt.call(n)==N}function Z(n,t,e){var r=arguments,u=0,o=2;
14 14
 if(!W(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);for(;++u<o;)(ae(r[u])?at:se)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=ae(t))||ve(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?ae(o)?o:[]:ve(o)?o:{},f&&(a=f(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),f||(o=Z(o,t,i,f,c,l)))}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
15 15
 n[e]=o});return n}function nt(n){for(var t=-1,e=oe(n),r=e.length,u=Ct(r);++t<r;)u[t]=n[e[t]];return u}function tt(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?Zt(0,u+e):e)||0,typeof u=="number"?a=-1<(Y(n)?n.indexOf(t,e):gt(n,t,e)):se(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function et(n,t,e){var r=!0;t=a.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&(r=!!t(n[e],e,n)););else se(n,function(n,e,u){return r=!!t(n,e,u)});return r}function rt(n,t,e){var r=[];
16  
-t=a.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}else se(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ut(n,t,e){t=a.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return se(n,function(n,e,r){return t(n,e,r)?(u=n,!1):void 0}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function at(n,t,e){var r=-1,u=n?n.length:0;if(typeof u=="number")for(t=t&&typeof e=="undefined"?t:a.createCallback(t,e);++r<u&&!1!==t(n[r],r,n););else se(n,t,e);
  16
+t=a.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}else se(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ut(n,t,e){t=a.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return se(n,function(n,e,r){return t(n,e,r)?(u=n,!1):void 0}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function at(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:a.createCallback(t,e),typeof u=="number")for(;++r<u&&!1!==t(n[r],r,n););else se(n,t);
17 17
 return n}function ot(n,t,e){var r=-1,u=n?n.length:0;if(t=a.createCallback(t,e),typeof u=="number")for(var o=Ct(u);++r<u;)o[r]=t(n[r],r,n);else o=[],se(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function it(n,t,e){var r=-1/0,u=r;if(!t&&ae(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&Y(n)?q:a.createCallback(t,e),at(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function ft(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Ct(r);++e<r;)u[e]=n[e][t];return u||ot(n,t)
18 18
 }function ct(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=a.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else se(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function lt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=oe(n),u=i.length;return t=a.createCallback(t,r,4),at(n,function(r,a,f){a=i?i[--u]:--u,e=o?(o=!1,n[a]):t(e,n[a],a,f)}),e}function pt(n,t,e){var r;t=a.createCallback(t,e),e=-1;var u=n?n.length:0;
19 19
 if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else se(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function st(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return M(n,0,ne(Zt(0,r),u))}}function vt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),ae(r)?Vt.apply(i,t?r:vt(r)):i.push(r);
6  dist/lodash.underscore.js
@@ -705,7 +705,6 @@
705 705
     var index, iterable = collection, result = iterable;
706 706
     if (!iterable) return result;
707 707
     if (!objectTypes[typeof iterable]) return result;
708  
-    callback || (callback = identity);
709 708
 
710 709
       for (index in iterable) {
711 710
         if (callback(iterable[index], index, collection) === indicatorObject) return result;    
@@ -738,7 +737,6 @@
738 737
     var index, iterable = collection, result = iterable;
739 738
     if (!iterable) return result;
740 739
     if (!objectTypes[typeof iterable]) return result;
741  
-    callback || (callback = identity);
742 740
 
743 741
       for (index in iterable) {
744 742
         if (hasOwnProperty.call(iterable, index)) {    
@@ -1683,15 +1681,15 @@
1683 1681
     var index = -1,
1684 1682
         length = collection ? collection.length : 0;
1685 1683
 
  1684
+    callback = callback && typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg);
1686 1685
     if (typeof length == 'number') {
1687  
-      callback = callback && typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg);
1688 1686
       while (++index < length) {
1689 1687
         if (callback(collection[index], index, collection) === indicatorObject) {
1690 1688
           break;
1691 1689
         }
1692 1690
       }
1693 1691
     } else {
1694  
-      forOwn(collection, callback, thisArg);
  1692
+      forOwn(collection, callback);
1695 1693
     };
1696 1694
   }
1697 1695
 
4  dist/lodash.underscore.min.js
@@ -4,13 +4,13 @@
4 4
  * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
5 5
  * Underscore.js 1.4.4 underscorejs.org/LICENSE
6 6
  */
7  
-;(function(n){function t(n,t){var r;if(n&&st[typeof n])for(r in t||(t=W),n)if(jt.call(n,r)&&t(n[r],r,n)===Z)break}function r(n,t){var r;if(n&&st[typeof n])for(r in t||(t=W),n)if(t(n[r],r,n)===Z)break}function e(n){var t,r=[];if(!n||!st[typeof n])return r;for(t in n)jt.call(n,t)&&r.push(t);return r}function u(n){return n instanceof u?n:new c(n)}function o(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function i(n,t,r){function e(){var f=arguments,c=o?this:t;
  7
+;(function(n){function t(n,t){var r;if(n&&st[typeof n])for(r in n)if(jt.call(n,r)&&t(n[r],r,n)===Z)break}function r(n,t){var r;if(n&&st[typeof n])for(r in n)if(t(n[r],r,n)===Z)break}function e(n){var t,r=[];if(!n||!st[typeof n])return r;for(t in n)jt.call(n,t)&&r.push(t);return r}function u(n){return n instanceof u?n:new c(n)}function o(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function i(n,t,r){function e(){var f=arguments,c=o?this:t;
8 8
 return u||(n=t[i]),r.length&&(f=f.length?(f=xt.call(f),a?f.concat(r):r.concat(f)):r),this instanceof e?(l.prototype=n.prototype,c=new l,l.prototype=J,f=n.apply(c,f),d(f)?f:c):n.apply(c,f)}var u=b(n),o=!r,i=t;if(o){var a=void 0;r=t}else if(!u)throw new TypeError;return e}function a(n){return"\\"+vt[n]}function f(n){return It[n]}function c(n){this.__wrapped__=n}function l(){}function p(n){return zt[n]}function s(n){return Ot.call(n)==ut}function v(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];
9 9
 if(e)for(var u in e)n[u]=e[u]}return n}function g(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]==J&&(n[u]=e[u])}return n}function h(n){var t=[];return r(n,function(n,r){b(n)&&t.push(r)}),t.sort()}function y(n){for(var t=-1,r=$t(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function m(n){if(!n)return H;if(Tt(n)||w(n))return!n.length;for(var t in n)if(jt.call(n,t))return K;return H}function _(n,t,e,o){if(n===t)return 0!==n||1/n==1/t;
10 10
 var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=a&&"object"!=a))return K;if(n==J||t==J)return n===t;if(a=Ot.call(n),i=Ot.call(t),a!=i)return K;switch(a){case it:case at:return+n==+t;case ft:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case lt:case pt:return n==t+""}if(i=a==ot,!i){if(n instanceof u||t instanceof u)return _(n.__wrapped__||n,t.__wrapped__||t,e,o);if(a!=ct)return K;var a=n.constructor,f=t.constructor;if(a!=f&&(!b(a)||!(a instanceof a&&b(f)&&f instanceof f)))return K
11 11
 }for(e||(e=[]),o||(o=[]),a=e.length;a--;)if(e[a]==n)return o[a]==t;var c=H,l=0;if(e.push(n),o.push(t),i){if(l=t.length,c=l==n.length)for(;l--&&(c=_(n[l],t[l],e,o)););return c}return r(t,function(t,r,u){return jt.call(u,r)?(l++,!(c=jt.call(n,r)&&_(n[r],t,e,o))&&Z):void 0}),c&&r(n,function(n,t,r){return jt.call(r,t)?!(c=-1<--l)&&Z:void 0}),c}function b(n){return typeof n=="function"}function d(n){return n?st[typeof n]:K}function j(n){return typeof n=="number"||Ot.call(n)==ft}function w(n){return typeof n=="string"||Ot.call(n)==pt
12 12
 }function A(n){for(var t=-1,r=$t(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function x(n,r){var e=K;return typeof(n?n.length:0)=="number"?e=-1<I(n,r):t(n,function(n){return(e=n===r)&&Z}),e}function O(n,r,e){var u=H;r=V(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o&&(u=!!r(n[e],e,n)););else t(n,function(n,t,e){return!(u=!!r(n,t,e))&&Z});return u}function E(n,r,e){var u=[];r=V(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o;){var i=n[e];r(i,e,n)&&u.push(i)}else t(n,function(n,t,e){r(n,t,e)&&u.push(n)
13  
-});return u}function S(n,r,e){r=V(r,e),e=-1;var u=n?n.length:0;if(typeof u!="number"){var o;return t(n,function(n,t,e){return r(n,t,e)?(o=n,Z):void 0}),o}for(;++e<u;){var i=n[e];if(r(i,e,n))return i}}function N(n,r,e){var u=-1,o=n?n.length:0;if(typeof o=="number")for(r=r&&typeof e=="undefined"?r:V(r,e);++u<o&&r(n[u],u,n)!==Z;);else t(n,r)}function k(n,r,e){var u=-1,o=n?n.length:0;if(r=V(r,e),typeof o=="number")for(var i=Array(o);++u<o;)i[u]=r(n[u],u,n);else i=[],t(n,function(n,t,e){i[++u]=r(n,t,e)
  13
+});return u}function S(n,r,e){r=V(r,e),e=-1;var u=n?n.length:0;if(typeof u!="number"){var o;return t(n,function(n,t,e){return r(n,t,e)?(o=n,Z):void 0}),o}for(;++e<u;){var i=n[e];if(r(i,e,n))return i}}function N(n,r,e){var u=-1,o=n?n.length:0;if(r=r&&typeof e=="undefined"?r:V(r,e),typeof o=="number")for(;++u<o&&r(n[u],u,n)!==Z;);else t(n,r)}function k(n,r,e){var u=-1,o=n?n.length:0;if(r=V(r,e),typeof o=="number")for(var i=Array(o);++u<o;)i[u]=r(n[u],u,n);else i=[],t(n,function(n,t,e){i[++u]=r(n,t,e)
14 14
 });return i}function B(n,t,r){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=V(t,r),N(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r>u&&(u=r);return u}function F(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++r<e;)u[r]=n[r][t];return u||k(n,t)}function R(n,r,e,u){if(!n)return e;var o=3>arguments.length;r=V(r,u,4);var i=-1,a=n.length;if(typeof a=="number")for(o&&(e=n[++i]);++i<a;)e=r(e,n[i],i,n);else t(n,function(n,t,u){e=o?(o=K,n):r(e,n,t,u)
15 15
 });return e}function q(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=$t(n),u=i.length;return t=V(t,e,4),N(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=K,n[a]):t(r,n[a],a,f)}),r}function D(n,r,e){var u;r=V(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o&&!(u=r(n[e],e,n)););else t(n,function(n,t,e){return(u=r(n,t,e))&&Z});return!!u}function M(n,t,r){return r&&m(t)?J:(r?S:E)(n,t)}function T(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=J){var o=-1;
16 16
 for(t=V(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,e==J||r)return n[0];return xt.call(n,0,Rt(Ft(0,e),u))}}function $(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Tt(o)?wt.apply(u,t?o:$(o)):u.push(o)}return u}function I(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?Ft(0,u+r):r||0)-1;else if(r)return e=C(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function z(n,t,r){if(typeof t!="number"&&t!=J){var e=0,u=-1,o=n?n.length:0;for(t=V(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==J||r?1:Ft(0,t);
12  test/test-build.js
@@ -899,6 +899,18 @@
899 899
         equal(last, _.last(array), '_.forEach should not exit early: ' + basename);
900 900
         equal(actual, undefined, '_.forEach should return `undefined`: ' + basename);
901 901
 
  902
+        lodash.forEach([1], function(value, index) {
  903
+          actual = this[index];
  904
+        }, [2]);
  905
+
  906
+        equal(actual, 2, '_.forEach supports the `thisArg` argument when iterating arrays: ' + basename);
  907
+
  908
+        lodash.forEach({ 'a': 1 }, function(value, key) {
  909
+          actual = this[key];
  910
+        }, { 'a': 2 });
  911
+
  912
+        equal(actual, 2, '_.forEach supports the `thisArg` argument when iterating objects: ' + basename);
  913
+
902 914
         array = [{ 'a': [1, 2] }, { 'a': [3] }];
903 915
 
904 916
         actual = lodash.flatten(array, function(value, index) {

0 notes on commit 212b05c

Please sign in to comment.
Something went wrong with that request. Please try again.