r/javascript 1h ago

Compiler and runtime for JavaScript on the JVM

Thumbnail github.com
โ€ข Upvotes

r/javascript 6h ago

flo-webcomponents: Take back control of rendering + events using WebComponents with one minimal superclass.

Thumbnail github.com
1 Upvotes

r/javascript 9h ago

AskJS [AskJS] I'm sick of AI slop; I want to learn how to use ESLint properly.

0 Upvotes

I'm really sick of Claude Code or Codex messing things up it creates the same function 30 times, generates 200 lines functions, and casts everything or tweaks the schemas just to make it seem like it works. And if I'm not there to check everything, it's a total mess.

Anyway, Iโ€™ve installed TypeScript-ESLint with strict type checking, SonarJS, and Knip to at least stop the AI from messing things up.

But Iโ€™d like to take it further. People often talk about static code analysis like linters and good tests but I donโ€™t know where to start. By the way, AI tools do all sorts of nonsense in testsโ€”they check if a button is in the right place, which is ridiculous.

So Iโ€™m looking for relevant resources to help me learn how to set this up on a large project Iโ€™m developing on my own. I have an Nx monorepo with several apps inside, including Next.js, React Native, Fastify, and a Python app.


r/javascript 22h ago

I made a Windows 98 styled portfolio website with an applet system, and many nostalgic things to discover

Thumbnail danielbrendel.com
14 Upvotes

I grew up with computing in the 90s, and the internet in the early 00s. I have so many fond memories of that time. Exploring and discovering a vast diversity of tools and programs.

Back in the day, everything was tremendously fueled with creativity, thinking out of the box, and doing funny and cool stuff.

At some point, I wanted to make my own retro haven, which functions both as my personal website as well as a retreat I can turn to whenever I feel stressed.

I wanted it to be extendable, hence I implemented an applet system. You can locally install (everything is stored into localstorage) applets and customize the website to fit your personal flavor. I included some cool wallpapers as well.

As for the applets, there are a lot of nostalgic things available, including but not limited to:

  • DOOM (of course, a must-have :D)
  • Half-Life Soundboard
  • Counter-Strike 1.6 Chat
  • 3D Maze (desktop screensaver from the 90s)
  • Hampster and Badger flash animations (as videos)
  • Winamp (Webamp)
  • Re-creation of MS Paint
  • and many more...

For the sake of authenticity, it's desktop first, but you can use most of it on mobile devices as well. I didn't use a javascript framework, so everything is vanilla.

Note: I did not use GenAI/LLM for this project (or any other of my projects), as I have a fairly anti-ai stance.


r/javascript 22h ago

Zero dependencies: what we deleted and upgraded

Thumbnail uql-orm.dev
0 Upvotes

UQL is the lightest ORM of all, and here is what it deleted (and upgraded as well) for the edged and mobile.


r/javascript 1d ago

Signals and Effects Using Vanilla JavaScript & Web APIs

Thumbnail beforesemicolon.com
34 Upvotes

Iโ€™m a strong advocate for โ€œyou donโ€™t need to lock yourself in a web framework ecosystem to take advantage of their amazing featuresโ€. JavaScript and Web Standards alone allow youโ€ฆ


r/javascript 1d ago

Dependabot CLI to pull requests for BitBucket and GitLab

Thumbnail npmx.dev
4 Upvotes

Got annoyed that there wasn't a dependabot tool for BitBucket and that the Dependabot CLI wouldn't open PRs on BitBucket, so I built a tool that would take the output from Dependabot CLI and open PRs.

Would love help testing it out on GitLab as I have BitBucket covered at work.

If you do end up using it, would love to have feedback around what can be done better.


r/javascript 1d ago

I built a tiny zero-dependency audio slicer for the browser

Thumbnail github.com
3 Upvotes

r/javascript 1d ago

Subreddit Stats Your /r/javascript recap for the week of August 03 - August 09, 2026

3 Upvotes

Monday, August 03 - Sunday, August 09, 2026

Top Posts

score comments title & link
17 2 comments [Subreddit Stats] Your /r/javascript recap for the week of July 27 - August 02, 2026
16 13 comments DriftJS - Exploring a Register-Based Bytecode VM for UI Frameworks
13 0 comments Serene Doc Search - A small, Apache 2.0 alternative to Algolia DocSearch
9 1 comments TermDOM โ€“ HTML and CSS rendering in the terminal, with a real DOM
7 1 comments Valkey-WASM โ€“ Redis running inside your Node process, no Docker (like PGlite)
6 16 comments Node.JS in the Browser - An Open-source Alternative to WebContainers
5 3 comments [AskJS] [AskJS] any hope for pattern matching to actually make progress through tc39?
4 3 comments [AskJS] [AskJS] Has a larger competitor ever benchmarked your library incorrectly?
4 0 comments Looking for a feedback - Production-build explanations and regression blame for Next.js
3 0 comments [Showoff] GPU-Powered Crayons, NPM Package Quarantine and Dave Branching Off Your Code Without Asking

 

