aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-12 19:48:33 +0000
committerGitHub <noreply@github.com>2021-01-13 03:48:33 +0800
commit90017051f2bb707f1062f3399c7b8d7a58e8c7ba (patch)
tree7731778d21aa4e9f52783f0c8bd5caed89abd94d /README.md
parentfc816628c12f832ec5d6c3158f1c28938077b098 (diff)
downloadtracifyjs-90017051f2bb707f1062f3399c7b8d7a58e8c7ba.tar.gz
tracifyjs-90017051f2bb707f1062f3399c7b8d7a58e8c7ba.zip
document v8 bug (#4549)
closes #4547
Diffstat (limited to 'README.md')
-rw-r--r--README.md33
1 files changed, 21 insertions, 12 deletions
diff --git a/README.md b/README.md
index 857cb4e9..9cecfcf4 100644
--- a/README.md
+++ b/README.md
@@ -879,7 +879,7 @@ can pass additional arguments that control the code output:
comments, `"some"` to preserve multi-line comments that contain `@cc_on`,
`@license`, or `@preserve` (case-insensitive), a regular expression string
(e.g. `/^!/`), or a function which returns `boolean`, e.g.
- ```js
+ ```javascript
function(node, comment) {
return comment.value.indexOf("@type " + node.TYPE) >= 0;
}
@@ -1150,7 +1150,7 @@ To enable fast minify mode from the CLI use:
uglifyjs file.js -m
```
To enable fast minify mode with the API use:
-```js
+```javascript
UglifyJS.minify(code, { compress: false, mangle: true });
```
@@ -1182,10 +1182,10 @@ To allow for better optimizations, the compiler makes various assumptions:
`Object.defineProperty()`, `Object.defineProperties()`, `Object.freeze()`,
`Object.preventExtensions()` or `Object.seal()`).
- Earlier versions of JavaScript will throw `SyntaxError` with the following:
- ```js
+ ```javascript
({
- p: 42,
- get p() {},
+ p: 42,
+ get p() {},
});
// SyntaxError: Object literal may not have data and accessor property with
// the same name
@@ -1195,7 +1195,7 @@ To allow for better optimizations, the compiler makes various assumptions:
versions of Chrome and Node.js may be altered.
- When `toplevel` is enabled, UglifyJS effectively assumes input code is wrapped
within `function(){ ... }`, thus forbids aliasing of declared global variables:
- ```js
+ ```javascript
A = "FAIL";
var B = "FAIL";
// can be `global`, `self`, `window` etc.
@@ -1215,7 +1215,7 @@ To allow for better optimizations, the compiler makes various assumptions:
suppress those errors.
- Earlier versions of Chrome and Node.js will throw `ReferenceError` with the
following:
- ```js
+ ```javascript
var a;
try {
throw 42;
@@ -1228,20 +1228,29 @@ To allow for better optimizations, the compiler makes various assumptions:
```
UglifyJS may modify the input which in turn may suppress those errors.
- Later versions of JavaScript will throw `SyntaxError` with the following:
- ```js
+ ```javascript
a => {
- let a;
+ let a;
};
// SyntaxError: Identifier 'a' has already been declared
```
UglifyJS may modify the input which in turn may suppress those errors.
- Later versions of JavaScript will throw `SyntaxError` with the following:
- ```js
+ ```javascript
try {
- // ...
+ // ...
} catch ({ message: a }) {
- var a;
+ var a;
}
// SyntaxError: Identifier 'a' has already been declared
```
UglifyJS may modify the input which in turn may suppress those errors.
+- Some versions of Chrome and Node.js will throw `ReferenceError` with the
+ following:
+ ```javascript
+ console.log(((a, b = function() {
+ return a;
+ // ReferenceError: a is not defined
+ }()) => b)());
+ ```
+ UglifyJS may modify the input which in turn may suppress those errors.