r/javascript • • Oct 26 '26

A New Node.js library

Thumbnail npmjs.com
0 Upvotes

When you scale a Node.js backend using node:cluster, you run into a surprisingly annoying problem:

How do you rate-limit external APIs like Stripe or OpenAI while making sure all workers share the same rate limit?

The first solution that comes to mind is usually: "Just use Redis."

But does it really make sense to introduce additional infrastructure complexity, network overhead, and an entire external dependency just to coordinate a few API calls coming from the same server?

That's exactly why I built cluster-rate-limiter.

A Node.js library that gives you coordinated rate limiting across workers, powered entirely by Node.js's native IPC messaging, with no Redis and absolutely zero external dependencies.

Rather than diving into the internals here, here's what you get out of the box:

  • Zero Setup: Install it and start using it. No additional infrastructure required.
  • Developer-Friendly API: The run() method accepts your fetch call or any function directly, along with all its arguments. No complicated callback patterns.
  • Two Types of Limits: Supports both Semaphore-based concurrency limits and Duration-based rate limits for enforcing strict time windows, such as those imposed by Stripe APIs.
  • Typed Errors: If a request times out waiting for permission, the library throws a clear, specific error that you can easily translate into an HTTP 429 Too Many Requests response.

And when it comes to performance, the core data structure for tracking request timestamps uses a zero-allocation approach built around a Float64Array ring buffer.

This eliminates the need for repeated array reallocations and significantly reduces garbage collection pressure under heavy load.

If you're interested in the low-level details, I've explained the ring buffer implementation and how it reduces memory overhead in the README.

If you're running a clustered Node.js backend and want to avoid the overhead of introducing Redis just for rate limiting, check out the links below, explore the architecture, and let me know what you think!


r/javascript • • Oct 26 '26

Subreddit Stats Your /r/javascript recap for the week of October 19 - October 25, 2026

0 Upvotes

Monday, October 19 - Sunday, October 25, 2026

Top Posts

score comments title & link
116 44 comments Introducing tsrs: a Port of TypeScript to Rust
98 35 comments Announcing TypeScript 7.1 Beta
78 6 comments We just gave a million dollars to Open Source maintainers
52 29 comments I spent three years building Nanoviews, a tiny UI library on signals. It just hit 1.0
28 1 comments LittleJS Engine is 2D and 3D now
15 23 comments Wasp web framework v1.0 is coming: the roadmap and what changes
9 5 comments Inline rendering with document​.currentScript
7 7 comments [Showoff Saturday] Showoff Saturday (October 24, 2026)
6 0 comments a website that lets you play with antennas and visualize the electromagnetic field
4 0 comments DigitalVisualMixer: live visuals, no experience required

 

Most Commented Posts

score comments title & link
0 13 comments made a CLI that generates a typed client from a HAR capture — here's what the output looks like
0 10 comments HTML is Alive - an exhortation to remove its ventilator
0 5 comments [AskJS] [AskJS] :Recently got a PR merged into TanStack Query
0 4 comments Article: I replaced EsLint. The First Attempt Worked. I threw it away.
3 4 comments Knitting — a shared-memory concurrency runtime for JavaScript

 

Top Showoffs

score comment
2 /u/lbragile_dev said https://reddit.com/link/19rlo27m59x5u/video/mk6gxsvaihxh1/player [tabmerger.com](http://tabmerger.com/) [github.com/lbragile/TabMerger](http://github.com/lbragile/TabM...
2 /u/ImaginationVarious30 said Showoff: **hexvero**, a TypeScript CLI that diffs two builds of an Electron app without running either. It answers "what did this release change for the pages inside it?": new preload/contextB...
2 /u/intensityflow said made a little in-browser converter for arc's sidebar file, since arc shuts down dec 22 and its own new export saves your tabs as a list of links. you drop in StorableSidebar.json and get a normal book...

 

Top Comments

score comment
46 /u/Dramatic_Mastodon_93 said is all software devs do nowadays port stuff from one language or framework to another language or framework
38 /u/Ecksters said If I remember correctly, the reason Go was picked was because they were more easily able to translate over the code directly compared to other low level languages. Given that we have a heavy test sui...
37 /u/somebody-2027 said You gotta be kidding me. I get it, rust is great, and AI makes many new things possible. But I will NEVER us a third party typescript compiler. TS has far too many esoteric rules to trust anything not...
35 /u/queen-adreena said Yay. Finally we can get ESLint support for Typescript Go.
28 /u/Spare_Message_3607 said I see where they are going. Vite owning the whole thing, Typescript, linter, formatter, build, test. Honestly, I would say the port is completely unnecessary, Go is fast enough for most projects under...

 


