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

Unified Diff: lib/prefs.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/prefs.js
===================================================================
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -12,19 +12,17 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
/** @module prefs */
-"use strict";
-
-const {EventEmitter} = require("events");
+import {EventEmitter} from "events";
const keyPrefix = "pref:";
let eventEmitter = new EventEmitter();
let overrides = Object.create(null);
/** @lends module:prefs.Prefs */
let defaults = Object.create(null);
@@ -207,17 +205,17 @@
* @type {number}
*/
defaults.last_updates_page_displayed = 0;
/**
* @namespace
* @static
*/
-let Prefs = exports.Prefs = {
+export const Prefs = {
/**
* Adds a callback that is called when the
* value of a specified preference changed.
*
* @param {string} preference
* @param {function} callback
*/
on(preference, callback)
« lib/.eslintrc.json ('K') | « lib/popupBlocker.js ('k') | lib/requestBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld