Move lodash instance check up in lodash function and tweak chaining benchmark.

Former-commit-id: 799ae05e5180ee87bb2a5249be3e442ed0425ef7
This commit is contained in:
John-David Dalton
2013-03-04 01:40:55 -08:00
parent 9f19c302d8
commit 35bd7c55d0
9 changed files with 24 additions and 24 deletions

View File

@@ -4,7 +4,7 @@
* Build: `lodash underscore -o ./dist/lodash.underscore.js`
* Underscore.js 1.4.4 underscorejs.org/LICENSE
*/
;(function(n){function r(n,r){var t;if(n&&pr[typeof n])for(t in r||(r=V),n)if(r(n[t],t,n)===Y)break}function t(n,r,t){if(n){r=r&&typeof t=="undefined"?r:U(r,t);var e=n.length;if(t=-1,typeof e=="number")for(;++t<e&&r(n[t],t,n)!==Y;);else for(t in n)if(br.call(n,t)&&r(n[t],t,n)===Y)break}}function e(n){return n instanceof e?n:this instanceof e?(this.__wrapped__=n,void 0):new e(n)}function u(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
;(function(n){function r(n,r){var t;if(n&&pr[typeof n])for(t in r||(r=V),n)if(r(n[t],t,n)===Y)break}function t(n,r,t){if(n){r=r&&typeof t=="undefined"?r:U(r,t);var e=n.length;if(t=-1,typeof e=="number")for(;++t<e&&r(n[t],t,n)!==Y;);else for(t in n)if(br.call(n,t)&&r(n[t],t,n)===Y)break}}function e(n){return this instanceof e?n instanceof e?n:(this.__wrapped__=n,void 0):new e(n)}function u(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 o(n,r,t){function e(){var a=arguments,f=o?this:r;return u||(n=r[i]),t.length&&(a=a.length?(a=c(a),t.concat(a)):t),this instanceof e?(f=$r(n.prototype),a=n.apply(f,a),b(a)?a:f):n.apply(f,a)}var u=d(n),o=!t,i=r;return o&&(t=r),u||(r=n),e}function i(n){return"\\"+sr[n]}function a(n){return zr[n]}function f(){}function c(n,r,t){r||(r=0),typeof t=="undefined"&&(t=n?n.length:0);var e=-1;t=t-r||0;for(var u=Array(0>t?0:t);++e<t;)u[e]=n[r+e];return u}function l(n){return Cr[n]}function p(n){return Ar.call(n)==er
}function s(n){var r,t=[],e=function(n,r){t.push(r)};if(n&&pr[typeof n])for(r in e||(e=V),n)if(br.call(n,r)&&e(n[r],r,n)===Y)break;return t}function v(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 h(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]==H&&(n[u]=e[u])}return n}function g(n){var t=[];return r(n,function(n,r){d(n)&&t.push(r)}),t.sort()}function y(n){for(var r=-1,t=Tr(n),e=t.length,u={};++r<e;){var o=t[r];
u[n[o]]=o}return u}function m(n){if(!n)return G;if(Ir(n)||w(n))return!n.length;for(var r in n)if(br.call(n,r))return J;return G}function _(n,t,u,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=a&&"object"!=a))return J;if(n==H||t==H)return n===t;if(a=Ar.call(n),i=Ar.call(t),a!=i)return J;switch(a){case or:case ir:return+n==+t;case ar:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case cr:case lr:return n==t+""}if(i=a==ur,!i){if(n instanceof e||t instanceof e)return _(n.__wrapped__||n,t.__wrapped__||t,u,o);