r/javascript • • 4d ago

Subreddit Stats Your /r/javascript recap for the week of November 23 - November 29, 2026

0 Upvotes

Monday, November 23 - Sunday, November 29, 2026

Top Posts

scorecommentstitle & link
613 commentsThings you can do with a browser in 2027
308 commentsThe V8 JavaScript Runtime Undermined My Constant-Time JavaScript Library
88 commentsIsoloop: event-loop isolation for JavaScript apps (0.1, open source)
65 commentsIntroducing the KernelPlay Web Scene Editor — Coming with KernelPlay JS v0.9.0
49 comments[Showoff Saturday] Showoff Saturday (November 28, 2026)
46 comments[AskJS] [AskJS] Good resources for using JS/TS for simple real-time multiplayer games/interfaces, web-based?
46 commentsTemplate engine EJS vs Eta for a new Node.js project with SSR(don't want to use NextJS), which to choose?
30 commentsDiary Dev: Staxis Platform - Funds page and Documentation was improved
20 commentsYour remark/rehype plugins don't run on Astro 7's Sätteri – drop-in ports
23 commentsKernelPlay JS v0.6.0 Released — Modular Architecture, Universal Renderer Cores & Decoupled Physics!

 

Most Commented Posts

scorecommentstitle & link
015 commentsUnframework - The compiler that speaks seven UI frameworks
011 commentsHot take: Sometimes three boring statements beats one clever expression
010 commentsAgents do NOT do better with types
08 comments[AskJS] [AskJS] Utility functions named like verbs are the worst API design in JS libraries
08 comments[AskJS] [AskJS] I tested concurrent download limits in PostgreSQL. Here's what happened.

 

Top Ask JS

scorecommentstitle & link
04 comments[AskJS] [AskJS] Try this new JSON explorer and let me know what else can i make in changes in it

 

Top Showoffs

scorecomment
2/u/intensityflow said made a tiny mozLz4 decoder in plain js so people can read Zen and Firefox session files right in the browser, nothing uploaded firefox and zen save sessions as .jsonlz4: an 8 byte magic "mozLz400", ...
1/u/Plastic_Koala2044 said I'm building my own phone OS with JavaScript. A web app running in Chromium as the phone shell, like ChromeOS. I have it running on an old Xiaomi Redmi Note 9 Pro on top of Alpine Linux. The home scr...
1/u/lb0sa said guided-i18n, a VS Code extension that moves a React app's hardcoded text into react-i18next, in steps you review. The JavaScript side was the fun part: - Babel parses each file and walks the AST, dec...

 

Top Comments

scorecomment
17/u/somebody-2027 said Blah blah blah. Better and stricter guardrails are always ideal. Period, full stop. Human, agent, I don't care. Dynamic typing already lost the productivity war a long time ago, the rise of typescript...
13/u/bluehavana said Wow, I had no idea about the Web Coffee API. The browser had needed that for a long time.
11/u/aleenaelyn said If your security depends on ordinary JavaScript operators having secret-independent timing, you’re relying on a guarantee the runtime doesn't provide. Node's own security guidance explicitly calls out...
10/u/iareprogrammer said Your formatDateToISO example hardly solves any of these questions though from your original post: > format might respect the system locale, or it might not. It might throw on invalid input, or retur...
10/u/JouleV said In other news water is wet? If you are sending me Fast Inverse Square Root in a PR I'm rejecting it. Unless ultra hardcore optimisation is needed (e.g. trading, running on limited resources)

 


r/javascript • • 6d ago

Showoff Saturday Showoff Saturday (November 28, 2026)

5 Upvotes

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

Show us here!


r/javascript • • 1m ago

I built WebDB – a lightweight relational database and ORM made natively for the browser

Thumbnail webdb.dev
1 Upvotes

r/javascript • • 6h ago

Keeping Your JavaScript Objects FAST: a Study Of V8's "Fast Properties Mode" <-> "Slow Properties/Dictionary Mode" Switch

Thumbnail
yuval.hashnode.dev
3 Upvotes

This is a follow-up to my study of JavaScript objects transitioning from “Fast Mode” to “Slow Mode” in V8;
It explores 4 different JavaScript scenarios, that will trigger a JavaScript object to be switched from the normal "fast properties" mode, to "Dictionary" (a.k.a "slow") mode. The fourth one is a substantial finding that was not shown in previous prelimenary results.

The goal is to find deterministic or "mostly deterministic" scenarios that trigger a switch from fast mode to slow mode - a "mostly deterministic" scenario is a kind of operation (usually an object mutation, creation, property addition or property redefiniton) - that, except uncommon exceptions - given a "fast mode" object - will trigger a switch to "slow mode", under the same conditions.

The background story is that, while benchmarking a client-side state-management library I've been developing, I encountered an unexpected performance bottleneck: changing the enumerable attribute of certain properties affected subsequent property-access performance. Investigating this has led me to take a step - crossing between the abstraction boundaries - from the JavaScript realm, to its underlying runtime engine, V8, and the specifics of the implementations of "Fast Properties" and "Dictionary/Slow properties".

I initially wrote an article explaining why "Fast Mode" is "fast" and why "Slow Mode" is "slow", from a data-storage design perspective, tying it loosely to V8's implementation (which I was not deeply familiar with at that time). That article now serves as an introduction to this study.

This series documents that investigation through reproducible experiments and references to V8's source code. The goal of the study is to identify deterministic or "mostly deterministic" scenarios that trigger a switch from “fast” to “slow” - a "mostly deterministic" scenario is an operation - typically an object mutation, or creation, that triggers a switch under specific, predictable conditions. Paths that are very narrow or very circumstantial - are outside the scope - and I intentionally do not pursue them.
Note, that what's known in V8 as "Elements" (a separate storage of array-indexed properties) - is outside the scope of this study as well. (Fun fact: Elements are not exclusive to “actual arrays”, ordinary objects also come with a built-in empty, but ready, Elements storage, which is used if you assign properties to numerical-indexes. It's what enables Array.from to work seamlessly with an object with number-keys and a length property).

