Socket
Socket
Sign inDemoInstall

uglify-js

Package Overview
Dependencies
Maintainers
3
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uglify-js - npm Package Compare versions

Comparing version 2.2.3 to 2.2.4

test/compress/arrays.js

5

lib/ast.js

@@ -866,2 +866,7 @@ /***********************************************************************

var AST_Hole = DEFNODE("Hole", null, {
$documentation: "A hole in an array",
value: (function(){}())
}, AST_Atom);
var AST_Infinity = DEFNODE("Infinity", null, {

@@ -868,0 +873,0 @@ $documentation: "The `Infinity` value",

4

lib/output.js

@@ -987,4 +987,3 @@ /***********************************************************************

if (i) output.comma();
if (!(exp instanceof AST_Undefined))
exp.print(output);
exp.print(output);
});

@@ -1040,2 +1039,3 @@ if (len > 0) output.space();

});
DEFPRINT(AST_Hole, noop);
DEFPRINT(AST_Infinity, function(self, output){

@@ -1042,0 +1042,0 @@ output.print("1/0");

@@ -1134,3 +1134,3 @@ /***********************************************************************

if (is("punc", ",") && allow_empty) {
a.push(new AST_Undefined({ start: S.token, end: S.token }));
a.push(new AST_Hole({ start: S.token, end: S.token }));
} else {

@@ -1362,3 +1362,3 @@ a.push(expression(false));

right : maybe_assign(no_in),
end : peek()
end : prev()
});

@@ -1365,0 +1365,0 @@ }

@@ -6,3 +6,3 @@ {

"main": "tools/node.js",
"version": "2.2.3",
"version": "2.2.4",
"engines": { "node" : ">=0.4.0" },

@@ -9,0 +9,0 @@ "maintainers": [{

@@ -15,4 +15,11 @@ UglifyJS 2

From NPM:
First make sure you have installed the latest version of [node.js](http://nodejs.org/)
(You may need to restart your computer after this step).
From NPM for use as a command line app:
npm install uglify-js -g
From NPM for programmatic use:
npm install uglify-js

@@ -46,2 +53,5 @@

source map. [string]
--source-map-url The path to the source map to be added in //@
sourceMappingURL. Defaults to the value passed with
--source-map. [string]
--in-source-map Input source map, useful if you're compressing JS that was

@@ -83,4 +93,5 @@ generated from some other original code.

automatically export all globals. [boolean]
--lint Display some scope warnings [boolean]
-v, --verbose Verbose [boolean]
-V, --version Print version number and exits. [boolean]
-V, --version Print version number and exit. [boolean]

@@ -164,4 +175,4 @@ Specify `--output` (`-o`) to declare the output file. Otherwise the output

example `foo["bar"] → foo.bar`
- `dead-code` -- remove unreachable code
- `drop-debugger` -- remove `debugger;` statements
- `dead_code` -- remove unreachable code
- `drop_debugger` -- remove `debugger;` statements
- `unsafe` -- apply "unsafe" transformations (discussion below)

@@ -179,7 +190,7 @@ - `conditionals` -- apply optimizations for `if`-s and conditional

- `unused` -- drop unreferenced functions and variables
- `hoist-funs` -- hoist function declarations
- `hoist-vars` -- hoist `var` declarations (this is `false` by default
- `hoist_funs` -- hoist function declarations
- `hoist_vars` -- hoist `var` declarations (this is `false` by default
because it seems to increase the size of the output in general)
- `if-return` -- optimizations for if/return and if/continue
- `join-vars` -- join consecutive `var` statements
- `if_return` -- optimizations for if/return and if/continue
- `join_vars` -- join consecutive `var` statements
- `cascade` -- small optimization for sequences, transform `x, x` into `x`

@@ -332,5 +343,6 @@ and `x = something(), x` into `x = something()`

// see "fromString" below if you need to pass code instead of file name
var result = UglifyJS.minify("/path/to/file.js");
console.log(result.code); // minified output
// if you need to pass code instead of file name
var result = UglifyJS.minify("var b = function () {};", {fromString: true});

@@ -337,0 +349,0 @@ You can also compress multiple files:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc