WoW:API UnitIsVisible

Template:API/Uncategorized

Also, some functions return different values if the target is close enough to be 'visible' to your client (not necessarily in line of sight), as can be determined with UnitIsVisible("unit"), versus further away.