introduce functions (#3360)

`var f = function() {};` => `function f() {}`
This commit is contained in:
Alex Lam S.L
2019-04-15 22:23:11 +08:00
committed by GitHub
parent a57b069409
commit 5172ba5f2a
7 changed files with 268 additions and 46 deletions

View File

@@ -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);