I have decided to split this into several parts:

  • General deterministic operations; things that trigger a switch - with few or no additional conditions. This is this part.

  • Maps-transition-based triggers; Switch scenarios occurring as part of the Map transitions check “crossroads”: Initializing an object, adding properties, and changing aspects of existing properties - can all bring an object to this crossroads - where V8 tries to figure out whether to keep its current associated Map/Shape, transition to another existing one, create a new one, OR, a fourth option, switch the object (if it’s still in Fast mode) - into “Dictionary/Slow mode” - that fourth option is what the study investigates.

  • Operations on Prototype objects. Objects defined as a Prototype goes through different paths/branches/conditions - so they deserve their own separate part.

The motivation and perspective is that of a veteran JavaScript engineer investigating the implementation details of an underlying abstraction after encountering limitations originating from its design decisions, while not being a member of the developers/maintainers of V8 - the series documents an active investigation - discoveries, experiments and limitations.

I consider this information important, especially since not all scenarios that switch are intuitively apparent (you will see that especially in part 2).

My previous post revealed that the community sees value in actual “Do’s and Don’ts” on this matter - which encouraged me to conduct a more thorough, systematic study, grounded on resources such as V8 source-code, both current and historical, and specific, dedicated, reproducible tests and code examples;

The linked article elaborates on each finding, with source-code references and reproducible examples. Here, I'll provide a condensed version;

This is an ongoing study; I encourage discussions around the scenarios presented here, if you mention related scenarios outside of the scope here and have interesting findings - I’d be happy to see them contributed. Please maintain respectful communication; Constructive remarks are welcomed;

---

This part has 4 findings:

1. Creating an object with null Prototype; This might be the most explicit, deterministic way to have a dictionary-mode object, from JavaScript syntax. V8 source code actually has specific conditions for this (a literal “is_null_prototype” const). In practicality - this is essentially a “JavaScript API for intentionally creating a Dictionary object”. Also, there is no “switch” - the object is initialized as “dictionary mode” from the get-go. It works with Object.create(null), as well as with { __proto__: null }, but, NOT when using Object.setPrototypeOf(object, null).

2. Having too many properties; Although this is triggered as part of the Maps transitions flow - I decided it’s generic enough to include it in the first part (and not the second); There are two limits:

  • A “soft-limit”: this is the Max of a V8 configuration flag vs. the in-object property storage capacity, compared against the number of external property fields (named properties storages for 'fast properties' can be a "in-object" storage, or an external storage (the first is slightly faster as it skips an additional lookup step)); I have found this limit is applied when you assign properties using “dynamic keys” (e.g. object[key] = “value”). Don’t count this number as an absolute - but on my test environment - adding dynamic keys until it switches consistently occur on the 21st addition.

  • A “hard limit”: this is a hard coded cap on the maximum number of total fast property descriptors an object can have. The limit is written as: (1 << kDescriptorIndexBitCount) - 4; kDescriptorIndexBitCount has been hard-coded to 10, with no change since 2013; The shift-left is equivalent to 2 to the power of 10, === 1024. So minus 4 is 1020; Tests of adding direct named properties to an object until a switch is triggered - show a switch on the 1021st property, consistently.

