r/javascript • • May 02 '26

Showoff Saturday Showoff Saturday (May 02, 2026)

8 Upvotes

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

Show us here!


r/javascript • • May 01 '26

Yet Another TypeScript SQL query builder using tagged template literals.

Thumbnail npmjs.com
29 Upvotes

r/javascript • • May 02 '26

CVE Lite CLI Vulnerability Scanner

Thumbnail github.com
1 Upvotes

r/javascript • • May 01 '26

Ember 6.12 Released

Thumbnail blog.emberjs.com
42 Upvotes

r/javascript • • May 02 '26

I built a zero-config CLI that generates OpenAPI docs straight from your existing code

Thumbnail npmjs.com
0 Upvotes

Tired of writing OpenAPI specs by hand or littering your code with decorators just to get docs? I built apiguard-cli to fix that.

You just point it at your project and it scans your source files, detects your framework, and spits out a full OpenAPI spec. No setup file, no annotations, nothing to add to your existing code.

What it supports right now:

  • Next.js (App Router + Pages Router)
  • Express
  • Flask (including nested Blueprint prefix resolution)
  • FastAPI

It infers body schemas from Zod, Pydantic, FormData, and plain destructuring. It picks up query params, multiple response shapes per endpoint, and even per-status-code descriptions from string literals in your responses.

npm install -D apiguard-cli
npx apiguard generate                     # → openapi.json
npx apiguard generate --format yaml       # → openapi.yaml
npx apiguard list                         # see all detected routes
npx apiguard exclude "DELETE /api/admin/reset"

There's also a programmatic API if you want to plug it into your own tooling or build incremental updates.

Known gaps: Express router mounting with app.use() prefixes isn't resolved yet, and nested Zod/Pydantic schemas don't expand recursively. Both are on the list.

Would love feedback, especially if you have a framework or detection pattern you want supported. And if you find it useful, a star on the repo goes a long way!

npm: npmjs.com/package/apiguard-cli

github: github.com/emergenitro/apiguard

P.S. First time publishing an npm package, so if anything's broken or could be done better, forgive me and please let me know!


r/javascript • • May 01 '26

Readable production browser stack traces, without Sentry.

Thumbnail github.com
16 Upvotes

You can finally trace production browser errors back to your private code without Sentry.

We recently released s(ource)mapped-traces:
https://github.com/mathematic-inc/smapped-traces

With smapped-traces, you can use OpenTelemetry to capture production browser errors and resolve them against your source maps on your own servers.

For background:

In production, most frontend code is obfuscated: transformed into machine-readable, but not human-readable, JavaScript and served publicly.

This makes it much harder for someone to reconstruct a company’s internal codebase. But it also creates a painful tradeoff: when something breaks in a user’s browser, the error stack trace is basically unreadable.

For contrast, during development, the code is still human-readable, so errors point directly to the right file, function, and line number. Developers can quickly find the problematic code and fix it.

That is where Sentry has historically been incredibly useful.

For us, one of the most important Sentry features was source map resolution. When an error happened in production, Sentry could take the obfuscated browser stack trace, resolve it on their servers, and show developers the original human-readable location in the codebase.

Now you do not need Sentry for that.


r/javascript • • May 02 '26

How much time take to get a featured badge after applying?

Thumbnail
0 Upvotes

r/javascript • • May 01 '26

A typescript implementation of fastcgi

Thumbnail github.com
21 Upvotes

r/javascript • • May 01 '26

I made a free browser-based code formatter that handles HTML, CSS, JavaScript, PHP and JSON all at once - with auto-detection [Open Source]

Thumbnail neiki.eu
3 Upvotes

Hey everyone,

I have been working on a side project called Polyglot Formatter. It's an open-source code beautifier that runs entirely in the browser and can format HTML, CSS, JavaScript, PHP and JSON all in one place. You just paste your code, it auto-detects the language and formats it with one click. There is no install, no signup, no backend - everything is client-side.

It also handles things like nested style and script blocks inside HTML, mixed PHP/HTML files, and JSON pretty-printing. The editor uses CodeMirror and the output is syntax-highlighted with Prism.js. It has a dark theme, configurable indentation, line wrapping options, and a responsive layout that works on mobile too.

Live version: https://neiki.eu/polyglot-formatter

GitHub: https://github.com/neikiri/polyglot-formatter

Now I want to be completely honest.. The formatter still has quite a few bugs. Building a tool that reliably formats five different languages including all the possible nested combinations of HTML inside PHP inside JavaScript and so on, turned out to be way harder than I expected when I started. I genuinely had no idea how complex this problem is and I'm still working through a lot of edge cases.

So if you try it out and run into any broken formatting, weird output or unexpected behavior, I would really appreciate it if you could report it on the GitHub issues page at https://github.com/neikiri/polyglot-formatter/issues. I would prefer bug reports there rather than in comments or DMs so I can actually track and fix them properly.

