aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-04-15 22:23:11 +0800
committerGitHub <noreply@github.com>2019-04-15 22:23:11 +0800
commit5172ba5f2ade22716e65ff2333218fc08996bfcc (patch)
treef5d5084980b543c64b7fedd1c233eb8b4414ddb2 /lib/output.js
parenta57b069409d84e3768dfd8e786532e458f68e553 (diff)
downloadtracifyjs-5172ba5f2ade22716e65ff2333218fc08996bfcc.tar.gz
tracifyjs-5172ba5f2ade22716e65ff2333218fc08996bfcc.zip
introduce `functions` (#3360)
`var f = function() {};` => `function f() {}`
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js
index 7f7e74df..4b1ae949 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -123,7 +123,7 @@ function OutputStream(options) {
});
} : function(str) {
var s = "";
- for (var i = 0, len = str.length; i < len; i++) {
+ for (var i = 0; i < str.length; i++) {
if (is_surrogate_pair_head(str[i]) && !is_surrogate_pair_tail(str[i + 1])
|| is_surrogate_pair_tail(str[i]) && !is_surrogate_pair_head(str[i - 1])) {
s += "\\u" + str.charCodeAt(i).toString(16);