If you want to do some deeper comparison to see if objects in an array
are identical in content but different instances, then I think 'every'
is the proper method to use and you just pass your comparison function
as the argument.
Any thoughts?
I think you need both. Maybe name this one "same" (or "sameAs") and the
other one "equal" (I'd add the s: "equals"), because what the strict
comparison is really doing is saying that this is a reference to the *same*
object as the one passed as an argument, not that they are equivalent.
Equivalency really suggests a comparison between different objects, not just
a check to see if they are the same object. Basically, you need an
Object.compare function that you can call from this function. That would
make life much easier, and you could even have it return a tri-state value,
e.g. 0=false (not equivalent), 1=true (equivalent), 2 or -1 or null or
whatever = duplicate reference (a==b).
ryanm
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com