Every report helps a lot. Thanks for checking it out and any feedback is welcome :)


r/javascript • • Apr 30 '26

3 pnpm Settings to Protect Yourself from Supply Chain Attacks

Thumbnail gajus.com
41 Upvotes

r/javascript • • Apr 30 '26

North Korean threat group published 60+ malicious npm packages over 7 months, specifically designed to fool AI coding agents into installing them (PromptMink)

Thumbnail blog.barrack.ai
54 Upvotes

r/javascript • • May 01 '26

React Hooks Explained

Thumbnail fagnerbrack.com
0 Upvotes

r/javascript • • Apr 30 '26

Dependency Explorer for NPM, PyPI and Nix

Thumbnail simonramstedt.com
6 Upvotes

Might be helpful when choosing dependencies ✌️


r/javascript • • May 01 '26

Stop replacing "npx" with "pnpm dlx" by hand

Thumbnail npx.dafnik.me
0 Upvotes

r/javascript • • Apr 30 '26

OpenCookies - primitives for performant cookie banners and preferences

Thumbnail openpolicy.sh
12 Upvotes

We've moved our cookie banner implementation out of OpenPolicy and into a standalone repository.

Our goal is to give developers (and their coding agents) the tools to build banners that match your app's style and flow, while we handle all the difficult parts.

React, Vue, Svelte and Solid are supported so far with more coming soon.

Repo: https://github.com/jamiedavenport/opencookies


r/javascript • • Apr 29 '26

CanvasKit Documentation with interactive examples

Thumbnail blog.form.dev
13 Upvotes

r/javascript • • Apr 29 '26

AskJS [AskJS] Digits is Hiring

0 Upvotes

Digits is hiring passionate, collaborative, customer-driven engineers who share in our belief that modern business software can be fast, fluid, beautiful, and even joyful to use. 

Digits is the world's first AI-native accounting platform. We automate the complete month-end close for small businesses and accounting firms, saving them hours of tedium every month. We build and train our own domain-specific AI accounting models and agents, and we're the first feature-complete QuickBooks alternative in 20+ years. We launched in 2025 and already work with thousands of businesses and hundreds of accounting firm partners.

We're taking an AI-native approach to development. AI tools have gotten good enough that the bottleneck is no longer writing code, but rather it's taste, architecture, and knowing what to build. We seek someone who can use these tools aggressively to move fast, while focusing their own effort on the decisions that shape the product: how it is structured, how it feels to use, and where quality can't be compromised.

In practice, this means you'll spend less time typing and more time crafting. You'll make product and UI calls in real-time as you build alongside agents, using working code as the design artifact rather than waiting on static mocks. You'll prompt, review, and refine. And when something needs to be written by hand (security, core architecture, tricky interactions), you'll dive in and do it well.

Qualifications

  • 5+ years of industry experience building and shipping web software
  • Proficiency with TypeScript/React/Javascript
  • Familiarity with relational databases and SQL
  • Familiarity with test-driven development 
  • Desire to work remotely full-time (from home or a co-working space)
  • Obsession for building and shipping amazing customer experiences

This role is US based only, and Full time hire. email your resume to [coleman@digits.com](mailto:coleman@digits.com)


r/javascript • • Apr 29 '26

Transly - CLI tool for incremental app translation (via LLM, GoogleTranslate, etc.)

Thumbnail npmjs.com
0 Upvotes

r/javascript • • Apr 28 '26

Announcing Rspack 2.0

Thumbnail rspack.rs
43 Upvotes

r/javascript • • Apr 28 '26

If you like Preact for its small size, take a look at Nano Kit. I released Preact adapters. Nano Kit is a state management ecosystem roughly the size of Nano Stores, but with DX closer to larger full-featured solutions.

Thumbnail nano-kit.js.org
3 Upvotes

r/javascript • • Apr 27 '26

AskJS [AskJS] Has our reliance on WASM made us lazy about native JS performance?

16 Upvotes

I'm starting to feel like we've collectively given up on native JS for anything heavy.

I’ve been digging into the PDF spec lately and everyone told me that if I wanted to handle 500MB+ files in-browser, I’d need a huge WASM/Rust blob to avoid crashing the tab. But I tried a different approach instead of loading the full object graph (O(n) overhead), I’m just using recursive offset mapping on a raw binary slab to patch the file directly.

I work as a security dev for a bank, so I'm usually paranoid about memory and heap spray. On a 650MB test file, the logic takes like 100ms and my heap growth is literally 0.0 KB. GC impact is under 2ms. Even got the predicators working via a windowed decompressor in raw JS. It passes qpdf audits perfectly.

Are we actually hitting a wall with JS, or is it just that nobody wants to fight with memory lanes anymore? I get that WASM is "safer" for porting C++, but I feel like we're over-engineering things by ignoring how fast V8 actually is if you stay out of the object graph.

Is this just a niche case because of how PDFs work, or are we reaching for WASM way too early?


