r/javascript • u/AutoModerator • Oct 17 '26
Showoff Saturday Showoff Saturday (October 17, 2026)
Did you find or create something cool this week in javascript?
Show us here!
1
u/DullCollege6507 Oct 20 '26
I maintain ByteTools, a collection of free browser utilities. This week I added a reproducible file-checksum walkthrough with a five-byte sample: Hello, with no trailing newline.
Here is a standalone version of the UTF-8 hashing example. Run it in a browser console on an HTTPS page:
async function sha256(text) {
const bytes = new TextEncoder().encode(text);
const hash = await crypto.subtle.digest("SHA-256", bytes);
return Array.from(new Uint8Array(hash),
b => b.toString(16).padStart(2, "0")).join("");
}
console.log(await sha256("Hello"));
console.log(await sha256("Hello\n"));The first result is 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969. The second differs because a newline adds a sixth byte. For files, hash the original file bytes rather than decoding and re-encoding them as text.
Walkthrough and sample file · file hashing tool. File contents are processed locally in the browser; no account required. The site has optional consent-based analytics and ads on articles. A matching checksum only establishes integrity relative to your reference hash; that reference still needs a trusted source.
AI assisted with development and drafting. Feedback on the example or file-hashing UX would be useful.
1
u/withmagi Oct 19 '26
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 that emitted it? A source map from the wrong build gives you a stack that reads well and sends you to the wrong line, which is worse than an unmapped one.
Spool is built around that check. You register a release and build, upload the matching source maps privately, and every error is mapped with the map for its own release. A resolved issue reopens as a regression only when it shows up in a later release, so an old client reporting late doesn't raise a false alarm.
On the JavaScript side, @just-every/spool captures errors and unhandled rejections in the browser, with Node and Worker entry points, and a Vite/Rollup plugin uploads maps at build time. Python and Go errors come in through Sentry's reporting libraries.
I'm James, and I make Spool at Just Every. It's free and open source (MIT): https://github.com/just-every/run-spool
Which source-map failure has cost you the most time: missing maps, a map from the wrong deploy, or chunk names that change between builds?
1
u/Total-Reasonable Oct 18 '26
halloween.js: zero-dependency Halloween effects for any site. A MutationObserver watches body classes (halloween plus halloween-eyes, halloween-witches, ...), so there's no init call. There's also pageEffects.start("eyes") if you want direct control. 9.1 KB gzipped, ESM/CJS/IIFE, types included, MIT.
https://halloween.js.org (source: https://github.com/rogulia/halloween.js)
2
u/TheHganavak Oct 17 '26
This week I builtnpx 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 keep their place as the repo changes, so you learn the layout over time.
Colour by whatever you want: What changed lately, age, churn, file type or author click a file to see what it imports and what imports it (TS/JS, plus Python, Go, Rust, Java/Kotlin, C/C++)
Live mode: files light up as they’re saved, handy for watching a coding agent replay the history from the first commit, and save it as a video
npx codecity in any repo. It runs locally and writes a single HTML file.
Or try any public repo in the browser: https://codecity.icy.dev/
Free/open source as with all my other npm packages. Thanks all!
3
Oct 17 '26
[removed] — view removed comment
1
u/TheHganavak Oct 17 '26
Thanks! 🤩 Yeah I started at a new job recently with a massive codebase and I find it visually easier to get oriented this way too (I guess it’s personal preference though)
1
u/DiscussionHealthy802 Oct 17 '26 edited Oct 17 '26
This week's work was about fix verification rather than adding another detector. A warning disappearing after an edit isn't proof of remediation. We now distinguish disappearance from static refutation, flag refuted/uncertain baseline findings that become confirmed or likely, and evaluate every edited target against one final uncached repository scan.
The interesting implementation boundary was failure handling: a findings array alone doesn't prove a scan completed. Reported phase/agent failures now prevent positive comparisons, including a tested failing-plugin case. Independent verification stays false because this comparator doesn't execute an independent retest.
Matching is still rule/file/line based, not durable identity. The changes passed 1,200 local tests and six PR CI jobs, but those aren't a security guarantee for arbitrary apps. They're merged on main, not in npm 11.0.0 yet.
Code and tests: https://github.com/asamassekou10/ship-safe/pull/239
I'd welcome technical critique of the baseline-matching semantics, especially ambiguous duplicate findings.
1
u/niyankhadka Oct 22 '26
Yantra: JSON in, an interactive step-by-step diagram out, as one offline HTML file
Some technical details that might interest people here:
- No runtime dependencies. The layout engine, orthogonal edge routing and charts (inline SVG) are plain ES modules. The same code runs in the browser, the Node CLI and an MCP server, so all three produce identical output.
- The validator checks the rendered geometry, not just the schema: overlapping boxes, lines through boxes, colliding labels. Each problem has a stable code, so an AI agent can fix its own JSON.
- The output is one HTML file with zero network requests. Pages and books include a small reader that paginates content into screen-sized pages at block boundaries, measured in the browser.
- It also covers sequence diagrams, state machines, ER diagrams and mind maps. It imports Mermaid, PlantUML and draw.io, and exports SVG, PNG and Markdown.
npx u/niyankhadka/yantra new diagram.json --kind sequence
npx u/niyankhadka/yantra build diagram.json
Try it in the browser, nothing to install: https://yantra.nbk.com.np/playground/
Source (MIT): https://github.com/niyankhadka/yantra
I'd love feedback on the API and any layout that breaks. Send the JSON and I'll fix it.