public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12985d8
)
speed up `has_parens()` (#3014)
author
Alex Lam S.L
<alexlamsl@gmail.com>
Fri, 23 Mar 2018 20:05:28 +0000
(
04:05
+0800)
committer
GitHub
<noreply@github.com>
Fri, 23 Mar 2018 20:05:28 +0000
(
04:05
+0800)
lib/output.js
patch
|
blob
|
history
diff --git
a/lib/output.js
b/lib/output.js
index
6c1d61a
..
f60b474
100644
(file)
--- 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,