aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-04-03 15:15:01 +0800
committerGitHub <noreply@github.com>2018-04-03 15:15:01 +0800
commit81603ecd156f494a6b0c02655c5361152711300d (patch)
treefe288905905789ee165daee0fcdbef5f48f84cbb /lib/output.js
parente67553fa550ad355aa1946b5da5051434259a6ba (diff)
downloadtracifyjs-81603ecd156f494a6b0c02655c5361152711300d.tar.gz
tracifyjs-81603ecd156f494a6b0c02655c5361152711300d.zip
improve performance through `makePredicate()` (#3048)
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/output.js b/lib/output.js
index 7aef3b6a..cad6fd82 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -280,7 +280,7 @@ function OutputStream(options) {
might_need_semicolon = false;
if (prev == ":" && ch == "}" || (!ch || ";}".indexOf(ch) < 0) && prev != ";") {
- if (options.semicolons || requireSemicolonChars(ch)) {
+ if (options.semicolons || requireSemicolonChars[ch]) {
OUTPUT += ";";
current_col++;
current_pos++;
@@ -1244,7 +1244,7 @@ function OutputStream(options) {
var expr = self.expression;
expr.print(output);
var prop = self.property;
- if (output.option("ie8") && RESERVED_WORDS(prop)) {
+ if (output.option("ie8") && RESERVED_WORDS[prop]) {
output.print("[");
output.add_mapping(self.end);
output.print_string(prop);
@@ -1356,7 +1356,7 @@ function OutputStream(options) {
output.print_string(key);
} else if ("" + +key == key && key >= 0) {
output.print(make_num(key));
- } else if (RESERVED_WORDS(key) ? !output.option("ie8") : is_identifier_string(key)) {
+ } else if (RESERVED_WORDS[key] ? !output.option("ie8") : is_identifier_string(key)) {
if (quote && output.option("keep_quoted_props")) {
output.print_string(key, quote);
} else {