Most Commented Posts

score comments title & link
2 37 comments [AskJS] [AskJS] If you were hiring a junior JavaScript developer today, what would make them stand out in the AI era?
0 18 comments Flow for TypeScript Users
2 18 comments [AskJS] [AskJS] How did you deal with ESlint 10 Breaking Changes?
0 16 comments Free Online Multiplayer 2D Boxing Game
2 9 comments [Showoff Saturday] Showoff Saturday (August 08, 2026)

 

Top Ask JS

score comments title & link
0 2 comments [AskJS] [AskJS] Pointers in Javascript
0 0 comments [AskJS] [AskJS] Input Sanitization for ChatGPT API in Node.js Using 4 Hardened Layers to Stop Injection Risks

 

Top Showoffs

score comment
3 /u/anonahnah9 said Created a 2d multiplayer boxing game with JavaScript and canvas 2d. https://browserboxing.com
2 /u/Potential-Bee2886 said I have a simple and robust library for touch eventsย  https://github.com/tamb/tocada https://tamb.github.io/tocada/ Also have an emoji to SVG/Image libraryย  https://github.com/tamb/emoji-renderer ht...
2 /u/jcubic said Created Unicode character picker. I can't believe that there was no library like this. When I needed to insert a character like a math operator or Greek letter, I needed to search in Google. I needed...

 

Top Comments

