Skip to content

forkeith/maximize

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maximize - Deobfuscate and beautify JavaScript code with source maps

Maximize will deobfuscate and beautify minified code using source maps. Source maps map compiled code back to the original code, including mangled to original function and variable names. JS Beautifier is used under the hood for beautifying.

This program will fail if source maps are not provided and available. Use JS Beautifier directly for beautifying code without transforming variable and function names.

As an example, see the minified script and the generated maximized script from http://dev.fontdragr.com.

Installation

npm install -g maximize

Usage

usage: maximize.js [-h] [-b BEAUTIFY_OPTS] url

Deobfuscate and beautify JavaScript code with source maps

Positional arguments:
  url                   URL or local file path of javascript to maximize

Optional arguments:
  -h, --help            Show this help message and exit.
  -b BEAUTIFY_OPTS, --beautify-opts BEAUTIFY_OPTS
                        JS Beautifier options in JSON format

Examples

With a URL:

maximize https://example.com/minified.js

With a local file:

maximize /path/to/minified.js
# or with a relative path
maximize ./minified.js

The tool will automatically locate the source map file referenced in the JavaScript file (via sourceMappingURL comment). For local files, relative source map paths are resolved relative to the JavaScript file's directory.

About

unminimize js files using source maps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%