summaryrefslogtreecommitdiff
path: root/lib/querystring.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-03-26 05:21:27 +0100
committerMichaël Zasso <targos@protonmail.com>2019-03-30 13:16:39 +0100
commitf86f5736da72ad4f3fb50692461222590e2f0258 (patch)
tree6fee263bfca24abbf76b7a3f1517b8184c29f077 /lib/querystring.js
parentf0b3855a90bc5f68fe38ea5e7c69d30ae7d81a27 (diff)
downloadandroid-node-v8-f86f5736da72ad4f3fb50692461222590e2f0258.tar.gz
android-node-v8-f86f5736da72ad4f3fb50692461222590e2f0258.tar.bz2
android-node-v8-f86f5736da72ad4f3fb50692461222590e2f0258.zip
benchmark,lib: change var to const
Refs: https://github.com/nodejs/node/pull/26679 PR-URL: https://github.com/nodejs/node/pull/26915 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'lib/querystring.js')
-rw-r--r--lib/querystring.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/querystring.js b/lib/querystring.js
index bfb6fa3332..240e2e70d6 100644
--- a/lib/querystring.js
+++ b/lib/querystring.js
@@ -64,14 +64,14 @@ const unhexTable = [
];
// A safe fast alternative to decodeURIComponent
function unescapeBuffer(s, decodeSpaces) {
- var out = Buffer.allocUnsafe(s.length);
+ const out = Buffer.allocUnsafe(s.length);
var index = 0;
var outIndex = 0;
var currentChar;
var nextChar;
var hexHigh;
var hexLow;
- var maxLength = s.length - 2;
+ const maxLength = s.length - 2;
// Flag to know if some hex chars have been decoded
var hasHex = false;
while (index < s.length) {
@@ -214,8 +214,8 @@ function parse(qs, sep, eq, options) {
return obj;
}
- var sepCodes = (!sep ? defSepCodes : charCodes(sep + ''));
- var eqCodes = (!eq ? defEqCodes : charCodes(eq + ''));
+ const sepCodes = (!sep ? defSepCodes : charCodes(sep + ''));
+ const eqCodes = (!eq ? defEqCodes : charCodes(eq + ''));
const sepLen = sepCodes.length;
const eqLen = eqCodes.length;