Side navigation
#1157 closed enhancement (wontfix)
Opened May 02, 2007 05:18PM UTC
Closed May 05, 2007 05:45PM UTC
Last modified June 21, 2007 04:54AM UTC
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 (1)
Changed May 05, 2007 05:45PM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
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).