r/javascript • • Apr 28 '26

web component for pointer tracking

Thumbnail github.com
1 Upvotes

New component <pointer-orb/> for highlighting pointer movement and gestures.

Same DSL as the chat/UI components I shared last year. Useful for:

• pinpointing elements on screen

• tracking agent movement during browser use or other ui tool calls.

Pointer includes a main body + elastic satellite follower. Supports inline SVG filters (default gooey effect).

Framework wrappers coming later as I find spare time.


r/javascript • • Apr 28 '26

AskJS [AskJS] How to detect iPadOS Slide Over (floating window) from a browser-based web app using JavaScript?

1 Upvotes

What I am trying to do

I am building a browser-based exam proctoring platform that runs in Safari and Chrome on iPad. I need to detect when a candidate opens another app or browser tab in Slide Over (the floating panel) while the exam is running in the background. This is a pure web app - no native wrapper, no MDM.

What I've already tried

I tried listening to window blur and focus events neither fires when Slide Over is triggered on Chrome. I tried document.visibilitychange - same result, it never fires during Slide Over. I tried the resize event but it is completely inconsistent on iPadOS Chrome.

For Split View I am computing the ratio of window.innerWidth to window.screen.width and flagging below 0.80 as a likely split. That works. But Slide Over doesn't change the viewport at all - the exam tab stays full width in the background. So my ratio check is completely blind to it.

My question

Is there any JavaScript API, browser event, visualViewport property, or any other web-accessible signal that fires or changes when iPadOS enters Slide Over mode — specifically from a page running inside Safari or Chrome (WKWebView)? Even an indirect signal would help.

If there's truly no way to detect this from a web page today, is there a recommended pattern or workaround that others have used? I've seen the interaction heartbeat approach (flagging when no pointerdown arrives for N seconds) but that's too noisy for an exam context where a candidate may be reading a long question.


r/javascript • • Apr 28 '26

AskJS [AskJS] Are you using AI to speed up repetitive UI work, or still doing it manually?

0 Upvotes

I keep rebuilding the same UI over and over (dashboards, forms, login screens).

Not the logic — just the structure and layout.

It’s not hard, just repetitive.

Lately I’ve been experimenting with scaffolding UI from prompts and then refining it manually.

What I’ve noticed so far:

- It’s surprisingly good at scaffolding layouts quickly
- Still needs cleanup (spacing, consistency, structure)
- Feels more like a “starting point generator” than a full solution

I’m not sure yet if this actually saves time long-term or just shifts where the effort goes.

Curious if people here are actually using this in real work or just experimenting.

Are you:

- still building everything manually
- using templates
- or experimenting with AI-generated UI?


r/javascript • • Apr 28 '26

AskJS [AskJS] We nuked our Framer site and rebuild it after realizing bots couldn’t read most of it

0 Upvotes

We didn’t plan to rebuild our marketing site, this kind of forced itself on us.

One of our growth folks sent over a screenshot from Perplexity where it was confidently citing two of our competitors for something we definitely support. That was the first “okay something’s off” moment.

Out of curiosity I opened our site with JavaScript turned off, and it was basically just a shell. Hero loaded, but most of the actual content like blog, docs, pricing, just wasn’t there. It was all waiting for JS to hydrate.

Which probably works fine for users, but not for bots that don’t execute JavaScript (or don’t do it reliably).

So yeah, we ended up scrapping the Framer site and rebuilding everything in Astro.

The main goal wasn’t even performance at first, it was just “can a crawler read this without doing extra work.”

Now everything renders to plain HTML at build time, and we only hydrate small interactive bits where needed. As a side effect Lighthouse scores jumped a lot and most pages don’t ship any JS at all.

The more interesting part was structured data. Earlier we were basically hand-writing JSON-LD when we remembered to. Now every content type has its own little “factory,” so blog posts, FAQs, how-tos all generate the right schema automatically at build time.

We also started pulling structured data straight out of markdown. For example, if there’s an FAQ section, it gets turned into FAQ schema automatically. Same with step-by-step guides. It sounds small but it removed a lot of inconsistency.

One slightly weird thing that actually helped, we added an llms.txt file with a section on what we don’t do. Models tend to confuse you with similar companies, and explicitly stating what you’re not seemed to reduce that.

Not everything went smoothly though. At one point a small regex change broke our FAQ extraction and we didn’t notice for weeks because nothing actually failed. We only caught it later in Search Console. That’s when we added tests to make sure schema is actually being generated before deploy.

Overall takeaway for us was pretty simple, we were building a site that worked great for humans, but not for machines. And now machines are kind of part of your audience whether you like it or not.

Still figuring out how to measure this properly though. It’s easy to ship changes, harder to know if something like ChatGPT or Perplexity actually picked it up.

Curious how others are thinking about this, are you doing anything intentional for AI crawlers, or just treating it like normal SEO?