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: Addressed feedback, used destructuring Created Jan. 17, 2017, 7:39 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
« no previous file with comments | « lib/subscriptionInit.js ('k') | lib/uninstall.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « lib/subscriptionInit.js ('k') | lib/uninstall.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld