npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vm-obfuscator-pro

v4.3.2

Published

VM Obfuscator Pro — multi-layer VM-based JavaScript obfuscator with bytecode encryption, dynamic opcodes, per-function opcode remapping, jump-table hiding, self-modifying bytecode, multi-layer VM bootstrap, anti-debug, anti-tamper, and more. v4.0.2: named

Readme

VM Obfuscator Pro

Multi-layer VM-based JavaScript obfuscator. Compiles your JavaScript into encrypted bytecode executed by an embedded virtual machine — the original AST is destroyed, not merely renamed.

Zero dependencies. The parser is vendored; npm i vm-obfuscator-pro installs in under a second and works standalone.

Install

npm i vm-obfuscator-pro

Quick start

const VMObfuscator = require('vm-obfuscator-pro');

const ob = new VMObfuscator({ preset: 'vm' });
const result = ob.obfuscate('function greet(name) { return "Hello, " + name + "!"; } console.log(greet("World"));');
console.log(result.code);

CLI:

npx vmobf input.js -o output.js --preset vm

Correctness — verified, not claimed

Every release passes a differential test rig: 44 real-world-style programs (closures, classes with extends/super, generators, async/await, spread over Sets/Maps/generators, sparse arrays, labeled loops, tagged templates, try/catch/finally, getters/setters, …) are run plain, then obfuscated under each preset, and their stdout must match byte-for-byte. The rig also plants canary strings to catch the worst failure mode — an obfuscator that quietly ships your original source when it can't compile something.

This package never silently falls back to source. If your code uses something the compiler can't handle, obfuscate() throws with the exact construct and location. (You can opt into the old behavior with fallbackToSource: true — the output then contains plaintext code and a loud warning.)

Supported language surface

Classes (incl. extends, super(), statics, accessors), closures and upvalue capture (including per-iteration let in loops), generators, async/await, spread/rest everywhere (via the real Symbol.iterator protocol), destructuring, default parameters, labeled break/continue, tagged templates, optional chaining, ??, try/catch/finally, and more.

Not supported (fails loudly at build time): private class fields (#x), class field initializers, for await...of, BigInt literals.

Performance

  • Generated-code runtime: ~4× plain JavaScript on hot loops (preloadBytecode: true, the default, decrypts the program once at startup). Set preloadBytecode: false to keep lazy per-token decryption (anti-dump) at higher runtime cost — the max preset does this.
  • Build time: ~30 ms for typical files.
  • Output size: ~28 KB runtime overhead + encrypted bytecode.

Presets

| Preset | Description | |--------|-------------| | vm-low | Lightweight. VM + encryption, fast, small. | | vm | Balanced (recommended). All core layers, preload enabled. | | max | Everything, including lazy AES per-token decryption, anti-dump, full anti-debug suite. Slowest runtime, strongest anti-analysis. | | custom | Blank slate for individual flags. |

Layers (highlights)

  • Bytecode compilation — JS → custom 99-opcode bytecode; no function bodies or string literals survive in the output.
  • Per-build opcode shuffle + per-function second remapping + jump-table hiding + chunk permutation.
  • Encoding — XOR-block + Feistel, AES-like S-box, or real AES-128-CBC (key material scattered, wiped after expansion).
  • Self-modifying bytecode — position-dependent XOR reversed at runtime.
  • Multi-layer VM — register-based bootstrap VM (VM1) decrypts for the stack VM (VM2), with a decoy VM (VM3) behind opaque predicates.
  • Runtime hardening — early-captured globals (immune to later hooking), encrypted constant caches, optional stack encoding and 3-phase handler rotation.
  • IR layer — MBA arithmetic, IR-level control-flow flattening with 4 decode shapes + state aliases + fake states, exception-based control flow, call-graph obfuscation, value encoding.
  • Anti-debug / anti-tamper (opt-in per preset) — 7-vector DevTools detection, timing checks, integrity hashing (whitespace-immune), self-defending output, domain lock, code expiry/run locks.

Run npx vmobf --list-options for all 70+ options and --list-presets.

What this protects against

VM obfuscation raises reverse-engineering cost from minutes to days. It does not make code impossible to analyze — the decryptor ships with the program, so a determined expert with a debugger can always recover behavior. Use it to stop casual copying, tampering, and license bypass. For threats beyond that, no client-side protection (including commercial ones) is sufficient.

Testing

node test/gen-corpus.js   # regenerate the corpus
node test/run.js          # full differential matrix (must be 132/132)
node test/run.js --bench  # build + runtime timing

License

UNLICENSED — proprietary, closed-source. Distributed exclusively via npm. Vendored acorn (MIT) in vendor/ with its license.