|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
366 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | function parseHost(urlObj, options)
|
|---|
| 4 | {
|
|---|
| 5 | // TWEAK :: condition only for speed optimization
|
|---|
| 6 | if (options.ignore_www)
|
|---|
| 7 | {
|
|---|
| 8 | var host = urlObj.host.full;
|
|---|
| 9 |
|
|---|
| 10 | if (host)
|
|---|
| 11 | {
|
|---|
| 12 | var stripped = host;
|
|---|
| 13 |
|
|---|
| 14 | if (host.indexOf("www.") === 0)
|
|---|
| 15 | {
|
|---|
| 16 | stripped = host.substr(4);
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | urlObj.host.stripped = stripped;
|
|---|
| 20 | }
|
|---|
| 21 | }
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 | module.exports = parseHost;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.