[Pkg-javascript-commits] [uglifyjs] 249/491: document compress option `hoist_props` (#2399)

Jonas Smedegaard dr at jones.dk
Wed Feb 14 19:51:41 UTC 2018


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/3.3.10-1
in repository uglifyjs.

commit ae67a4985073dcdaa2788c86e576202923514e0d
Author: kzc <kzc at users.noreply.github.com>
Date:   Wed Oct 25 02:03:43 2017 -0400

    document compress option `hoist_props` (#2399)
---
 README.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/README.md b/README.md
index 1c4d611..0d1e236 100644
--- a/README.md
+++ b/README.md
@@ -632,6 +632,12 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
 
 - `hoist_funs` (default: `true`) -- hoist function declarations
 
+- `hoist_props` (default: `false`) -- hoist properties from constant object and
+  array literals into regular variables subject to a set of constraints. For example:
+  `var o={p:1, q:2}; f(o.p, o.q);` is converted to `f(1, 2);`. Note: `hoist_props`
+  works best with `mangle` enabled, the `compress` option `passes` set to `2` or higher,
+  and the `compress` option `toplevel` enabled.
+
 - `hoist_vars` (default: `false`) -- hoist `var` declarations (this is `false`
   by default because it seems to increase the size of the output in general)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list