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

Unified Diff: lib/io.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
« lib/.eslintrc.json ('K') | « lib/icon.js ('k') | lib/messaging.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/io.js
===================================================================
--- a/lib/io.js
+++ b/lib/io.js
@@ -10,18 +10,16 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* 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/>.
*/
-"use strict";
-
const keyPrefix = "file:";
function fileToKey(fileName)
{
return keyPrefix + fileName;
}
function loadFile(fileName)
@@ -66,18 +64,17 @@
if (browser.runtime.lastError)
reject(browser.runtime.lastError.message);
else
resolve();
});
});
}
-exports.IO =
-{
+export const IO = {
/**
* Reads text lines from a file.
* @param {string} fileName
* Name of the file to be read
* @param {TextSink} listener
* Function that will be called for each line in the file
* @return {Promise}
* Promise to be resolved or rejected once the operation is completed
« lib/.eslintrc.json ('K') | « lib/icon.js ('k') | lib/messaging.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld