Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1157 closed enhancement (wontfix)

Adding array diff utility function

Reported by: bermi Owned by:
Priority: minor Milestone: 1.1.3
Component: core Version: 1.1.2
Keywords: array, diff Cc:
Blocked by: Blocking:


I've ported PHP function array_diff to JQuery.

It compares two or more arrays, and returns an array with the values from the first array, only if the value is not present in the second array.

$.diff( ['a','b','c'], ['b','d','e'] );



Attachments (1)

array_diff.patch (950 bytes) - added by bermi 16 years ago.

Download all attachments as: .zip

Change History (2)

Changed 16 years ago by bermi

Attachment: array_diff.patch added

comment:1 Changed 16 years ago by john

Resolution: wontfix
Status: newclosed

Looks good - you should release it as a simple plugin (we currently don't have a need for it in core, and we're being quite selective about what code is currently added).

Note: See TracTickets for help on using tickets.