Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8328 closed enhancement (duplicate)

$.map supporting objects

Reported by: jboesch Owned by:
Priority: low Milestone: 1.next
Component: misc Version: 1.5.1rc1
Keywords: needsreview Cc:
Blocked by: Blocking:


Pull request here:


Addresses http://bugs.jquery.com/ticket/2616 and http://bugs.jquery.com/ticket/4459

Since it was 3 years ago, it didn't seem like it's a huge priority. I wanted to make the addition to handle objects without sacrificing the raw speed of $.map for arrays. Underscore.js already implements this: http://documentcloud.github.com/underscore/#map

Here are some benchmarks: http://jsperf.com/old-map-vs-new-map-with-obj-support/2 The last test ($.new_map_forin_2) is the one that is in this pull request.

Some more tests here: http://jsfiddle.net/mmhwZ/16/

Change History (3)

comment:1 Changed 12 years ago by jitter

Component: unfiledmisc
Keywords: needsreview added
Priority: undecidedlow
Status: newopen

comment:2 Changed 12 years ago by Rick Waldron

Resolution: duplicate
Status: openclosed

comment:3 Changed 12 years ago by Rick Waldron

Duplicate of #2616.

Note: See TracTickets for help on using tickets.