r/javascript 8h ago

online boxing game using JavaScript

Thumbnail browserboxing.com
Upvotes

Notable Features
Real-time 1v1 multiplayer
Fight other players or bots
Ranked matchmaking and Top 100 leaderboard
Championship belt system
Create and customize your own boxer
Leveling, XP, stats, and career records
Jabs, crosses, hooks, uppercuts, guarding, and stamina
Knockdowns, KOs, and judge decisions
Spectate live fights and watch fight highlights
Lobby chat, profiles, and direct messages
Keyboard and mobile controls
Interactive training and tutorial
Guest play available, no account required to start
Built around quick fights, competitive rankings, and progressing your own boxer.

No fight engine used, js to canvas artwork & animations.


r/javascript 9h ago

Half Past Fetch: how the fetch promise resolves and its consequences

Thumbnail blog.gaborkoos.com
Upvotes

await fetch(url)Β settles at the headers, while the body is still arriving over an open connection. How connection reuse,Β clone(), abort and timeouts behave because of that gap. Measured in Node and Chrome.


r/javascript 23h ago

Shipping a Web Worker inside an npm package without asking users to touch their bundler config

Thumbnail kanunilabs.com
Upvotes

r/javascript 1h ago

MikroORM 7.2: row level security, to-one relations through a pivot, sql.js driver with a live docs playground, cursor pagination rework, and more

Thumbnail mikro-orm.io
Upvotes

MikroORM 7.2 is out β€” the second minor on top of v7.

New features:

  • Row level security β€” PostgreSQL policies as entity metadata, created and diffed by the schema generator, with per-request session context pushed down to the connection; an existing @Filter can compile into a policy, so one declaration enforces at both layers
  • through option for to-one relations β€” resolve a M:1 / 1:1 via a correlated subquery on a pivot entity, or pick a single row out of a to-many relation (e.g. the latest one) without loading the collection
  • sql.js driver β€” SQLite compiled to WebAssembly, in memory, in the browser, Node.js, Bun and Deno with no native bindings. It also powers the new live playground in the getting-started guide, so the code in the docs runs against a real database as you read it
  • Cursor pagination rework β€” a new optional Type.fromJSON() lets a custom type own its cursor wire format (sub-millisecond precision survives), and nullable sort keys now make the emitted order by and the keyset condition agree on where nulls sit
  • Named parameters in em.execute() β€” :name for values, :name: for identifiers, as an alternative to the positional array
  • String normalization β€” opt-in trim and casing on StringType / TextType, applied on writes and query parameters
  • getNativeClient() β€” reach the underlying client for vendor APIs the ORM doesn't wrap: pg Pool, mysql2 Pool, better-sqlite3 / libsql Database, the PGlite instance, MongoClient
  • await using support β€” the ORM instance implements Symbol.asyncDispose, so the connection closes with the enclosing scope
  • index option on M:N properties β€” index the generated pivot table's join columns, which had no override on PostgreSQL before
  • Nub TypeScript loader for the CLI, selected explicitly via tsLoader
  • em.map() can bypass the identity map β€” map raw rows to entities without touching the current context
  • Per-instance options callback for RequestContext.create() β€” different fork options per ORM instance
  • migrations.snapshotOnMigrate β€” keep the snapshot managed solely by migration:create instead of rewriting it from the database on migrate
  • CLI -q to suppress informational output, and cache:generate --combined now takes a path

Full blog post: https://mikro-orm.io/blog/mikro-orm-7-2-released
Changelog: https://github.com/mikro-orm/mikro-orm/releases/tag/v7.2.0

Happy to answer any questions!


r/javascript 20h ago

Browser-wide network chaos for every tab

Thumbnail github.com
Upvotes

A browser-side chaos-testing tool for injecting latency, failures, throttling, rate limits, and mock responses across every controlled tab without changing app fetch calls.

It uses the same middleware configuration model as chaos-fetch, so you can test real frontend behavior under degraded network conditions without rewriting your app.

GitHub:Β https://www.npmjs.com/package/@fetchkit/chaos-sw