output optimal representations of NaN & Infinity (#1723)

- move these optimisations out from `Compressor` to `OutputStream`
- fixes behaviour inconsistency when running uglified code from global or module levels due to redefinition
This commit is contained in:
Alex Lam S.L
2017-03-29 18:31:55 +08:00
committed by GitHub
parent fef0bf9ee0
commit 09f77c7d4d
7 changed files with 137 additions and 44 deletions

View File

@@ -77,7 +77,7 @@ sub_properties: {
a[3.14] = 3;
a.if = 4;
a["foo bar"] = 5;
a[NaN] = 6;
a[0/0] = 6;
a[null] = 7;
a[void 0] = 8;
}