uglify-js
Advanced tools
Comparing version 2.4.23 to 2.4.24
@@ -67,3 +67,4 @@ /*********************************************************************** | ||
cache : null, | ||
only_cache : false | ||
only_cache : false, | ||
regex : null | ||
}); | ||
@@ -83,2 +84,4 @@ | ||
var regex = options.regex; | ||
var names_to_mangle = []; | ||
@@ -154,2 +157,3 @@ | ||
function should_mangle(name) { | ||
if (regex && !regex.test(name)) return false; | ||
if (reserved.indexOf(name) >= 0) return false; | ||
@@ -156,0 +160,0 @@ return cache.props.has(name) |
@@ -7,3 +7,3 @@ { | ||
"license": "BSD", | ||
"version": "2.4.23", | ||
"version": "2.4.24", | ||
"engines": { | ||
@@ -10,0 +10,0 @@ "node": ">=0.4.0" |
@@ -135,2 +135,3 @@ UglifyJS 2 | ||
--mangle-props Mangle property names | ||
--mangle-regex Only mangle property names matching the regex | ||
--name-cache File to hold mangled names mappings | ||
@@ -255,2 +256,6 @@ ``` | ||
You can also use a regular expression to define which property names should be | ||
mangled. For example, `--mangle-regex="/^_/"` will only mangle property names | ||
that start with an underscore. | ||
When you compress multiple files using this option, in order for them to | ||
@@ -257,0 +262,0 @@ work together in the end we need to ensure somehow that one property gets |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
514286
13518
785