summaryrefslogtreecommitdiff
path: root/tools/doc
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2017-06-19 17:55:45 +0200
committerRefael Ackermann <refack@gmail.com>2017-07-02 19:26:57 -0400
commita7e1ceee8d58c64bfbb801b5fc6408a2dd366708 (patch)
tree6c6ed69e29c24bcda00d4786d7e02e15ca91c582 /tools/doc
parent461049f8e9acfa59d07f7ae22b4accc72bcdf51a (diff)
downloadandroid-node-v8-a7e1ceee8d58c64bfbb801b5fc6408a2dd366708.tar.gz
android-node-v8-a7e1ceee8d58c64bfbb801b5fc6408a2dd366708.tar.bz2
android-node-v8-a7e1ceee8d58c64bfbb801b5fc6408a2dd366708.zip
tools: change var to const in ./doc/preprocess
PR-URL: https://github.com/nodejs/node/pull/13732 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'tools/doc')
-rw-r--r--tools/doc/preprocess.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/doc/preprocess.js b/tools/doc/preprocess.js
index 55d90996f7..01340d4060 100644
--- a/tools/doc/preprocess.js
+++ b/tools/doc/preprocess.js
@@ -2,11 +2,11 @@
module.exports = preprocess;
-var path = require('path');
-var fs = require('fs');
+const path = require('path');
+const fs = require('fs');
-var includeExpr = /^@include\s+([A-Za-z0-9-_]+)(?:\.)?([a-zA-Z]*)$/gmi;
-var includeData = {};
+const includeExpr = /^@include\s+([A-Za-z0-9-_]+)(?:\.)?([a-zA-Z]*)$/gmi;
+const includeData = {};
function preprocess(inputFile, input, cb) {
input = stripComments(input);
@@ -22,7 +22,7 @@ function stripComments(input) {
}
function processIncludes(inputFile, input, cb) {
- var includes = input.match(includeExpr);
+ const includes = input.match(includeExpr);
if (includes === null) return cb(null, input);
var errState = null;
console.error(includes);
@@ -40,7 +40,7 @@ function processIncludes(inputFile, input, cb) {
}
}
- var fullFname = path.resolve(path.dirname(inputFile), fname);
+ const fullFname = path.resolve(path.dirname(inputFile), fname);
fs.readFile(fullFname, 'utf8', function(er, inc) {
if (errState) return;
if (er) return cb(errState = er);