The following functions got added today (7/2) in a new file called AuraUtil.lua in the FrameXML folder. I haven't had time to test them out but I figured I would post this so other people can check them out.
localfunction FindAuraRecurse(predicate, unit, filter, auraIndex, predicateArg1, predicateArg2, predicateArg3, ...)
if ... ==nilthen
returnnil;-- Not found
if predicate(predicateArg1, predicateArg2, predicateArg3, ...)then
Mhmm why always rely on the name of an aura instead of a more unique , non localised spellid?
Well it seems to me like the whole purpose of this little file IS to find an aura by name. The rest are just functions that iterate over the currently active auras until they either find it or don't. While if we're looking for an aura by it's spellID, all we have to do is a normal iteration over the active auras and directly compare the values.
I'm not sure why they have added this, no part of the UI uses it yet. But it could be useful if an aura have several versions but the same name, and all we want to know if it's there at all. I wouldn't do it this way, though. Localized strings are just such a bad, bad way to do anything when actual spellIDs exist! The easy way out always comes with its own problems.