aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-03-24 04:05:28 +0800
committerGitHub <noreply@github.com>2018-03-24 04:05:28 +0800
commitb1410be443e5ebce98a0a4438da9a8c9618e18fc (patch)
tree5ebc8f91a686dad46a8a989fbf09b6eab7dba106 /lib/output.js
parent12985d86c2a7ae66adaf4a08fe44ac3be1f6ef14 (diff)
downloadtracifyjs-b1410be443e5ebce98a0a4438da9a8c9618e18fc.tar.gz
tracifyjs-b1410be443e5ebce98a0a4438da9a8c9618e18fc.zip
speed up `has_parens()` (#3014)
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 6c1d61a3..f60b474c 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -576,7 +576,7 @@ function OutputStream(options) {
indentation : function() { return indentation },
current_width : function() { return current_col - indentation },
should_break : function() { return options.width && this.current_width() >= options.width },
- has_parens : function() { return OUTPUT.slice(-1) == "(" },
+ has_parens : function() { return OUTPUT[OUTPUT.length - 1] == "(" },
newline : newline,
print : print,
space : space,