Home / npm packages / terser
Every file of terser@5.51.2 as published on npm: 41 files, 1.2 MB. Search them by exact text or regex, in milliseconds.
It uses: eval(), new Function(), process.env, the fs module, XMLHttpRequest.
| API | In terser | |
|---|---|---|
| eval() runs a string as JavaScript | Yes: 1 file e.g. CHANGELOG.md | See the lines |
| new Function() builds a function from a string, like eval (with or without new) | Yes: 2 files e.g. lib/compress/index.js | See the lines |
| child_process starts other programs | No | Who does |
| process.env reads environment variables | Yes: 1 file e.g. lib/minify.js | See the lines |
| the fs module reads and writes files | Yes: 1 file e.g. bin/terser | See the lines |
| http / https makes or serves HTTP requests with Node's own modules | No | Who does |
| fetch() makes HTTP requests | No | Who does |
| XMLHttpRequest makes HTTP requests the old browser way | Yes: 1 file e.g. tools/domprops.js | See the lines |
| crypto hashes, encrypts or makes random numbers | No | Who does |
| WebAssembly loads WebAssembly code | No | Who does |
| document.cookie reads or writes browser cookies | No | Who does |
| install scripts runs a script when it's installed | No | Who does |
Exact matches in the published files, so a mention in a comment counts too: open the lines to check.
| File | Size |
|---|---|
tools/domprops.js | 202 KB |
lib/compress/index.js | 153 KB |
lib/parse.js | 135 KB |
lib/ast.js | 104 KB |
lib/output.js | 87 KB |
lib/mozilla-ast.js | 68 KB |
README.md | 61 KB |
lib/compress/tighten-body.js | 61 KB |
lib/compress/inference.js | 43 KB |
lib/scope.js | 37 KB |
CHANGELOG.md | 36 KB |
lib/compress/reduce-vars.js | 25 KB |
lib/compress/inline.js | 24 KB |
lib/compress/drop-unused.js | 21 KB |
lib/unicode.js | 19 KB |
lib/cli.js | 18 KB |
lib/compress/evaluate.js | 17 KB |
lib/propmangle.js | 15 KB |
lib/compress/native-objects.js | 15 KB |
lib/minify.js | 15 KB |
lib/compress/drop-side-effect-free.js | 14 KB |
lib/compress/common.js | 12 KB |
lib/size.js | 12 KB |
lib/transform.js | 10 KB |
lib/equivalent-to.js | 9.1 KB |
lib/utils/index.js | 8.5 KB |
tools/terser.d.ts | 6.5 KB |
lib/sourcemap.js | 5.0 KB |
lib/compress/global-defs.js | 3.4 KB |
package.json | 3.3 KB |
Version 5.51.2 of terser publishes 41 files of source, 1.2 MB in all, not counting images, fonts and source maps.
Yes: terser calls eval() in 1 of its files.
No: terser doesn't use child_process anywhere in its published files.
No: terser has no preinstall, install or postinstall script in its package.json.
The same engine answers over your documents and repositories: exact text and regex, every match counted, from your code or your AI agent.