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

Unified Diff: lib/tldjs.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Patch Set: Define and destructure backgroundPage more consistently, fix minor whitespace errors Created Jan. 18, 2017, 7:34 a.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
Index: lib/tldjs.js
diff --git a/lib/tldjs.js b/lib/tldjs.js
index c354375b2fb223fc83c4472f642d4802a2b3d1b5..9106aa2161267a8d5889f7f1ab3f876148eb273f 100644
--- a/lib/tldjs.js
+++ b/lib/tldjs.js
@@ -17,6 +17,8 @@
/** @module tldjs */
+"use strict";
+
let getDomain =
/**
* Get the base domain for given hostname.
@@ -24,7 +26,7 @@ let getDomain =
* @param {string} hostname
* @return {string}
*/
-exports.getDomain = function(hostname)
+exports.getDomain = hostname =>
{
let bits = hostname.split(".");
let cutoff = bits.length - 2;

Powered by Google App Engine
This is Rietveld