It would be very nice to have a function similar to eq() performing same-origin matching. Such a feature could be used by other modules to calculate service boundaries, blacklisting, per-site settings etc.
It is defined in RFC 6454 Section 4 and Section 5.