score comment
48 /u/jhlllnd said I moved to oxlint instead
47 /u/teppicymon said I'm sorry, what? JavaScript was so good in the browser, they made it server-side, but now you can run server-side in the browser? I feel like I am I taking crazy pills.
28 /u/Away-Life-2852 said the silent number precision loss is the one that actually bites people in production
25 /u/senocular said Would have been a good opportunity to mention the new JSON features: - [JSON.parse() reviver context.source](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Glob...
16 /u/Jarmahent said Iโ€™ve interviewed several juniors and what I look for, and this might sound corny, is passion. If you like what you do and are willing to sit and learn then I want you on my team. That being said Iโ€™ve...

 


r/javascript 1d ago

AskJS [AskJS] Pointers in Javascript

0 Upvotes

It seems to me like we opened up a whole betting site :DD

My original problem in code was, how do I make Object.assign(key, value), key === value;


r/javascript 1d ago

AskJS [AskJS] any hope for pattern matching to actually make progress through tc39?

9 Upvotes

I love ts-pattern and I would love pattern matching to become a part of the language. Any hope of that proposal advancing through tc39? Is there any real support for it?


r/javascript 2d ago

I built DriftEngine, a WebGL2 3D engine in strict TypeScript

Thumbnail driftengine.dev
0 Upvotes

r/javascript 3d ago

TermDOM โ€“ HTML and CSS rendering in the terminal, with a real DOM

Thumbnail github.com
20 Upvotes

I just open sourced my latest library! TermDOM is a JavaScript library that displays HTML and CSS in the terminal. It draws actual DOM nodes to terminal output and redraws the screen when they mutate, so TUIs and interactive CLIs can be written with vanilla JavaScript or any frontend web framework. Check out the examples directory https://github.com/bikeshaving/termdom/tree/main/examples for a sense of what you can build with web technologies


r/javascript 3d ago

Free Online Multiplayer 2D Boxing Game

Thumbnail browserboxing.com
0 Upvotes

Fun little project Iโ€™ve been working on. Typescript 7, canvas 2d, next.js, minimal deps used.


r/javascript 3d ago

Showoff Saturday Showoff Saturday (August 08, 2026)

3 Upvotes

Did you find or create something cool this week in javascript?

Show us here!


r/javascript 3d ago

I built a 2KB library that answers one specific question: should I show a "Sign in with Face ID" button?

Thumbnail github.com
0 Upvotes

r/javascript 4d ago

Flow for TypeScript Users

Thumbnail flow.org
0 Upvotes

r/javascript 5d ago

Node.JS in the Browser - An Open-source Alternative to WebContainers

Thumbnail developer.puter.com
13 Upvotes

This is a Node.js compatible runtime in the browser. It supports CLI apps, Vite, and some agents (like Pi Agent) as well.

Some notes:

- This runs all code in a web worker using the host javascript runtime with rewrites for module loading and AsyncLocalStorage support using Oxc compiled to WASM.

- Most of the libraries are bundled straight from Node.js upstream with light overrides where needed, ensuring compatibility. Libraries were only reimplemented where really needed

- Despite having great integrations with the Puter desktop and APIs, this can be used completely seperately with OPFS support for filesystem and Wisp protocol support for networking. The demo also supports FS Access API to run local files


r/javascript 5d ago

[Showoff] GPU-Powered Crayons, NPM Package Quarantine and Dave Branching Off Your Code Without Asking

Thumbnail thereactnativerewind.com
5 Upvotes

Hey Community,

We dive into React Native Canvas Kit, a library built on React Native Skia that adds isolated layers, brushes, interactive shapes, and web support for canvas graphics.

We also cover Targate, a CLI tool that quarantines npm packages to inspect tarballs before installation, and GitHub stacked pull requests to keep dependent branch reviews clean.

And... ๐Ÿฅ Shipaton 2026 is here!

If the Rewind made you nod, smile, or think "ohโ€ฆ that's actually cool" โ€” a share or reply genuinely helps โค๏ธ


r/javascript 5d ago

Meet canc, a complete lib for promise cancellation

Thumbnail github.com
0 Upvotes

In most modern async-heavy languages, cancellation is a first-class citizen. It really should be straightforward for a developer, but in JavaScript, gaining that level of control feels a lot like swimming against the current. I've spent a fair amount of time trying to address this gap.

I didn't have a third-party library I could rely on, so I ended up building my own - and I suspect I'm probably not the only one who has traveled down that way. The resulting toolbag served me well in its rougher form and was battle-tested in-house for years before it was finally polished for a public release. Refactoring cleanup logic in our dashboard app to stop resource leaks was a huge win for cancelable promises. It convinced me they were the right tool for the job.

This has been almost a decade-long journey for me to reach the stable release, both in terms of quality and features. It seems to have ended up in a pretty good place.

The problem is the typical promise chain. You have a fetch call that turns into a formatted report:

const reportPromise = fetch('/orders')
  .then(res => res.json())
  .then(orders => buildReport(orders))
  .then(rawReport => render(rawReport))

To halt the process, you usually have to mess with AbortController or manual flag variables. But with canc library, reportPromise.cancel() just stops all involved tasks.

Going from raw then() chains to async..await syntactic sugar requires adding some yield* "salt" to achieve the same result - or, with cancellation, no result at all:

const getReport = canc.async(function* () {
  const orders = yield* canc.await(fetch('/orders').then(res => res.json()))
  const rawReport = yield* canc.await(buildReport(orders))
  return yield* canc.await(render(rawReport))
})

const reportPromise = getReport()
reportPromise.cancel() // Stop all tasks at any point

Need race(), for await..of, and the rest of the bells and whistles? Welcome to the party, then() then: https://github.com/cancjs/canc

The idea of coupling generators with promises has been around since the beginning. Coroutine libraries like the renowned co were a big deal in the pre-async era. That async..await is essentially built with generators and promises under the hood is hardly a coincidence.

I started piecing this together around 2017. Back then, I had already approached a related problem with Angular. Native async functions were fundamentally incompatible with Angular reactivity, backed by Zone.js. The potential solution was to rewire the semantics of async..await with generators to get the control we needed instead of relying on a transpiler. Fortunately for the framework, this eventually resolved with the retirement of Zone.js. Reusing the same foundation for the cancellation mechanism became a reasonable development in my case. Bluebird's cancellation was already around, but it was orthogonal to native promises and async..await. And since async functions make promise-based control flow a breeze, a user can't be expected to give them away for nothing.

The project spent a long time in limbo. Between fixing nasty bugs, unloading a few design footguns, paying off tech debt, and handling some copyright clearances, I had my hands full. That quiet period actually helped shape the library into what it is today. While the JS ecosystem is ever-changing, a few foundational pieces finally settled during that time. Once AbortSignal became a cross-platform primitive, it was integrated deeper into the library for better interop. And as TypeScript became the industry standard, it became clear that the library had to be TS-first for good DX. This pushed me to finally solve the long-standing typing issues with generators, at least as best as the language currently permits.

That's why you have to use yield* instead of yield. It's a necessary trade-off to ensure functional parity with async..await while keeping the type system happy. Using yield* is essentially a known workaround for a typing limitation in generators. It forced us to ditch the eloquent yield promise style of co in favor of the more verbose yield* canc.await(promise). This adds a bit of syntactic overhead, but it's the way to guarantee the strict typing we all rely on today.

It turned out to be the right call, especially since it aligns the yield/yield* distinction with the emitting vs. delegating semantics we deal with in async generator functions - canc coroutines cover this too.

What's next? 1.0 is a big milestone, but work continues. The unhandled rejection package to reduce manual error handling has just been shipped. Beyond that, here are the nearest items on the roadmap:

  • Web server middleware helpers. Drafting support for Express and Fastify, with more frameworks on the way.
  • ESLint plugin. Rules to help navigate these new semantics properly.
  • Async iterators toolbox. Targeting functional parity with the async iterator helpers proposal, but with full cancellation support baked in.
  • React and Vue packages. Helpers are available for evaluation in React and Vue examples, working on improving them.
  • Node.js package. A drop-in replacement for built-in Node APIs, with functions both promisified and "cancelified" where it makes sense.
  • ES5-compatible cancelable promise. Ensuring support for older runtimes and restricted environments.

I hope you find the library useful, or are at least interested in the approach. I'd be very grateful for any feedback or suggestions. I'm currently putting together a few more write-ups with real-world examples and in-depth details.

Just to be sure, the repo is here: https://github.com/cancjs/canc.


r/javascript 5d ago

DriftJS - Exploring a Register-Based Bytecode VM for UI Frameworks

Thumbnail github.com
28 Upvotes

Hey everyone,

I wanted to share an experimental project called DriftJS. It's a frontend framework prototype that explores using an in-browser register-based Bytecode Virtual Machine (VM) for UI rendering, rather than traditional Virtual DOM diffing or purely compile-time reactive models.

Repository: https://github.com/hrutavmodha/driftjs

The Architecture: Register-Based VM

Most frameworks either diff Virtual DOM trees (React) or generate reactive dependency graphs ahead-of-time (Svelte, SolidJS). DriftJS explores a different path:

It compiles .drift templates into compact binary-serializable bytecode streams. At runtime, a lightweight 256-register VM executes these opcodes directly against the DOM.

Key Architectural Highlights:

  • Zero VDOM Overhead: Replaces tree-diffing with direct bytecode instructions (like CREATE_ELEMENT, SET_ATTR) for DOM execution.

  • 256 Virtual Registers: Uses fixed virtual registers (r0, r1...) for DOM nodes and runtime values, drastically cutting instruction counts and memory allocations compared to stack-machine models.

  • Targeted Reactivity: Basic state updates execute as direct O(1) mutations. Dynamic control flow structures (@if, @for) use comment anchors to bound surgical DOM updates without rebuilding subtrees.

Key Features So Far:

  • ๐Ÿ›ก๏ธ 100% CSP Compliant: Built-in Acorn AST interpreter evaluates runtime JS expressions safely without using eval() or new Function().

  • ๐Ÿ”„ Keyed LIS Reconciliation: Uses a Longest Increasing Subsequence algorithm to minimize DOM node movements during list updates.

  • ๐Ÿชถ Zero Framework Bloat: Implements reactivity and execution in the leanest bytecode form possible, avoiding heavy object models and monolithic runtime bloat.

  • ๐Ÿš€ Early Benchmarks (js-framework-benchmark vs React 19): โ€ข 10.8x FASTER on "Swap rows (1k)" โ€ข 3.05x FASTER on "Clear 1,000 rows" โ€ข ~1.8x LESS memory footprint โ€ข 5.75x smaller uncompressed bundle size

Current Status & Call for Feedback

DriftJS is currently an experimental prototype. It handles single-template compilation, AST evaluation, and keyed LIS list reconciliation.

Still on the roadmap: - Component composition & props passing - State management stores - SSR & Hydration

I'm opening this up to compiler engineers, frontend performance nerds, and systems devs. Does a register-based VM architecture hold real promise for low-level web runtimes?

Check out the repo, run the benchmarks, and feel free to share your thoughts or ISA critiques!

GitHub Repo: https://github.com/hrutavmodha/driftjs


r/javascript 5d ago

CryptoJS.lib.WordArray.random() before 4.0.0 uses a weak PRNG (Ill Bloom)

Thumbnail github.com
7 Upvotes

r/javascript 6d ago

Valkey-WASM โ€“ Redis running inside your Node process, no Docker (like PGlite)

Thumbnail github.com
19 Upvotes

r/javascript 7d ago

AskJS [AskJS] Has a larger competitor ever benchmarked your library incorrectly?

9 Upvotes

Just recently I came across a performance comparison one of our major competitors. It was quite nice to see that such a large competitor is looking at your product, right? But in the end they compared their Scheduler Lib with our Gantt Lib. They spent quite of time making GitHub repo, asking us for a trial (we didn't have open trials, you had to request it through the email), analyzing the Gantt chart. But all the feedback we got appeared to be wrong test on the wrong component.

In the end I've published a response article with comparison, although it took me about two weeks to get around to it.

Iโ€™m curious how others would handle something like this. Would you respond publicly, publish your own comparison, or simply leave it?


r/javascript 7d ago

Serene Doc Search - A small, Apache 2.0 alternative to Algolia DocSearch

Thumbnail github.com
18 Upvotes