#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: |
Description
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'] );
produces
['a','b']
Attachments (1)
Change History (2)
Changed 16 years ago by
Attachment: | array_diff.patch added |
---|
comment:1 Changed 16 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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).