From 5172ba5f2ade22716e65ff2333218fc08996bfcc Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 15 Apr 2019 22:23:11 +0800 Subject: introduce `functions` (#3360) `var f = function() {};` => `function f() {}` --- lib/output.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/output.js') 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); -- cgit v1.2.3