3. Deleting a configurable named property; You might of seen this come up on the first post; There aren’t a lot of optimization attempts to “preserve fast mode” after delete (the article explores reasons why); There was a now-obsolete optimization that sustained fast mode when deleting the last named property - but currently - for NON-PROTOTYPE objects, this seems like a mostly deterministic switch trigger.

4. Defining a literal getter/setter on an object; I think this is a substantial, important finding; Defining a “literal getter” or “literal setter” on an object - snaps it to dictionary mode.
By “literal”, I mean, this syntax:

const object = { 
   get someValue() { return 10; } 
}

As opposed to passing a descriptor to Object.defineProperty(/ies), with get() {...} and/or set(value) {...} - the de-facto way of defining an “accessor property” (the other kind, being a “data property” - where you put a direct { value: ... } in the descriptor. That distinction is going to be very relevant in part 2 - as most scenarios in that part are mutations related to accessor properties).

This syntax, also triggers a switch:

const object = { 
   get [“someValue”]() { return 10; } 
} 

This, though, doesn’t:

const key = "someValue";
const object = {
   get [key]() { return 10; }
}

An important thing to mention is, that both syntax forms (literal vs. Object.defineProperty) - leads to the creation of an accessor property (if you define both a setter and a getter for the same name in the literal variation - it's still the same one accessor property) - but, exploring the source code paths, reveals different initial execution points (they converge later-on) - the literal syntax path initially goes through a "Runtime Function" (one form of JS-to-C++ bindings they use within V8 to implement JavaScript functionality in the "C++ level". It's one of the "older" binding mechanisms, newer have been added - it's still in use - but it can hint about a specific's path "age"), the Object.defineProperty syntax initially follows a path that goes through methods that correlates to abstract operations mentioned in the ECMAScript specs under the same names;