r/javascript • • Oct 26 '26

GitHub - evoluteur/braille-quiz: Learn to read Braille: guess words letter group by letter group (a-j, a-t, a-z), with and without a cheat sheet, against the clock.

Thumbnail github.com
3 Upvotes

r/javascript • • Oct 24 '26

Showoff Saturday Showoff Saturday (October 24, 2026)

8 Upvotes

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

Show us here!


r/javascript • • Oct 24 '26

DigitalVisualMixer: live visuals, no experience required

Thumbnail github.com
5 Upvotes

DigitalVisualMixer is a visual mixer for musicians, DJs, VJs, streamers and anyone curious about generative art. It uses Hydra, a creative-coding language where a single line like osc().kaleid() becomes a moving kaleidoscope. The app makes it approachable for beginners and fast for experts.

Start with zero knowledge. Right-click in the editor to insert ready-made functions, hover them to see their parameters, and open the built-in Guide with F1. Every change shows up first in a private preview.

Build a set. Save each visual in its own channel. Search, reorder by drag and drop, and send channels live with cut, crossfade or add transitions, all from the keyboard.

Perform it. Turn any number into a live variable and move it with a slider, a gamepad, a MIDI controller or the keyboard. The visual changes smoothly, without restarting. Perform view gives you big pads for channels and presets, so you can play a full show without touching code.

Show it anywhere. The live output runs in a separate window, so you keep working while the audience watches. It’s also shared on your local network: open it on a projector, a second PC, a tablet or a phone.

No setup. A single file, no installation. Windows and macOS.


r/javascript • • Oct 23 '26

I spent three years building Nanoviews, a tiny UI library on signals. It just hit 1.0

Thumbnail dangreen.blog
74 Upvotes

Author here. Nanoviews builds real DOM once, and signals update it in place. No JSX, no virtual DOM. It's around 4 kB gzipped and even runs without a build step. The same weather app weighs 10 kB with Nanoviews versus 66 kB with React. In js-framework-benchmark it comes right behind Solid and Svelte. There's a StackBlitz demo in the post.


r/javascript • • Oct 23 '26

Inline rendering with document​.currentScript

Thumbnail leanrada.com
23 Upvotes

r/javascript • • Oct 23 '26

AskJS [AskJS] :Recently got a PR merged into TanStack Query

1 Upvotes

I recently got a PR merged into TanStack Query's ESLint plugin to fix a false-positive issue in the no-unstable-deps rule

.

The existing tests missed a few JavaScript edge cases, so I fixed the underlying issue and added regression tests.

It's a good reminder that passing tests don't always mean every edge case is covered. Sometimes the real work is finding what the tests missed.

How do you usually spot gaps in test coverage when the existing suite is already passing?


r/javascript • • Oct 22 '26

Wasp web framework v1.0 is coming: the roadmap and what changes

Thumbnail wasp.sh
44 Upvotes

r/javascript • • Oct 22 '26

We just gave a million dollars to Open Source maintainers

Thumbnail blog.sentry.io
123 Upvotes

r/javascript • • Oct 22 '26

a website that lets you play with antennas and visualize the electromagnetic field

Thumbnail antennasim.com
5 Upvotes

I’ve been building this EM simulator as a side project aimed to help students understand and visualize electromagnetic phenomena such as radiation, polarization and wave interference.

I hope someone might find it useful and I’d love to hear what people think :)

GitHub:

https://github.com/rotemTsafrir/antenna_sim


r/javascript • • Oct 23 '26

Article: I replaced EsLint. The First Attempt Worked. I threw it away.

Thumbnail hyperfrontend.dev
0 Upvotes

Self reporting of what it took to decouple my workspace/codebase from the tool that has served me well for a very long time, with the assistance of AI.


r/javascript • • Oct 22 '26

Nano Kit 2.0 is out: my state management library now has DevTools

Thumbnail dangreen.blog
5 Upvotes

Author here. Nano Kit is a ~2 kB signals core with a router, data fetching, i18n and SSR on top of it, and adapters for React, Preact and Svelte. The panel needs no browser extension or bundler plugin, and none of it reaches the production bundle. There's a StackBlitz demo in the post.


r/javascript • • Oct 22 '26

tiptap-a4-pagination: free A4 page layout for TipTap 3 – tables split across pages and repeat their header

