{
  "_args": [
    [
      {
        "raw": "uglify-js@^2.6",
        "scope": null,
        "escapedName": "uglify-js",
        "name": "uglify-js",
        "rawSpec": "^2.6",
        "spec": ">=2.6.0 <3.0.0",
        "type": "range"
      },
      "/home/travis/build/lukesargeant/ember-sparkline/node_modules/handlebars"
    ]
  ],
  "_from": "uglify-js@>=2.6.0 <3.0.0",
  "_id": "uglify-js@2.8.29",
  "_inCache": true,
  "_location": "/uglify-js",
  "_nodeVersion": "6.10.3",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/uglify-js-2.8.29.tgz_1497411792713_0.252199525013566"
  },
  "_npmUser": {
    "name": "alexlamsl",
    "email": "alexlamsl@gmail.com"
  },
  "_npmVersion": "3.10.10",
  "_phantomChildren": {},
  "_requested": {
    "raw": "uglify-js@^2.6",
    "scope": null,
    "escapedName": "uglify-js",
    "name": "uglify-js",
    "rawSpec": "^2.6",
    "spec": ">=2.6.0 <3.0.0",
    "type": "range"
  },
  "_requiredBy": [
    "/handlebars"
  ],
  "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
  "_shasum": "29c5733148057bb4e1f75df35b7a9cb72e6a59dd",
  "_shrinkwrap": null,
  "_spec": "uglify-js@^2.6",
  "_where": "/home/travis/build/lukesargeant/ember-sparkline/node_modules/handlebars",
  "author": {
    "name": "Mihai Bazon",
    "email": "mihai.bazon@gmail.com",
    "url": "http://lisperator.net/"
  },
  "bin": {
    "uglifyjs": "bin/uglifyjs"
  },
  "browserify": {
    "transform": [
      "uglify-to-browserify"
    ]
  },
  "bugs": {
    "url": "https://github.com/mishoo/UglifyJS2/issues"
  },
  "dependencies": {
    "source-map": "~0.5.1",
    "uglify-to-browserify": "~1.0.0",
    "yargs": "~3.10.0"
  },
  "description": "JavaScript parser, mangler/compressor and beautifier toolkit",
  "devDependencies": {
    "acorn": "~5.0.3",
    "mocha": "~2.3.4"
  },
  "directories": {},
  "dist": {
    "shasum": "29c5733148057bb4e1f75df35b7a9cb72e6a59dd",
    "tarball": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz"
  },
  "engines": {
    "node": ">=0.8.0"
  },
  "files": [
    "bin",
    "lib",
    "tools",
    "LICENSE"
  ],
  "gitHead": "23876a84a51835ca791afa12931e747df048178f",
  "homepage": "http://lisperator.net/uglifyjs",
  "keywords": [
    "uglify",
    "uglify-js",
    "minify",
    "minifier"
  ],
  "license": "BSD-2-Clause",
  "main": "tools/node.js",
  "maintainers": [
    {
      "name": "Mihai Bazon",
      "email": "mihai.bazon@gmail.com",
      "url": "http://lisperator.net/"
    }
  ],
  "name": "uglify-js",
  "optionalDependencies": {
    "uglify-to-browserify": "~1.0.0"
  },
  "readme": "UglifyJS 2\n==========\n[![Build Status](https://travis-ci.org/mishoo/UglifyJS2.svg)](https://travis-ci.org/mishoo/UglifyJS2)\n\nUglifyJS is a JavaScript parser, minifier, compressor or beautifier toolkit.\n\nThis page documents the command line utility.  For\n[API and internals documentation see my website](http://lisperator.net/uglifyjs/).\nThere's also an\n[in-browser online demo](http://lisperator.net/uglifyjs/#demo) (for Firefox,\nChrome and probably Safari).\n\n#### Note:\n- `uglify-js` only supports ECMAScript 5 (ES5).\n- Support for `const` is [present but incomplete](#support-for-const), and may not be\n  transformed properly.\n- Those wishing to minify ES2015+ (ES6+) should use the `npm` package [**uglify-es**](https://github.com/mishoo/UglifyJS2/tree/harmony).\n\nInstall\n-------\n\nFirst make sure you have installed the latest version of [node.js](http://nodejs.org/)\n(You may need to restart your computer after this step).\n\nFrom NPM for use as a command line app:\n\n    npm install uglify-js -g\n\nFrom NPM for programmatic use:\n\n    npm install uglify-js\n\nUsage\n-----\n\n    uglifyjs [input files] [options]\n\nUglifyJS2 can take multiple input files.  It's recommended that you pass the\ninput files first, then pass the options.  UglifyJS will parse input files\nin sequence and apply any compression options.  The files are parsed in the\nsame global scope, that is, a reference from a file to some\nvariable/function declared in another file will be matched properly.\n\nIf you want to read from STDIN instead, pass a single dash instead of input\nfiles.\n\nIf you wish to pass your options before the input files, separate the two with\na double dash to prevent input files being used as option arguments:\n\n    uglifyjs --compress --mangle -- input.js\n\nThe available options are:\n\n```\n  --source-map                  Specify an output file where to generate source\n                                map.\n  --source-map-root             The path to the original source to be included\n                                in the source map.\n  --source-map-url              The path to the source map to be added in //#\n                                sourceMappingURL.  Defaults to the value passed\n                                with --source-map.\n  --source-map-include-sources  Pass this flag if you want to include the\n                                content of source files in the source map as\n                                sourcesContent property.\n  --source-map-inline           Write base64-encoded source map to the end of js output.\n  --in-source-map               Input source map, useful if you're compressing\n                                JS that was generated from some other original\n                                code. Specify \"inline\" if the source map is included\n                                inline with the sources.\n  --screw-ie8                   Use this flag if you don't wish to support\n                                Internet Explorer 6/7/8.\n                                By default UglifyJS will not try to be IE-proof.\n  --support-ie8                 Use this flag to support Internet Explorer 6/7/8.\n                                Equivalent to setting `screw_ie8: false` in `minify()`\n                                for `compress`, `mangle` and `output` options.\n  --expr                        Parse a single expression, rather than a\n                                program (for parsing JSON)\n  -p, --prefix                  Skip prefix for original filenames that appear\n                                in source maps. For example -p 3 will drop 3\n                                directories from file names and ensure they are\n                                relative paths. You can also specify -p\n                                relative, which will make UglifyJS figure out\n                                itself the relative paths between original\n                                sources, the source map and the output file.\n  -o, --output                  Output file (default STDOUT).\n  -b, --beautify                Beautify output/specify output options.\n  -m, --mangle                  Mangle names/pass mangler options.\n  -r, --reserved                Reserved names to exclude from mangling.\n  -c, --compress                Enable compressor/pass compressor options, e.g.\n                                `-c 'if_return=false,pure_funcs=[\"Math.pow\",\"console.log\"]'`\n                                Use `-c` with no argument to enable default compression\n                                options.\n  -d, --define                  Global definitions\n  -e, --enclose                 Embed everything in a big function, with a\n                                configurable parameter/argument list.\n  --comments                    Preserve copyright comments in the output. By\n                                default this works like Google Closure, keeping\n                                JSDoc-style comments that contain \"@license\" or\n                                \"@preserve\". You can optionally pass one of the\n                                following arguments to this flag:\n                                - \"all\" to keep all comments\n                                - a valid JS RegExp like `/foo/` or `/^!/` to\n                                keep only matching comments.\n                                Note that currently not *all* comments can be\n                                kept when compression is on, because of dead\n                                code removal or cascading statements into\n                                sequences.\n  --preamble                    Preamble to prepend to the output.  You can use\n                                this to insert a comment, for example for\n                                licensing information.  This will not be\n                                parsed, but the source map will adjust for its\n                                presence.\n  --stats                       Display operations run time on STDERR.\n  --acorn                       Use Acorn for parsing.\n  --spidermonkey                Assume input files are SpiderMonkey AST format\n                                (as JSON).\n  --self                        Build itself (UglifyJS2) as a library (implies\n                                --wrap=UglifyJS --export-all)\n  --wrap                        Embed everything in a big function, making the\n                                “exports” and “global” variables available. You\n                                need to pass an argument to this option to\n                                specify the name that your module will take\n                                when included in, say, a browser.\n  --export-all                  Only used when --wrap, this tells UglifyJS to\n                                add code to automatically export all globals.\n  --lint                        Display some scope warnings\n  -v, --verbose                 Verbose\n  -V, --version                 Print version number and exit.\n  --noerr                       Don't throw an error for unknown options in -c,\n                                -b or -m.\n  --bare-returns                Allow return outside of functions.  Useful when\n                                minifying CommonJS modules and Userscripts that\n                                may be anonymous function wrapped (IIFE) by the\n                                .user.js engine `caller`.\n  --keep-fnames                 Do not mangle/drop function names.  Useful for\n                                code relying on Function.prototype.name.\n  --reserved-file               File containing reserved names\n  --reserve-domprops            Make (most?) DOM properties reserved for\n                                --mangle-props\n  --mangle-props                Mangle property names (default `0`). Set to\n                                `true` or `1` to mangle all property names. Set\n                                to `unquoted` or `2` to only mangle unquoted\n                                property names. Mode `2` also enables the\n                                `keep_quoted_props` beautifier option to\n                                preserve the quotes around property names and\n                                disables the `properties` compressor option to\n                                prevent rewriting quoted properties with dot\n                                notation. You can override these by setting\n                                them explicitly on the command line.\n  --mangle-regex                Only mangle property names matching the regex\n  --name-cache                  File to hold mangled names mappings\n  --pure-funcs                  Functions that can be safely removed if their\n                                return value is not used, e.g.\n                                `--pure-funcs Math.floor console.info`\n                                (requires `--compress`)\n```\n\nSpecify `--output` (`-o`) to declare the output file.  Otherwise the output\ngoes to STDOUT.\n\n## Source map options\n\nUglifyJS2 can generate a source map file, which is highly useful for\ndebugging your compressed JavaScript.  To get a source map, pass\n`--source-map output.js.map` (full path to the file where you want the\nsource map dumped).\n\nAdditionally you might need `--source-map-root` to pass the URL where the\noriginal files can be found.  In case you are passing full paths to input\nfiles to UglifyJS, you can use `--prefix` (`-p`) to specify the number of\ndirectories to drop from the path prefix when declaring files in the source\nmap.\n\nFor example:\n\n    uglifyjs /home/doe/work/foo/src/js/file1.js \\\n             /home/doe/work/foo/src/js/file2.js \\\n             -o foo.min.js \\\n             --source-map foo.min.js.map \\\n             --source-map-root http://foo.com/src \\\n             -p 5 -c -m\n\nThe above will compress and mangle `file1.js` and `file2.js`, will drop the\noutput in `foo.min.js` and the source map in `foo.min.js.map`.  The source\nmapping will refer to `http://foo.com/src/js/file1.js` and\n`http://foo.com/src/js/file2.js` (in fact it will list `http://foo.com/src`\nas the source map root, and the original files as `js/file1.js` and\n`js/file2.js`).\n\n### Composed source map\n\nWhen you're compressing JS code that was output by a compiler such as\nCoffeeScript, mapping to the JS code won't be too helpful.  Instead, you'd\nlike to map back to the original code (i.e. CoffeeScript).  UglifyJS has an\noption to take an input source map.  Assuming you have a mapping from\nCoffeeScript → compiled JS, UglifyJS can generate a map from CoffeeScript →\ncompressed JS by mapping every token in the compiled JS to its original\nlocation.\n\nTo use this feature you need to pass `--in-source-map\n/path/to/input/source.map` or `--in-source-map inline` if the source map is\nincluded inline with the sources. Normally the input source map should also\npoint to the file containing the generated JS, so if that's correct you can\nomit input files from the command line.\n\n## Mangler options\n\nTo enable the mangler you need to pass `--mangle` (`-m`).  The following\n(comma-separated) options are supported:\n\n- `toplevel` — mangle names declared in the toplevel scope (disabled by\n  default).\n\n- `eval` — mangle names visible in scopes where `eval` or `with` are used\n  (disabled by default).\n\nWhen mangling is enabled but you want to prevent certain names from being\nmangled, you can declare those names with `--reserved` (`-r`) — pass a\ncomma-separated list of names.  For example:\n\n    uglifyjs ... -m -r '$,require,exports'\n\nto prevent the `require`, `exports` and `$` names from being changed.\n\n### Mangling property names (`--mangle-props`)\n\n**Note:** this will probably break your code.  Mangling property names is a\nseparate step, different from variable name mangling.  Pass\n`--mangle-props`.  It will mangle all properties that are seen in some\nobject literal, or that are assigned to.  For example:\n\n```js\nvar x = {\n  foo: 1\n};\n\nx.bar = 2;\nx[\"baz\"] = 3;\nx[condition ? \"moo\" : \"boo\"] = 4;\nconsole.log(x.something());\n```\n\nIn the above code, `foo`, `bar`, `baz`, `moo` and `boo` will be replaced\nwith single characters, while `something()` will be left as is.\n\nIn order for this to be of any use, we should avoid mangling standard JS\nnames.  For instance, if your code would contain `x.length = 10`, then\n`length` becomes a candidate for mangling and it will be mangled throughout\nthe code, regardless if it's being used as part of your own objects or\naccessing an array's length.  To avoid that, you can use `--reserved-file`\nto pass a filename that should contain the names to be excluded from\nmangling.  This file can be used both for excluding variable names and\nproperty names.  It could look like this, for example:\n\n```js\n{\n  \"vars\": [ \"define\", \"require\", ... ],\n  \"props\": [ \"length\", \"prototype\", ... ]\n}\n```\n\n`--reserved-file` can be an array of file names (either a single\ncomma-separated argument, or you can pass multiple `--reserved-file`\narguments) — in this case it will exclude names from all those files.\n\nA default exclusion file is provided in `tools/domprops.json` which should\ncover most standard JS and DOM properties defined in various browsers.  Pass\n`--reserve-domprops` to read that in.\n\nYou can also use a regular expression to define which property names should be\nmangled.  For example, `--mangle-regex=\"/^_/\"` will only mangle property names\nthat start with an underscore.\n\nWhen you compress multiple files using this option, in order for them to\nwork together in the end we need to ensure somehow that one property gets\nmangled to the same name in all of them.  For this, pass `--name-cache\nfilename.json` and UglifyJS will maintain these mappings in a file which can\nthen be reused.  It should be initially empty.  Example:\n\n```\nrm -f /tmp/cache.json  # start fresh\nuglifyjs file1.js file2.js --mangle-props --name-cache /tmp/cache.json -o part1.js\nuglifyjs file3.js file4.js --mangle-props --name-cache /tmp/cache.json -o part2.js\n```\n\nNow, `part1.js` and `part2.js` will be consistent with each other in terms\nof mangled property names.\n\nUsing the name cache is not necessary if you compress all your files in a\nsingle call to UglifyJS.\n\n#### Mangling unquoted names (`--mangle-props=unquoted` or `--mangle-props=2`)\n\nUsing quoted property name (`o[\"foo\"]`) reserves the property name (`foo`)\nso that it is not mangled throughout the entire script even when used in an\nunquoted style (`o.foo`). Example:\n\n```\n$ echo 'var o={\"foo\":1, bar:3}; o.foo += o.bar; console.log(o.foo);' | uglifyjs --mangle-props=2 -mc\nvar o={\"foo\":1,a:3};o.foo+=o.a,console.log(o.foo);\n```\n\n#### Debugging property name mangling\n\nYou can also pass `--mangle-props-debug` in order to mangle property names\nwithout completely obscuring them. For example the property `o.foo`\nwould mangle to `o._$foo$_` with this option. This allows property mangling\nof a large codebase while still being able to debug the code and identify\nwhere mangling is breaking things.\n\nYou can also pass a custom suffix using `--mangle-props-debug=XYZ`. This would then\nmangle `o.foo` to `o._$foo$XYZ_`. You can change this each time you compile a\nscript to identify how a property got mangled. One technique is to pass a\nrandom number on every compile to simulate mangling changing with different\ninputs (e.g. as you update the input script with new properties), and to help\nidentify mistakes like writing mangled keys to storage.\n\n## Compressor options\n\nYou need to pass `--compress` (`-c`) to enable the compressor.  Optionally\nyou can pass a comma-separated list of options.  Options are in the form\n`foo=bar`, or just `foo` (the latter implies a boolean option that you want\nto set `true`; it's effectively a shortcut for `foo=true`).\n\n- `sequences` (default: true) -- join consecutive simple statements using the\n  comma operator.  May be set to a positive integer to specify the maximum number\n  of consecutive comma sequences that will be generated. If this option is set to\n  `true` then the default `sequences` limit is `200`. Set option to `false` or `0`\n  to disable. The smallest `sequences` length is `2`. A `sequences` value of `1`\n  is grandfathered to be equivalent to `true` and as such means `200`. On rare\n  occasions the default sequences limit leads to very slow compress times in which\n  case a value of `20` or less is recommended.\n\n- `properties` -- rewrite property access using the dot notation, for\n  example `foo[\"bar\"] → foo.bar`\n\n- `dead_code` -- remove unreachable code\n\n- `drop_debugger` -- remove `debugger;` statements\n\n- `unsafe` (default: false) -- apply \"unsafe\" transformations (discussion below)\n\n- `unsafe_comps` (default: false) -- Reverse `<` and `<=` to `>` and `>=` to\n  allow improved compression. This might be unsafe when an at least one of two\n  operands is an object with computed values due the use of methods like `get`,\n  or `valueOf`. This could cause change in execution order after operands in the\n  comparison are switching. Compression only works if both `comparisons` and\n  `unsafe_comps` are both set to true.\n\n- `unsafe_math` (default: false) -- optimize numerical expressions like\n  `2 * x * 3` into `6 * x`, which may give imprecise floating point results.\n\n- `unsafe_proto` (default: false) -- optimize expressions like\n  `Array.prototype.slice.call(a)` into `[].slice.call(a)`\n\n- `unsafe_regexp` (default: false) -- enable substitutions of variables with\n  `RegExp` values the same way as if they are constants.\n\n- `conditionals` -- apply optimizations for `if`-s and conditional\n  expressions\n\n- `comparisons` -- apply certain optimizations to binary nodes, for example:\n  `!(a <= b) → a > b` (only when `unsafe_comps`), attempts to negate binary\n  nodes, e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc.\n\n- `evaluate` -- attempt to evaluate constant expressions\n\n- `booleans` -- various optimizations for boolean context, for example `!!a\n  ? b : c → a ? b : c`\n\n- `loops` -- optimizations for `do`, `while` and `for` loops when we can\n  statically determine the condition\n\n- `unused` -- drop unreferenced functions and variables (simple direct variable\n  assignments do not count as references unless set to `\"keep_assign\"`)\n\n- `toplevel` -- drop unreferenced functions (`\"funcs\"`) and/or variables (`\"vars\"`)\n  in the toplevel scope (`false` by default, `true` to drop both unreferenced\n  functions and variables)\n\n- `top_retain` -- prevent specific toplevel functions and variables from `unused`\n  removal (can be array, comma-separated, RegExp or function. Implies `toplevel`)\n\n- `hoist_funs` -- hoist function declarations\n\n- `hoist_vars` (default: false) -- hoist `var` declarations (this is `false`\n  by default because it seems to increase the size of the output in general)\n\n- `if_return` -- optimizations for if/return and if/continue\n\n- `join_vars` -- join consecutive `var` statements\n\n- `cascade` -- small optimization for sequences, transform `x, x` into `x`\n  and `x = something(), x` into `x = something()`\n\n- `collapse_vars` -- Collapse single-use `var` and `const` definitions\n  when possible.\n\n- `reduce_vars` -- Improve optimization on variables assigned with and\n  used as constant values.\n\n- `warnings` -- display warnings when dropping unreachable code or unused\n  declarations etc.\n\n- `negate_iife` -- negate \"Immediately-Called Function Expressions\"\n  where the return value is discarded, to avoid the parens that the\n  code generator would insert.\n\n- `pure_getters` -- the default is `false`.  If you pass `true` for\n  this, UglifyJS will assume that object property access\n  (e.g. `foo.bar` or `foo[\"bar\"]`) doesn't have any side effects.\n  Specify `\"strict\"` to treat `foo.bar` as side-effect-free only when\n  `foo` is certain to not throw, i.e. not `null` or `undefined`.\n\n- `pure_funcs` -- default `null`.  You can pass an array of names and\n  UglifyJS will assume that those functions do not produce side\n  effects.  DANGER: will not check if the name is redefined in scope.\n  An example case here, for instance `var q = Math.floor(a/b)`.  If\n  variable `q` is not used elsewhere, UglifyJS will drop it, but will\n  still keep the `Math.floor(a/b)`, not knowing what it does.  You can\n  pass `pure_funcs: [ 'Math.floor' ]` to let it know that this\n  function won't produce any side effect, in which case the whole\n  statement would get discarded.  The current implementation adds some\n  overhead (compression will be slower).\n\n- `drop_console` -- default `false`.  Pass `true` to discard calls to\n  `console.*` functions. If you wish to drop a specific function call\n  such as `console.info` and/or retain side effects from function arguments\n  after dropping the function call then use `pure_funcs` instead.\n\n- `expression` -- default `false`.  Pass `true` to preserve completion values\n  from terminal statements without `return`, e.g. in bookmarklets.\n\n- `keep_fargs` -- default `true`.  Prevents the\n  compressor from discarding unused function arguments.  You need this\n  for code which relies on `Function.length`.\n\n- `keep_fnames` -- default `false`.  Pass `true` to prevent the\n  compressor from discarding function names.  Useful for code relying on\n  `Function.prototype.name`. See also: the `keep_fnames` [mangle option](#mangle).\n\n- `passes` -- default `1`. Number of times to run compress with a maximum of 3.\n  In some cases more than one pass leads to further compressed code.  Keep in\n  mind more passes will take more time.\n\n- `keep_infinity` -- default `false`. Pass `true` to prevent `Infinity` from\n  being compressed into `1/0`, which may cause performance issues on Chrome.\n\n- `side_effects` -- default `true`. Pass `false` to disable potentially dropping\n  functions marked as \"pure\".  A function call is marked as \"pure\" if a comment\n  annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For\n  example: `/*@__PURE__*/foo();`\n\n\n### The `unsafe` option\n\nIt enables some transformations that *might* break code logic in certain\ncontrived cases, but should be fine for most code.  You might want to try it\non your own code, it should reduce the minified size.  Here's what happens\nwhen this flag is on:\n\n- `new Array(1, 2, 3)` or `Array(1, 2, 3)` → `[ 1, 2, 3 ]`\n- `new Object()` → `{}`\n- `String(exp)` or `exp.toString()` → `\"\" + exp`\n- `new Object/RegExp/Function/Error/Array (...)` → we discard the `new`\n- `typeof foo == \"undefined\"` → `foo === void 0`\n- `void 0` → `undefined` (if there is a variable named \"undefined\" in\n  scope; we do it because the variable name will be mangled, typically\n  reduced to a single character)\n\n### Conditional compilation\n\nYou can use the `--define` (`-d`) switch in order to declare global\nvariables that UglifyJS will assume to be constants (unless defined in\nscope).  For example if you pass `--define DEBUG=false` then, coupled with\ndead code removal UglifyJS will discard the following from the output:\n```javascript\nif (DEBUG) {\n\tconsole.log(\"debug stuff\");\n}\n```\n\nYou can specify nested constants in the form of `--define env.DEBUG=false`.\n\nUglifyJS will warn about the condition being always false and about dropping\nunreachable code; for now there is no option to turn off only this specific\nwarning, you can pass `warnings=false` to turn off *all* warnings.\n\nAnother way of doing that is to declare your globals as constants in a\nseparate file and include it into the build.  For example you can have a\n`build/defines.js` file with the following:\n```javascript\nconst DEBUG = false;\nconst PRODUCTION = true;\n// etc.\n```\n\nand build your code like this:\n\n    uglifyjs build/defines.js js/foo.js js/bar.js... -c\n\nUglifyJS will notice the constants and, since they cannot be altered, it\nwill evaluate references to them to the value itself and drop unreachable\ncode as usual.  The build will contain the `const` declarations if you use\nthem. If you are targeting < ES6 environments which does not support `const`,\nusing `var` with `reduce_vars` (enabled by default) should suffice.\n\n<a name=\"codegen-options\"></a>\n\n#### Conditional compilation, API\nYou can also use conditional compilation via the programmatic API. With the difference that the\nproperty name is `global_defs` and is a compressor property:\n\n```js\nuglifyJS.minify([ \"input.js\"], {\n    compress: {\n        dead_code: true,\n        global_defs: {\n            DEBUG: false\n        }\n    }\n});\n```\n\n## Beautifier options\n\nThe code generator tries to output shortest code possible by default.  In\ncase you want beautified output, pass `--beautify` (`-b`).  Optionally you\ncan pass additional arguments that control the code output:\n\n- `beautify` (default `true`) -- whether to actually beautify the output.\n  Passing `-b` will set this to true, but you might need to pass `-b` even\n  when you want to generate minified code, in order to specify additional\n  arguments, so you can use `-b beautify=false` to override it.\n- `indent-level` (default 4)\n- `indent-start` (default 0) -- prefix all lines by that many spaces\n- `quote-keys` (default `false`) -- pass `true` to quote all keys in literal\n  objects\n- `space-colon` (default `true`) -- insert a space after the colon signs\n- `ascii-only` (default `false`) -- escape Unicode characters in strings and\n  regexps (affects directives with non-ascii characters becoming invalid)\n- `inline-script` (default `false`) -- escape the slash in occurrences of\n  `</script` in strings\n- `width` (default 80) -- only takes effect when beautification is on, this\n  specifies an (orientative) line width that the beautifier will try to\n  obey.  It refers to the width of the line text (excluding indentation).\n  It doesn't work very well currently, but it does make the code generated\n  by UglifyJS more readable.\n- `max-line-len` (default 32000) -- maximum line length (for uglified code)\n- `bracketize` (default `false`) -- always insert brackets in `if`, `for`,\n  `do`, `while` or `with` statements, even if their body is a single\n  statement.\n- `semicolons` (default `true`) -- separate statements with semicolons.  If\n  you pass `false` then whenever possible we will use a newline instead of a\n  semicolon, leading to more readable output of uglified code (size before\n  gzip could be smaller; size after gzip insignificantly larger).\n- `preamble` (default `null`) -- when passed it must be a string and\n  it will be prepended to the output literally.  The source map will\n  adjust for this text.  Can be used to insert a comment containing\n  licensing information, for example.\n- `quote_style` (default `0`) -- preferred quote style for strings (affects\n  quoted property names and directives as well):\n  - `0` -- prefers double quotes, switches to single quotes when there are\n    more double quotes in the string itself.\n  - `1` -- always use single quotes\n  - `2` -- always use double quotes\n  - `3` -- always use the original quotes\n- `keep_quoted_props` (default `false`) -- when turned on, prevents stripping\n  quotes from property names in object literals.\n\n### Keeping copyright notices or other comments\n\nYou can pass `--comments` to retain certain comments in the output.  By\ndefault it will keep JSDoc-style comments that contain \"@preserve\",\n\"@license\" or \"@cc_on\" (conditional compilation for IE).  You can pass\n`--comments all` to keep all the comments, or a valid JavaScript regexp to\nkeep only comments that match this regexp.  For example `--comments\n'/foo|bar/'` will keep only comments that contain \"foo\" or \"bar\".\n\nNote, however, that there might be situations where comments are lost.  For\nexample:\n```javascript\nfunction f() {\n\t/** @preserve Foo Bar */\n\tfunction g() {\n\t  // this function is never called\n\t}\n\treturn something();\n}\n```\n\nEven though it has \"@preserve\", the comment will be lost because the inner\nfunction `g` (which is the AST node to which the comment is attached to) is\ndiscarded by the compressor as not referenced.\n\nThe safest comments where to place copyright information (or other info that\nneeds to be kept in the output) are comments attached to toplevel nodes.\n\n## Support for the SpiderMonkey AST\n\nUglifyJS2 has its own abstract syntax tree format; for\n[practical reasons](http://lisperator.net/blog/uglifyjs-why-not-switching-to-spidermonkey-ast/)\nwe can't easily change to using the SpiderMonkey AST internally.  However,\nUglifyJS now has a converter which can import a SpiderMonkey AST.\n\nFor example [Acorn][acorn] is a super-fast parser that produces a\nSpiderMonkey AST.  It has a small CLI utility that parses one file and dumps\nthe AST in JSON on the standard output.  To use UglifyJS to mangle and\ncompress that:\n\n    acorn file.js | uglifyjs --spidermonkey -m -c\n\nThe `--spidermonkey` option tells UglifyJS that all input files are not\nJavaScript, but JS code described in SpiderMonkey AST in JSON.  Therefore we\ndon't use our own parser in this case, but just transform that AST into our\ninternal AST.\n\n### Use Acorn for parsing\n\nMore for fun, I added the `--acorn` option which will use Acorn to do all\nthe parsing.  If you pass this option, UglifyJS will `require(\"acorn\")`.\n\nAcorn is really fast (e.g. 250ms instead of 380ms on some 650K code), but\nconverting the SpiderMonkey tree that Acorn produces takes another 150ms so\nin total it's a bit more than just using UglifyJS's own parser.\n\n### Using UglifyJS to transform SpiderMonkey AST\n\nNow you can use UglifyJS as any other intermediate tool for transforming\nJavaScript ASTs in SpiderMonkey format.\n\nExample:\n\n```javascript\nfunction uglify(ast, options, mangle) {\n  // Conversion from SpiderMonkey AST to internal format\n  var uAST = UglifyJS.AST_Node.from_mozilla_ast(ast);\n\n  // Compression\n  uAST.figure_out_scope();\n  uAST = UglifyJS.Compressor(options).compress(uAST);\n\n  // Mangling (optional)\n  if (mangle) {\n    uAST.figure_out_scope();\n    uAST.compute_char_frequency();\n    uAST.mangle_names();\n  }\n\n  // Back-conversion to SpiderMonkey AST\n  return uAST.to_mozilla_ast();\n}\n```\n\nCheck out\n[original blog post](http://rreverser.com/using-mozilla-ast-with-uglifyjs/)\nfor details.\n\nAPI Reference\n-------------\n\nAssuming installation via NPM, you can load UglifyJS in your application\nlike this:\n```javascript\nvar UglifyJS = require(\"uglify-js\");\n```\n\nIt exports a lot of names, but I'll discuss here the basics that are needed\nfor parsing, mangling and compressing a piece of code.  The sequence is (1)\nparse, (2) compress, (3) mangle, (4) generate output code.\n\n### The simple way\n\nThere's a single toplevel function which combines all the steps.  If you\ndon't need additional customization, you might want to go with `minify`.\nExample:\n```javascript\nvar result = UglifyJS.minify(\"/path/to/file.js\");\nconsole.log(result.code); // minified output\n// if you need to pass code instead of file name\nvar result = UglifyJS.minify(\"var b = function () {};\", {fromString: true});\n```\n\nYou can also compress multiple files:\n```javascript\nvar result = UglifyJS.minify([ \"file1.js\", \"file2.js\", \"file3.js\" ]);\nconsole.log(result.code);\n```\n\nTo generate a source map:\n```javascript\nvar result = UglifyJS.minify([ \"file1.js\", \"file2.js\", \"file3.js\" ], {\n\toutSourceMap: \"out.js.map\"\n});\nconsole.log(result.code); // minified output\nconsole.log(result.map);\n```\n\nTo generate a source map with the fromString option, you can also use an object:\n```javascript\nvar result = UglifyJS.minify({\"file1.js\": \"var a = function () {};\"}, {\n  outSourceMap: \"out.js.map\",\n  outFileName: \"out.js\",\n  fromString: true\n});\n```\n\nNote that the source map is not saved in a file, it's just returned in\n`result.map`.  The value passed for `outSourceMap` is only used to set\n`//# sourceMappingURL=out.js.map` in `result.code`. The value of\n`outFileName` is only used to set `file` attribute in source map file.\n\nThe `file` attribute in the source map (see [the spec][sm-spec]) will\nuse `outFileName` firstly, if it's falsy, then will be deduced from\n`outSourceMap` (by removing `'.map'`).\n\nYou can set option `sourceMapInline` to be `true` and source map will\nbe appended to code.\n\nYou can also specify sourceRoot property to be included in source map:\n```javascript\nvar result = UglifyJS.minify([ \"file1.js\", \"file2.js\", \"file3.js\" ], {\n\toutSourceMap: \"out.js.map\",\n\tsourceRoot: \"http://example.com/src\"\n});\n```\n\nIf you're compressing compiled JavaScript and have a source map for it, you\ncan use the `inSourceMap` argument:\n```javascript\nvar result = UglifyJS.minify(\"compiled.js\", {\n\tinSourceMap: \"compiled.js.map\",\n\toutSourceMap: \"minified.js.map\"\n});\n// same as before, it returns `code` and `map`\n```\n\nIf your input source map is not in a file, you can pass it in as an object\nusing the `inSourceMap` argument:\n\n```javascript\nvar result = UglifyJS.minify(\"compiled.js\", {\n\tinSourceMap: JSON.parse(my_source_map_string),\n\toutSourceMap: \"minified.js.map\"\n});\n```\n\nThe `inSourceMap` is only used if you also request `outSourceMap` (it makes\nno sense otherwise).\n\nTo set the source map url, use the `sourceMapUrl` option.\nIf you're using the X-SourceMap header instead, you can just set the `sourceMapUrl` option to false.\nDefaults to outSourceMap:\n\n```javascript\nvar result = UglifyJS.minify([ \"file1.js\" ], {\n  outSourceMap: \"out.js.map\",\n  sourceMapUrl: \"localhost/out.js.map\"\n});\n```\n\nOther options:\n\n- `warnings` (default `false`) — pass `true` to display compressor warnings.\n\n- `fromString` (default `false`) — if you pass `true` then you can pass\n  JavaScript source code, rather than file names.\n\n- `mangle` (default `true`) — pass `false` to skip mangling names, or pass\n  an object to specify mangling options (see below).\n\n- `mangleProperties` (default `false`) — pass an object to specify custom\n  mangle property options.\n\n- `output` (default `null`) — pass an object if you wish to specify\n  additional [output options][codegen].  The defaults are optimized\n  for best compression.\n\n- `compress` (default `{}`) — pass `false` to skip compressing entirely.\n  Pass an object to specify custom [compressor options][compressor].\n\n- `parse` (default {}) — pass an object if you wish to specify some\n  additional [parser options][parser]. (not all options available... see below)\n\n##### mangle\n\n - `except` - pass an array of identifiers that should be excluded from mangling\n\n - `toplevel` — mangle names declared in the toplevel scope (disabled by\n  default).\n\n - `eval` — mangle names visible in scopes where eval or with are used\n  (disabled by default).\n\n - `keep_fnames` -- default `false`.  Pass `true` to not mangle\n  function names.  Useful for code relying on `Function.prototype.name`.\n  See also: the `keep_fnames` [compress option](#compressor-options).\n\n  Examples:\n\n  ```javascript\n  //tst.js\n  var globalVar;\n  function funcName(firstLongName, anotherLongName)\n  {\n    var myVariable = firstLongName +  anotherLongName;\n  }\n\n  UglifyJS.minify(\"tst.js\").code;\n  // 'function funcName(a,n){}var globalVar;'\n\n  UglifyJS.minify(\"tst.js\", { mangle: { except: ['firstLongName'] } }).code;\n  // 'function funcName(firstLongName,a){}var globalVar;'\n\n  UglifyJS.minify(\"tst.js\", { mangle: { toplevel: true } }).code;\n  // 'function n(n,a){}var a;'\n  ```\n\n##### mangleProperties options\n\n - `regex` — Pass a RegExp to only mangle certain names (maps to the `--mangle-regex` CLI arguments option)\n - `ignore_quoted` – Only mangle unquoted property names (maps to the `--mangle-props 2` CLI arguments option)\n - `debug` – Mangle names with the original name still present (maps to the `--mangle-props-debug` CLI arguments option). Defaults to `false`. Pass an empty string to enable, or a non-empty string to set the suffix.\n\nWe could add more options to `UglifyJS.minify` — if you need additional\nfunctionality please suggest!\n\n### The hard way\n\nFollowing there's more detailed API info, in case the `minify` function is\ntoo simple for your needs.\n\n#### The parser\n```javascript\nvar toplevel_ast = UglifyJS.parse(code, options);\n```\n\n`options` is optional and if present it must be an object.  The following\nproperties are available:\n\n- `strict` — disable automatic semicolon insertion and support for trailing\n  comma in arrays and objects\n- `bare_returns` — Allow return outside of functions. (maps to the\n  `--bare-returns` CLI arguments option and available to `minify` `parse`\n  other options object)\n- `filename` — the name of the file where this code is coming from\n- `toplevel` — a `toplevel` node (as returned by a previous invocation of\n  `parse`)\n\nThe last two options are useful when you'd like to minify multiple files and\nget a single file as the output and a proper source map.  Our CLI tool does\nsomething like this:\n```javascript\nvar toplevel = null;\nfiles.forEach(function(file){\n\tvar code = fs.readFileSync(file, \"utf8\");\n\ttoplevel = UglifyJS.parse(code, {\n\t\tfilename: file,\n\t\ttoplevel: toplevel\n\t});\n});\n```\n\nAfter this, we have in `toplevel` a big AST containing all our files, with\neach token having proper information about where it came from.\n\n#### Scope information\n\nUglifyJS contains a scope analyzer that you need to call manually before\ncompressing or mangling.  Basically it augments various nodes in the AST\nwith information about where is a name defined, how many times is a name\nreferenced, if it is a global or not, if a function is using `eval` or the\n`with` statement etc.  I will discuss this some place else, for now what's\nimportant to know is that you need to call the following before doing\nanything with the tree:\n```javascript\ntoplevel.figure_out_scope()\n```\n\n#### Compression\n\nLike this:\n```javascript\nvar compressor = UglifyJS.Compressor(options);\nvar compressed_ast = compressor.compress(toplevel);\n```\n\nThe `options` can be missing.  Available options are discussed above in\n“Compressor options”.  Defaults should lead to best compression in most\nscripts.\n\nThe compressor is destructive, so don't rely that `toplevel` remains the\noriginal tree.\n\n#### Mangling\n\nAfter compression it is a good idea to call again `figure_out_scope` (since\nthe compressor might drop unused variables / unreachable code and this might\nchange the number of identifiers or their position).  Optionally, you can\ncall a trick that helps after Gzip (counting character frequency in\nnon-mangleable words).  Example:\n```javascript\ncompressed_ast.figure_out_scope();\ncompressed_ast.compute_char_frequency();\ncompressed_ast.mangle_names();\n```\n\n#### Generating output\n\nAST nodes have a `print` method that takes an output stream.  Essentially,\nto generate code you do this:\n```javascript\nvar stream = UglifyJS.OutputStream(options);\ncompressed_ast.print(stream);\nvar code = stream.toString(); // this is your minified code\n```\n\nor, for a shortcut you can do:\n```javascript\nvar code = compressed_ast.print_to_string(options);\n```\n\nAs usual, `options` is optional.  The output stream accepts a lot of options,\nmost of them documented above in section “Beautifier options”.  The two\nwhich we care about here are `source_map` and `comments`.\n\n#### Keeping comments in the output\n\nIn order to keep certain comments in the output you need to pass the\n`comments` option.  Pass a RegExp (as string starting and closing with `/`\nor pass a RegExp object), a boolean or a function.  Stringified options\n`all` and `some` can be passed too, where `some` behaves like it's cli\nequivalent `--comments` without passing a value. If you pass a RegExp,\nonly those comments whose body matches the RegExp will be kept.  Note that body\nmeans without the initial `//` or `/*`.  If you pass a function, it will be\ncalled for every comment in the tree and will receive two arguments: the\nnode that the comment is attached to, and the comment token itself.\n\nThe comment token has these properties:\n\n- `type`: \"comment1\" for single-line comments or \"comment2\" for multi-line\n  comments\n- `value`: the comment body\n- `pos` and `endpos`: the start/end positions (zero-based indexes) in the\n  original code where this comment appears\n- `line` and `col`: the line and column where this comment appears in the\n  original code\n- `file` — the file name of the original file\n- `nlb` — true if there was a newline before this comment in the original\n  code, or if this comment contains a newline.\n\nYour function should return `true` to keep the comment, or a falsy value\notherwise.\n\n#### Generating a source mapping\n\nYou need to pass the `source_map` argument when calling `print`.  It needs\nto be a `SourceMap` object (which is a thin wrapper on top of the\n[source-map][source-map] library).\n\nExample:\n```javascript\nvar source_map = UglifyJS.SourceMap(source_map_options);\nvar stream = UglifyJS.OutputStream({\n\t...\n\tsource_map: source_map\n});\ncompressed_ast.print(stream);\n\nvar code = stream.toString();\nvar map = source_map.toString(); // json output for your source map\n```\n\nThe `source_map_options` (optional) can contain the following properties:\n\n- `file`: the name of the JavaScript output file that this mapping refers to\n- `root`: the `sourceRoot` property (see the [spec][sm-spec])\n- `orig`: the \"original source map\", handy when you compress generated JS\n  and want to map the minified output back to the original code where it\n  came from.  It can be simply a string in JSON, or a JSON object containing\n  the original source map.\n\n  [acorn]: https://github.com/ternjs/acorn\n  [source-map]: https://github.com/mozilla/source-map\n  [sm-spec]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\n  [codegen]: http://lisperator.net/uglifyjs/codegen\n  [compressor]: http://lisperator.net/uglifyjs/compress\n  [parser]: http://lisperator.net/uglifyjs/parser\n\n#### Support for `const`\n\n`const` in `uglify-js@2.x` has function scope and as such behaves much like\n`var` - unlike `const` in ES2015 (ES6) which has block scope. It is recommended\nto avoid using `const` for this reason as it will have undefined behavior when\nrun on an ES2015 compatible browser.\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/mishoo/UglifyJS2.git"
  },
  "scripts": {
    "test": "node test/run-tests.js"
  },
  "version": "2.8.29"
}
