flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
26
BACK_BACK/node_modules/relateurl/lib/parse/host.js
generated
vendored
Executable file
26
BACK_BACK/node_modules/relateurl/lib/parse/host.js
generated
vendored
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
|
||||
function parseHost(urlObj, options)
|
||||
{
|
||||
// TWEAK :: condition only for speed optimization
|
||||
if (options.ignore_www)
|
||||
{
|
||||
var host = urlObj.host.full;
|
||||
|
||||
if (host)
|
||||
{
|
||||
var stripped = host;
|
||||
|
||||
if (host.indexOf("www.") === 0)
|
||||
{
|
||||
stripped = host.substr(4);
|
||||
}
|
||||
|
||||
urlObj.host.stripped = stripped;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = parseHost;
|
||||
Loading…
Add table
Add a link
Reference in a new issue