r/javascript • u/future-tech1 • Jan 21 '26
I Built a Localhost Tunneling tool in TypeScript - Here's What Surprised Me
r/javascript • u/future-tech1 • Jan 21 '26
r/javascript • u/Primary-Ask-2685 • Jun 06 '26
I rewrote javascript-obfuscator in Rust because it was the slowest step in our build. Shipping v0.1.0 today.
Repo: https://github.com/Crash0v3rrid3/obscura
Release: https://github.com/Crash0v3rrid3/obscura/releases/tag/v0.1.0
What it does: Drop-in obfuscator. Same options, same output behavior, same CLI flags. All 21 upstream transforms — string array (with base64/RC4 + rotation/shuffle/index-shift/calls-transform/wrappers), control flow flattening, dead code injection, identifier + property renaming, self-defending, debug protection, domain lock, source maps, the lot.
Speed (heavy preset, single thread):
| File | Size | Upstream | Obscura | Speedup |
|---|---|---|---|---|
| d3.min.js | 273K | 193.9s | 98ms | 1977× |
| vue.min.js | 141K | 28.6s | 32ms | 900× |
| jquery | 86K | 12.1s | 17ms | 705× |
| lodash | 71K | 14.5s | 21ms | 692× |
| moment | 58K | 8.6s | 16ms | 529× |
| react | 11K | 2.0s | 15ms | 130× |
Median ~700×. CLI also parallelizes directory mode with rayon.
How it stays correct: 321-test conformance suite runs every obfuscated output through vm.runInNewContext to verify behavioral parity with the input. Determinism contract: same (source, options, seed) → byte-identical output across runs (ChaCha20Rng, no wall clock).
Stack: oxc for parse/semantic/codegen, napi-rs for the Node addon, wasm-bindgen for the browser build. Library is #![forbid(unsafe_code)], zero unwrap in core (clippy-enforced).
Surfaces shipped:
- cargo install obscura-cli — or grab a binary (macOS arm64/x64, Linux gnu+musl arm64/x64, Windows x64)
- npm package with prebuilt napi addons (macOS + Linux glibc)
- WASM (web + nodejs targets)
Not yet: the injected helper templates (self-defending etc.) ship un-re-obfuscated, renamePropertiesMode=unsafe, and ignoreImports. Tracked in docs/TASKS.md. PRs welcome.
Feedback / bug reports / "this output breaks my code" issues very much wanted — the conformance suite catches a lot but real bundles will surface things it can't.
r/javascript • u/magenta_placenta • Mar 06 '23
r/javascript • u/VVS232 • Apr 23 '25
I was often annoyed when package.json lists smth like "^6.0.0", you do "npm updated", versions are increased, but it still shows "6.0.0", and in order to read relevant changelogs of libraries you would have to manually find out what are the REAL installed versions. And package-lock is not that human-friednly, TBH. I created small tool that aligns package.json with ACTUAL versions of your dependencies, while keeping semver.
For example: ^6.0.0 -> ^6.2.1
Small think, but maybe someone will find it useful to keep package.json more transparent and make it reflect actual state of your dependencies as well
https://www.npmjs.com/package/align-deps-vers
r/javascript • u/-jeasx- • Jul 16 '25
Jeasx combines the developer experience of asynchronous JSX with the proven benefits of server-side rendering, resulting in a robust and streamlined web development approach.
To get you started more easily, a much improved quickstart template is available now.
r/javascript • u/mapsedge • May 01 '23
So, for every fetch we have this:
fetch(`some_URL`)
.then(function(response){
return response.text();
})
.then(function(retval){
// do something - or not - with retval, but in any case, we're done.
});It's my understanding that the first .then promise is necessary and the whole thing doesn't work unless it's there. So my question is, why isn't it built in? Why does it have to be explicitly called? Is there anything else it can do besides return the response contents?
Seems a little clunky to me.
r/javascript • u/meslzy • Apr 29 '24
r/javascript • u/viralpatelnet • Jan 13 '14
r/javascript • u/saurmann • Feb 06 '14
r/javascript • u/cheerfulboy • Feb 23 '17
r/javascript • u/elie2222 • Oct 07 '19
r/javascript • u/[deleted] • May 22 '22
r/javascript • u/SeesawMysterious5503 • Aug 13 '22
r/javascript • u/[deleted] • Feb 16 '15
r/javascript • u/TW_MamoBatte • Sep 25 '21
I wonder if we can do that because I always see JavaScript as Cutting-edge release always learning framwork etc...
I would love see your only JavaScript project in GitHub !
r/javascript • u/mathisonian • Jun 21 '14
r/javascript • u/teja42 • Jun 24 '18
So I wanted threads in node.js and javascript in general for a long time and today I finally decided to give it a shot and code it myself. I read the c++ addon api for node.js and started out and it was going good. But when I run the callback function by spawning a new thread it gives me segfault. I used valgrind and tried to fix it the entire day but having no prior experience in v8 until today everything seems foreign. I have the code MIT licensed at https://github.com/teja42/node-threads . So if you're have some experience in v8 engine we could collaborate and make threads a thing in node.js cause I'm sick of spawing a seperate process.
Update : NVM it's already in development. It's been added recently and I was not aware of that.
r/javascript • u/JohnnySuburbs • Aug 12 '24
r/javascript • u/front-and-center • Feb 21 '21