summaryrefslogtreecommitdiff
path: root/js/src/Ice/StringUtil.js
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-03-27 14:59:44 +0200
committerJose <jose@zeroc.com>2018-03-27 14:59:44 +0200
commit50c89b62292e9af17c0e55430805ea1dba1b2b97 (patch)
treee03433b24f57e9effca21c1bfdf0690f5cb841ae /js/src/Ice/StringUtil.js
parentJavaScript ESLINT prefer arrow callbacks (diff)
downloadice-50c89b62292e9af17c0e55430805ea1dba1b2b97.tar.bz2
ice-50c89b62292e9af17c0e55430805ea1dba1b2b97.tar.xz
ice-50c89b62292e9af17c0e55430805ea1dba1b2b97.zip
JavaScript ESLINT no var usage, prefer let and const
https://eslint.org/docs/rules/no-var
Diffstat (limited to 'js/src/Ice/StringUtil.js')
-rw-r--r--js/src/Ice/StringUtil.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/Ice/StringUtil.js b/js/src/Ice/StringUtil.js
index 2d7ae9ac64f..b9edaacd970 100644
--- a/js/src/Ice/StringUtil.js
+++ b/js/src/Ice/StringUtil.js
@@ -70,7 +70,7 @@ Ice.StringUtil = class
if(toStringMode === Ice.ToStringMode.Compat)
{
// Encode UTF-8 bytes
- var bytes = unescape(encodeURIComponent(s));
+ const bytes = unescape(encodeURIComponent(s));
for(let i = 0; i < bytes.length; ++i)
{
const c = bytes.charCodeAt(i);
@@ -340,7 +340,7 @@ function encodeChar(c, sb, special, toStringMode)
}
default:
{
- var s = String.fromCharCode(c);
+ const s = String.fromCharCode(c);
if(special !== null && special.indexOf(s) !== -1)
{