Improve speed of $.map with object support (-5% previous speed) and improve .length detection

This commit is contained in:
Dan Heberden 2011-04-04 23:59:54 -07:00
parent 00dd6013b6
commit c72371f714
4 changed files with 11 additions and 12 deletions

View file

@ -625,7 +625,7 @@ test("map()", function() {
q("ap","ap","ap"),
"Single Map"
);
//for #2616
var keys = jQuery.map( {a:1,b:2}, function( v, k ){
return k;
@ -636,7 +636,7 @@ test("map()", function() {
return v;
});
equals( values.join(""), "12", "Map the values from a hash to an array" );
// object with length prop
var values = jQuery.map( {a:1,b:2, length:3}, function( v, k ){
return v;