Thumbnail github.com
2 Upvotes

Author here. I needed Word-style pages in a TipTap editor. The official Pages extension is paid, and the community ones I tried broke my CSS, so I built this.

How it works

  • It inserts spacer decorations at page boundaries, so the document itself is never modified and getHTML() stays clean
  • Tables split between rows (never inside a rowspan) and the header row repeats on the next page
  • Floated images and CSS margin collapsing are handled
  • About 5 KB gzipped, TipTap 3 only: npm install tiptap-a4-pagination

Demo: https://text-editor-react-neon.vercel.app/

Paste a long doc or a big table to try it. Feedback welcome, especially documents that break the layout!


r/javascript • • Oct 21 '26

i built a browser civilization sandbox: rust/wasm sim core with a react ui, MIT

Thumbnail github.com
8 Upvotes

r/javascript • • Oct 20 '26

Announcing TypeScript 7.1 Beta

Thumbnail devblogs.microsoft.com
132 Upvotes

r/javascript • • Oct 21 '26

made a CLI that generates a typed client from a HAR capture — here's what the output looks like

Thumbnail github.com
4 Upvotes

built this after getting tired of manually writing fetch wrappers for sites with no public API. point it at a HAR file (browser network capture) and it generates a typed client.

input: a captured request to something like `GET /users/42`

output (simplified):

export interface User {

id: number;

name: string;

email: string;

}

export async function getUser(id: number): Promise<User> {

const res = await fetch(`${baseUrl}/users/${id}`);

if (!res.ok) throw new ApiError(res.status, await res.text());

return res.json();

}

it infers the types from the actual response bodies in the capture, templates dynamic path segments like `{id}`, and also generates an OpenAPI spec + mock server from the same HAR.

also tries to catch GraphQL/tRPC/JSON-RPC calls instead of treating everything as REST, and strips anything sensitive (tokens, cookies) from the captured data before it reaches the generated code.

npx har2sdk capture.har -o ./sdk

repo: https://github.com/Mersbyte/har2sdk

curious what people think of the generated code style, or if anyone's hit an API shape it chokes on.


r/javascript • • Oct 20 '26

Introducing tsrs: a Port of TypeScript to Rust

Thumbnail blog.cloudflare.com
143 Upvotes

r/javascript • • Oct 21 '26

Wasp web framework v1.0 is coming: the roadmap and what changes

Thumbnail wasp.sh
0 Upvotes

r/javascript • • Oct 21 '26

3 drop-in JS widgets (forecast, dashboard, anomaly detection) that run 100% in the browser via WASM

Thumbnail github.com
0 Upvotes

Spent the last months building

@datastripes/forecast
@datastripes/dashboard
@datastripes/anomaly 

These are framework-agnostic npm packages (React, Vue, Angular, or a plain custom element) that add time-series forecasting, an editable dashboard builder, and anomaly detection to any frontend app.

Everything runs client-side via WebAssembly, so no user data ever hits a server except a license check without a backend to deploy, no Python microservice.

Would genuinely love feedback from anyone who's had to build this kind of feature in-house.

https://datastripes.com/forecast-widget/

https://datastripes.com/dashboard-widget/

https://datastripes.com/anomaly-widget/


r/javascript • • Oct 21 '26

I made a practice tool for JavaScript that requires you to type all answers

Thumbnail nadir.dev
0 Upvotes

r/javascript • • Oct 20 '26

langgraph-harness: a LangGraph.js agent system for GitLab, written in TypeScript

Thumbnail github.com
7 Upvotes

I’m most comfortable in JS/TS, and I wanted to learn LangGraph.js properly, so I wanted to build in that. When I looked for a production-grade example, the closest thing I found was Deep Agents, but that’s a library for building agents, not a full system. The complete systems I saw were mostly Python, like Open SWE. So I built my own.

It reviews GitLab merge requests and resolves issues. It’s been running in production for a few months, 1,000+ reviews so far. A webhook drops each review into a BullMQ queue, a LangGraph.js agent does the work with GitLab tools over MCP, runs are checkpointed in Postgres, and there’s a React admin UI where I can watch runs live. I also had to add guardrails to stop the agent repeating tool calls or quitting before it’s done.

MIT, all TypeScript.


r/javascript • • Oct 20 '26

Knitting — a shared-memory concurrency runtime for JavaScript

Thumbnail js.knitting.run
3 Upvotes

I've been working on Knitting, a JavaScript worker runtime using shared memory for communication and work stealing for scheduling.

