From 0f4cd73dcc5d8a936ae3630a7992dbcb44274136 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 7 Apr 2017 13:31:58 +0800 Subject: introduce "strict" to `pure_getters` (#1795) --- README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index d57a15ce..d15f114c 100644 --- a/README.md +++ b/README.md @@ -411,6 +411,8 @@ to set `true`; it's effectively a shortcut for `foo=true`). - `pure_getters` -- the default is `false`. If you pass `true` for this, UglifyJS will assume that object property access (e.g. `foo.bar` or `foo["bar"]`) doesn't have any side effects. + Specify `"strict"` to treat `foo.bar` as side-effect-free only when + `foo` is certain to not throw, i.e. not `null` or `undefined`. - `pure_funcs` -- default `null`. You can pass an array of names and UglifyJS will assume that those functions do not produce side -- cgit v1.2.3