remove_duplicates_filter: address issue248
commit490d55ce0e2b6e8e3b36c380234460e8293884b8
authorJohn Foerch <jjfoerch@earthlink.net>
Fri, 19 Feb 2010 19:54:23 +0000 (19 14:54 -0500)
committerJohn Foerch <jjfoerch@earthlink.net>
Fri, 19 Feb 2010 19:54:23 +0000 (19 14:54 -0500)
treea062e11c639612076469c15bcadbd3f88660c900
parent5767cfdfd26e5169d022e987334a2f5c5534a9a7
remove_duplicates_filter: address issue248

because remove_duplicates_filter used hashing into an object as its means
of comparison, it was not suitable in the general case where you want to
test equality of compound datatypes like objects.  All objects got hashed
as "[object Object]".

this patch adds an optional argument to remove_duplicates_filter to allow
the user to provide a comparison function for a more generalized filter
function.  when no comparison function is given, remove_duplicates_filter
works as before.
modules/array.js