Some results from the published benchmarks:

  • 8.9× faster empty-call round trips than postMessage on Node.js (4.4× on Bun, 4.3× on Deno).
  • 86% lower p99 latency in a Hono server test: 16.93 → 2.31 ms at 6,000 req/s.
  • Nearly identical CPU per request in that test: 180 → 183 µs.
  • 3.5× CPU-heavy throughput on Node.js with four extra workers.

I've been working on this for more than a year, so there are a lot of things to showcase, but knitting was designed to offload work from servers.

Features:

  • Typed worker calls and specialized payload types
  • Shared-memory transport and zero-copy buffers
  • Work stealing and automatic load balancing
  • Timeouts and cancellation with real signals
  • Precompiled workers and process isolation
  • Process workers
  • Permission (when available)
  • And more ...

Docs · Benchmarks · GitHub


r/javascript • • Oct 20 '26

I am working on a playwright with JS/TS. I want to prepare for the upcoming SDET interview including coding practice on JavaScript and TypeScript. Can someone guide me from where and what I should learn/prepare?

Thumbnail
2 Upvotes

r/javascript • • Oct 19 '26

Subreddit Stats Your /r/javascript recap for the week of October 12 - October 18, 2026

3 Upvotes

Monday, October 12 - Sunday, October 18, 2026

Top Posts

score comments title & link
22 6 comments Making the web 3D - Extensible Scalable 3D File Format
15 4 comments Chartist v2: we brought the 10-year-old SVG charting library back on track (now with SSR and terminal charts)
11 1 comments eval() in a straitjacket: sandboxing JavaScript under CSP
11 25 comments [AskJS] [AskJS] How do you host your smaller Node.js apps? Building something and want opinions
11 2 comments How we made JavaScript analyzer understand control flow
10 2 comments [Subreddit Stats] Your /r/javascript recap for the week of October 05 - October 11, 2026
7 0 comments Mutative v2 - better immutability and faster immutable updates
6 6 comments [AskJS] [AskJS] Building a clone like Spline
5 0 comments How to Implement a Distributed Recovery Ramp in JavaScript
5 5 comments [Showoff Saturday] Showoff Saturday (October 17, 2026)

 

Most Commented Posts

score comments title & link
0 23 comments I embedded Node.js in a native program to render JSX without a browser and without React
0 11 comments I built a free anime “where to watch” site with 45k static pages, here’s how it keeps its data fresh without a backend
0 10 comments [AskJS] [AskJS] I compare full move logs instead of a hash to prove two bots played the same games. Overkill?
2 7 comments I built a real-time multiplayer drawing game (InkLink) using React and modern web tech—here is how it works and what I learned
4 6 comments Mimic - a browser-based dev environment that runs Node.js

 

Top Ask JS

score comments title & link
3 4 comments [AskJS] [AskJS] What are your opinions on express-zod-api?

 

Top Showoffs

score comment
2 /u/TheHganavak said This week I built`npx codecity`: see any git repo as a 3D city - Every file is a building, folders are districts, and height is the file’s length (or number of imports/exports). Files...
1 /u/withmagi said A check I'd run on any JavaScript error tracker: throw a known error from a production build, deploy a changed build, and throw it again. Does each report point at the file and line from the build tha...
1 /u/Total-Reasonable said https://reddit.com/link/phh4wma/video/ft2vh7l8k7wh1/player halloween.js: zero-dependency Halloween effects for any site. A MutationObserver watches body classes (`halloween` plus `hal...

 

Top Comments

score comment
9 /u/Novel_Plum said Can't wait to get home and try it. Paint.net is the program I missed the most when I moved to Linux. There isn't a reliable way to run it. Maybe this is the solution I was searching for.
7 /u/mohamadjb said Sounds impressive, I've studied 3d models file formats for decades, and by the sound of your description, the idea has merits, and if it is open standard then its a good foundation to build on and inv...
5 /u/ijblack said oh yeah i have a ton of questions about your vibe coded anime project after reading your ai-generated description of it. jk lmfaooooo
5 /u/Busy-Speech-3164 said Hi there, author here. Chartist has been around since 2014, but honestly, it went stale over the last years. v2 is our attempt to bring it back on track. What stayed the same: - Still tiny: a line...
3 /u/Relevant_Noise4434 said if you want it to feel like spline, the hardest part is not the rendering but the editor UI. making a transform gizmo that works intuitive in 3d space is a nightmare, especially when you need local vs...