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

Unified Diff: lib/tldjs.js

Issue 29715577: Issue 6449 - Switch to Harmony modules (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Add lib/.eslintrc.json Created March 6, 2018, 10:30 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
===================================================================
--- a/lib/tldjs.js
+++ b/lib/tldjs.js
@@ -14,25 +14,23 @@
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
/* global publicSuffixes */
/** @module tldjs */
-"use strict";
-
/**
* Get the base domain for given hostname.
*
* @param {string} hostname
* @return {string}
*/
-exports.getDomain = hostname =>
+export const getDomain = hostname =>
{
let bits = hostname.split(".");
let cutoff = bits.length - 2;
for (let i = 0; i < bits.length; i++)
{
let offset = publicSuffixes[bits.slice(i).join(".")];
« lib/.eslintrc.json ('K') | « lib/subscriptionInit.js ('k') | lib/uninstall.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld