Ensure _.where deep compares properties values.

Former-commit-id: f3f29abf024f87a947fef6df1e3db9d9d1de99bf
This commit is contained in:
John-David Dalton
2013-01-22 23:54:09 -08:00
parent 288ac115d0
commit e41b181163
6 changed files with 120 additions and 111 deletions

2
lodash.min.js vendored
View File

@@ -4,7 +4,7 @@
* Underscore.js 1.4.3 underscorejs.org/LICENSE
*/
;(function(n,t){function r(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof r?(this.__wrapped__=n,void 0):new r(n)}function e(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||ot);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";(At.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return At.call(o,e)&&-1<L(o[e],r)}return-1<L(n,r,t)}}function u(n){return n.charCodeAt(0)}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,e){function u(){var f=arguments,c=i?this:t;return o||(n=t[a]),r.length&&(f=f.length?(f=v(f),e?f.concat(r):r.concat(f)):r),this instanceof u?(s.prototype=n.prototype,c=new s,s.prototype=null,f=n.apply(c,f),A(f)?f:c):n.apply(c,f)}var o=O(n),i=!r,a=t;return i&&(r=t),o||(t=n),u}function a(n,t,r){if(!n)return J;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=cr(n);return function(t){for(var r=u.length,e=!1;r--&&(e=t[u[r]]===n[u[r]]););return e
}return r<e?-1:1}function i(n,t,r,e){function u(){var f=arguments,c=i?this:t;return o||(n=t[a]),r.length&&(f=f.length?(f=v(f),e?f.concat(r):r.concat(f)):r),this instanceof u?(s.prototype=n.prototype,c=new s,s.prototype=null,f=n.apply(c,f),A(f)?f:c):n.apply(c,f)}var o=O(n),i=!r,a=t;return i&&(r=t),o||(t=n),u}function a(n,t,r){if(!n)return J;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=cr(n);return function(t){for(var r=u.length,e=!1;r--&&(e=x(t[u[r]],n[u[r]])););return e
}}return typeof t!="undefined"?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 f(){for(var n,t={e:Z,f:Ft,h:Jt,i:Xt,j:bt,b:!1,c:"",g:"",k:"",l:!0},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r=Function,e="var f,i="+t.d+",p="+t.d+";if(!"+t.d+")return p;"+t.k+";",t.b?(e+="var j=i.length;f=-1;if(typeof j=='number'){",t.i&&(e+="if(h(i)){i=i.split('')}"),e+="while(++f<j){"+t.g+"}}else{"):t.h&&(e+="var j=i.length;f=-1;if(j&&g(i)){while(++f<j){f+='';"+t.g+"}}else{"),t.e||(e+="var q=typeof i=='function'&&o.call(i,'prototype');"),t.f&&t.l?(e+="var m=-1,n=l[typeof i]?k(i):[],j=n.length;while(++m<j){f=n[m];",t.e||(e+="if(!(q&&f=='prototype')){"),e+=t.g+"",t.e||(e+="}")):(e+="for(f in i){",(!t.e||t.l)&&(e+="if(",t.e||(e+="!(q&&f=='prototype')"),!t.e&&t.l&&(e+="&&"),t.l&&(e+="e.call(i,f)"),e+="){"),e+=t.g+";",(!t.e||t.l)&&(e+="}")),e+="}",t.e){e+="var d=i.constructor;";
for(var u=0;7>u;u++)e+="f='"+t.j[u]+"';if(","constructor"==t.j[u]&&(e+="!(d&&d.prototype===i)&&"),e+="e.call(i,f)){"+t.g+"}"}return(t.b||t.h)&&(e+="}"),e+=t.c+";return p",r("c,e,g,h,l,k,o","return function("+n+"){"+e+"}")(a,At,h,E,rr,Ft,Et)}function c(n){return"\\"+er[n]}function l(n){return lr[n]}function p(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function s(){}function v(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Array(0>r?0:r);++e<r;)u[e]=n[t+e];
return u}function g(n){return pr[n]}function h(n){return kt.call(n)==Bt}function y(n){var t=!1;if(!n||typeof n!="object"||h(n))return t;var r=n.constructor;return!O(r)&&(!Yt||!p(n))||r instanceof r?nt?(ar(n,function(n,r,e){return t=!At.call(e,r),!1}),!1===t):(ar(n,function(n,r){t=r}),!1===t||At.call(n,t)):t}function m(n){var t=[];return fr(n,function(n,r){t.push(r)}),t}function _(n,t,r){for(var e=arguments,u=0,o=typeof r=="number"?2:e.length;++u<o;)(sr(e[u])?D:fr)(e[u],function(t,r){n[r]=t});return n