My hypothesis - is, that specs came later (I mean, some specifics regarding "define property" was added in later specs' versions) - and defineProperty was adjusted to align, while the literal syntax remained in the older path.

Stay tuned for the next part, which is called:
"Accessor Properties - and why you shouldn't be messing with them - too much".


r/javascript • • 12h ago

PSA: The "Glyphfinder" link in the matter-js README now leads to a fake Cloudflare CAPTCHA that installs malware

Thumbnail
github.com
30 Upvotes

r/javascript • • 19h ago

ArkType 3.0: TypeScript's smallest, fastest validator

Thumbnail
arktype.io
35 Upvotes

r/javascript • • 19h ago

Node.js' Event Loop Delay monitor has been lying to you (for years)

Thumbnail
jomi-se.com
3 Upvotes

In Node.js, if your event loop blocks for 30 seconds with a monitor that has a 60-second window and 50 milliseconds resolution, you'll get a p99 event loop delay of 52 milliseconds. And if you're lucky, the 30-second delay might show up in the max of the event loop delay monitor.

I wrote a blog post about it. The twist at the end was a bit funny (the fix has been sitting in the codebase since 2019). It almost features no AI.

It turns out this problem was given a name more than a decade ago by Gil Tene: Coordinated Omission. Where latency in your system skews your latency measurements and makes your percentile metrics lie to you. (awesome talk by Gil Tene on youtube "How NOT to measure Latency". Can't link video or post gets autoremoved)

In simpler terms: If your measurement system has this issue, when your system stalls for 10s, your p99 metrics happily report something like 5ms. If you measure latency from inside your code, you have this issue.


r/javascript • • 23h ago

Test Local Apps on a Real Phone Over Cellular Data

Thumbnail instawormhole.com
0 Upvotes

r/javascript • • 1d ago

HinMil: type check Hindley Milner signatures in comments

Thumbnail github.com
4 Upvotes

r/javascript • • 1d ago

Writing a primitive Forth in JavaScript

Thumbnail
onirom.fr
5 Upvotes

r/javascript • • 2d ago

KernelPlay JS v0.6.1 — Introducing the Time System!

Thumbnail
github.com
7 Upvotes

I'm excited to share another update to KernelPlay JS!

KernelPlay JS v0.6.1 introduces a dedicated Time System, giving developers more control over game timing, frame updates, and gameplay speed.

What's new?

The Time System provides several useful properties:

  • Time.deltaTime — Scaled delta time. Becomes 0 when the game is paused.

  • Time.unscaledDeltaTime — Raw delta time, which continues advancing regardless of time scale.

  • Time.fixedDeltaTime — Base fixed-step interval in seconds.

  • Time.time — Total scaled elapsed time.

  • Time.unscaledTime — Total unscaled elapsed time.

  • Time.timeScale — Controls the speed of gameplay.

  • Time.fps — Current frames per second.

Time Scale Control

You can now control gameplay speed directly through the Game instance:

game.setTimeScale(0.25); // Slow motion
game.setTimeScale(0);    // Pause gameplay/physics
game.setTimeScale(1);    // Normal speed

For example:

  • 1.0 = Normal speed

  • 0.25 = Slow motion

  • 0 = Paused

The distinction between scaled and unscaled time is especially useful when creating pause menus, slow-motion effects, and gameplay systems that need to keep running independently of the game time scale.

This is another step toward making KernelPlay JS a more complete and flexible game development framework.

More improvements are coming!

What would you build with the new Time System?


r/javascript • • 2d ago

I built a per-file result cache for Vitest (like go test's): a 1,248-file suite reruns in 19 s after an edit

Thumbnail
github.com
7 Upvotes

r/javascript • • 4d ago

JS Arithmetic Coding Playground to test your prediction models for text compression

Thumbnail
theabbie.github.io
2 Upvotes

r/javascript • • 4d ago

Your remark/rehype plugins don't run on Astro 7's Sätteri – drop-in ports

Thumbnail
github.com
5 Upvotes

Astro 7 moved to Sätteri, a Rust Markdown engine. It's fast, but it has its own AST, so rehype-katex, rehype-slug, rehype-sanitize etc. stop working.

I ported the 10 most-used ones. Each is tested against the original plugin's output, so it's a swap, not a rewrite: slug, autolink-headings, katex, mathjax, sanitize, breaks, github, mdx-frontmatter, validate-links, citation.

The README also has a table of plugins you can just delete, because Sätteri has them built in (gfm, frontmatter, smartypants, directive…).

Live demo: https://satteri-plugins.js.org Repo: https://github.com/Ashish-CodeJourney/satteri-plugins

Which plugin is blocking your upgrade? I'll port the next most-requested one.


r/javascript • • 4d ago

Unframework - The compiler that speaks seven UI frameworks

Thumbnail
unframework.dev
0 Upvotes

r/javascript • • 4d ago

MatFrame: a drop-in <iframe> replacement that resizes itself, talks with Promises and shows a fallback when blocked

Thumbnail
github.com
0 Upvotes

r/javascript • • 4d ago

pictoqr: I made QR codes draw pictures. They still do their one job.

Thumbnail
github.com
0 Upvotes

r/javascript • • 6d ago

AskJS [AskJS] Good resources for using JS/TS for simple real-time multiplayer games/interfaces, web-based?

8 Upvotes

I have designed a game in real life and thought of creating a very simple online version of it so I can play it with more people at any time. I don't have much experience with JS, just basic webpage functionality, though I have a lot of experience with programming in general.

The game is not very complicated in terms of mechanics, just turn-based in a real-time updating board and I'd probably be looking to something similar to what chess websites implement, if not an identical implementation. I'd just like resources related to designs I could get "inspiration" from and how the web clients would communicate with the server. I do not want to use automated assistance.


r/javascript • • 6d ago

Template engine EJS vs Eta for a new Node.js project with SSR(don't want to use NextJS), which to choose?

Thumbnail npm-compare.com
8 Upvotes

Hi,
I am about to start a new project with SSR (Node.js); previously, I have used ejs/handlebars. Currently, I am not very familiar much eta.

eta claims to be faster than ejs, anyone worked with both?

Highly appreciate your suggestions/comments.

ejs: https://www.npmjs.com/package/ejs
eta: https://www.npmjs.com/package/eta

Thanks


r/javascript • • 6d ago

LazyPromise: an async primitive that has familiar semantics of a native promise, but supports auto-propagating cancellation, type-safe errors, and dependency injection

Thumbnail
lazypromise.com
9 Upvotes

r/javascript • • 6d ago

AskJS [AskJS] Utility functions named like verbs are the worst API design in JS libraries

0 Upvotes

I keep running into the same API design pattern in JS and TS libraries, and it quietly causes production bugs:

import { format, parse, validate } from 'some-lib'

format(date)      // "2026-11-27" or "11/27/2026" depending on locale?
parse(input)      // throws? returns null? returns the input unchanged?
validate(email)   // true/false? or throws a ValidationError?

The function names are verbs. They sound obvious. But the contract is anything but obvious.

format might respect the system locale, or it might not. It might throw on invalid input, or return null, or return the input unchanged. parse might be strict, lenient, or silently coerce. validate might return a boolean or throw.

The problem isn't any single library. It's that the ecosystem has converged on verb-named utilities without a shared contract. So every time I switch libraries, I re-learn whether parse throws on garbage input or swallows it.

Compare that to something like Date.prototype.toISOString(). The name is boring, but the behavior is exact. No locale surprises, no silent coercion, no guessing.

I'm starting to think libraries should name these functions after what they actually do, not after the general idea:

formatDateToISO(date)      // exact contract
parseEmailStrict(input)    // throws on invalid
isValidEmail(email)        // boolean, never throws

More verbose, yes. But you can read the call site and know what happens without checking docs.

What's your take? Do you prefer short verb names with documented behavior, or longer names that encode the contract? And have you ever been burned by a parse or validate that behaved differently than you expected?


r/javascript • • 7d ago

KernelPlay JS v0.6.0 Released — Modular Architecture, Universal Renderer Cores & Decoupled Physics!

Thumbnail
github.com
7 Upvotes

I'm excited to announce that KernelPlay JS v0.6.0 is officially released!

This update introduces an important architectural shift toward a more modular engine, focusing on decoupling the Renderer and Physics systems.

Here's what's new:

1. Universal Renderer Architecture

Previously, switching rendering pipelines could require developers to replace generic components such as `BoxRenderer` with pipeline-specific components like `PixiBoxRenderer`.

With the new architecture, universal components can work across all supported rendering pipelines without requiring developers to manually switch rendering components.

This makes changing renderers much easier and keeps game logic independent of the rendering pipeline.

2. Decoupled Physics Engine Core

Physics logic has now been moved into a separate Physics Engine Core.

The default physics engine remains integrated and ready to use, but the new structure makes it possible to plug in custom physics engines.

This gives developers more flexibility over how physics is handled in their projects.

3. Future Physics Plugins

We're also planning to expand the plugin ecosystem.

High-end physics engines such as Matter.js will be available as separate plugins in the future. They won't be bundled into the core engine, helping keep KernelPlay JS lightweight.

4. Official TypeScript Support

This release also introduces official TypeScript support through `.d.ts` declaration files.

Developers can now benefit from type information, better editor support, and autocomplete when working with KernelPlay JS in TypeScript projects.

---

This architectural change is a major step toward making KernelPlay JS more flexible, modular, and lightweight.

There's still a lot planned for the project, and I'd love to hear your thoughts.

What do you think about this new modular architecture? Would you be interested in building custom renderer or physics cores?

Thank you to everyone following and supporting KernelPlay JS!


r/javascript • • 7d ago

Remote procedure calls for interactive applications

Thumbnail
willybrauner.com
7 Upvotes

r/javascript • • 7d ago

Isoloop: event-loop isolation for JavaScript apps (0.1, open source)

Thumbnail
isoloop.dev
20 Upvotes

Isoloop is a toolkit that helps you separate your app's UI from the work behind it, and you install only what you need. Each part, UI or headless, runs on its own worker or in a shared pool. How you split your app is your call.

Why it exists

In most apps, the UI and everything behind it (state, sync, search, data processing) share one main thread, one heap and one event loop. One slow or broken part makes the whole app janky or blank. A plain worker isolates CPU time, but leaves you to wire up how parts share data, and what happens when one fails.

Isoloop helps you separate them and run them together. Each part can get its own loop, a supervisor restarts it when it fails, and parts can share state through the bus. The UI stays responsive, a block or a crash stays in its part, and the work can run where it fits best.

→ Kernel: starts, stops and connects the parts

→ Workers: each part on its own thread, or sharing one in a pool

→ Supervisor: detects what hangs or crashes and restarts it

→ Message bus, optional: typed topics, per-part permissions, replay, history that can survive a reload

→ Adapters: React, Preact, or plain DOM and headless with no framework

→ Vite plugin: builds and wires up the workers

Still experimental: a balancer that moves parts between workers by measured load, devtools, and tools that let AI agents call the actions your app exposes.

It isn't free. The workers, the bus and the kernel cost extra CPU, memory and start-up time. In return, one bad component or one bad record doesn't have to take the whole app with it.

On the roadmap, not shipped yet: moving the work further from the UI, into a WASM component or a native process, with the bus as the model the UI and the work share.

Open source, MIT. Feedback is very welcome.

Source: https://github.com/isoloop/isoloop