68d275e5ec0b4a1cb8a768999d2165aff1626b5886d8326529824c3ebb1a8cb740e5593f30ef7697e3335ff504c59e6e587f773fc799ae9f162a5d550d8465 366 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. function parseHost(urlObj, options)
  3. {
  4. // TWEAK :: condition only for speed optimization
  5. if (options.ignore_www)
  6. {
  7. var host = urlObj.host.full;
  8. if (host)
  9. {
  10. var stripped = host;
  11. if (host.indexOf("www.") === 0)
  12. {
  13. stripped = host.substr(4);
  14. }
  15. urlObj.host.stripped = stripped;
  16. }
  17. }
  18. }
  19. module.exports = parseHost;