dnsDomainLevels.d.ts 446 B

123456789101112131415161718
  1. /**
  2. * Returns the number (integer) of DNS domain levels (number of dots) in the
  3. * hostname.
  4. *
  5. * Examples:
  6. *
  7. * ``` js
  8. * dnsDomainLevels("www")
  9. * // returns 0.
  10. * dnsDomainLevels("www.netscape.com")
  11. * // returns 2.
  12. * ```
  13. *
  14. * @param {String} host is the hostname from the URL.
  15. * @return {Number} number of domain levels
  16. */
  17. export default function dnsDomainLevels(host: string): number;
  18. //# sourceMappingURL=dnsDomainLevels.d.ts.map