Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/url.js

Issue 6445129351036928: Noissue - Fixed issue where JsDoc documented module functions incorrectly (Closed)
Patch Set: Created April 15, 2015, 3:52 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/stats.js ('k') | lib/whitelisting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/url.js
===================================================================
--- a/lib/url.js
+++ b/lib/url.js
@@ -53,6 +53,7 @@
*
* @param {URL} url
* @return {string}
+ * @static
*/
function getDecodedHostname(url)
{
@@ -73,7 +74,7 @@
* @param {Frame} frame
* @return {string}
*/
-function extractHostFromFrame(frame)
+exports.extractHostFromFrame = function(frame)
{
for (; frame; frame = frame.parent)
{
@@ -83,8 +84,7 @@
}
return "";
-}
-exports.extractHostFromFrame = extractHostFromFrame;
+};
/**
* Converts a URL object into a string. For HTTP(S) URLs
@@ -93,7 +93,7 @@
* @param {URL} url
* @return {string}
*/
-function stringifyURL(url)
+exports.stringifyURL = function(url)
{
let protocol = url.protocol;
let href = url.href;
@@ -110,9 +110,7 @@
}
return href;
-}
-
-exports.stringifyURL = stringifyURL;
+};
function isDomain(hostname)
{
@@ -154,7 +152,7 @@
* @param {string} documentHost The IDN-decoded hostname of the document
* @return {Boolean}
*/
-function isThirdParty(url, documentHost)
+exports.isThirdParty = function(url, documentHost)
{
let requestHost = getDecodedHostname(url).replace(/\.+$/, "");
documentHost = documentHost.replace(/\.+$/, "");
@@ -166,5 +164,4 @@
return true;
return getBaseDomain(requestHost) != getBaseDomain(documentHost);
-}
-exports.isThirdParty = isThirdParty;
+};
« no previous file with comments | « lib/stats.js ('k') | lib/whitelisting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld