dnsDomainIs.d.ts 612 B

1234567891011121314151617181920212223
  1. /**
  2. * Returns true iff the domain of hostname matches.
  3. *
  4. * Examples:
  5. *
  6. * ``` js
  7. * dnsDomainIs("www.netscape.com", ".netscape.com")
  8. * // is true.
  9. *
  10. * dnsDomainIs("www", ".netscape.com")
  11. * // is false.
  12. *
  13. * dnsDomainIs("www.mcom.com", ".netscape.com")
  14. * // is false.
  15. * ```
  16. *
  17. *
  18. * @param {String} host is the hostname from the URL.
  19. * @param {String} domain is the domain name to test the hostname against.
  20. * @return {Boolean} true iff the domain of the hostname matches.
  21. */
  22. export default function dnsDomainIs(host: string, domain: string): boolean;
  23. //# sourceMappingURL=dnsDomainIs.d.ts.map