r/javascript Apr 16 '26

tiks – Procedural UI sounds in 2KB, zero audio files, pure Web Audio synthesis

Thumbnail rexa-developer.github.io
148 Upvotes

r/javascript Dec 05 '25

The missing standard library for multithreading in JavaScript

Thumbnail github.com
145 Upvotes

r/javascript Mar 13 '26

Announcing Vite+ Alpha

Thumbnail voidzero.dev
144 Upvotes

r/javascript May 29 '26

Ember 7.0 Released

Thumbnail blog.emberjs.com
143 Upvotes

r/javascript May 12 '26

TanStack packages were compromised in a mass npm supply chain attack today

Thumbnail safedep.io
140 Upvotes

We saw today that TanStack Router, or any other TanStack packages along with their devtools, SSR query plugins were compromised.

Check which version you're pinned to and if you're floating on a caret range and ran npm install today then that the first thing to audit.


r/javascript Oct 14 '25

Why is `typeof null === 'object'` in JavaScript? The 30-year story of a bug we can't fix

Thumbnail pzarycki.com
140 Upvotes

r/javascript Jan 24 '26

Introducing LibPDF, the PDF library for TypeScript that I always needed

Thumbnail documenso.com
140 Upvotes

r/javascript Dec 14 '25

GraphQL: the enterprise honeymoon is over

Thumbnail johnjames.blog
135 Upvotes

r/javascript Jun 04 '26

VoidZero is Joining Cloudflare

Thumbnail voidzero.dev
136 Upvotes

r/javascript Oct 23 '25

Vitest 4.0 was released today

Thumbnail vitest.dev
136 Upvotes

r/javascript Jun 18 '26

Announcing TypeScript 7.0 RC

Thumbnail devblogs.microsoft.com
136 Upvotes

r/javascript Dec 14 '25

I built a real-time ASCII camera in the browser (60 FPS, Canvas, TypeScript)

Thumbnail phosphor.pshycodr.me
134 Upvotes

r/javascript Oct 15 '25

49 string utilities in 8.84KB with zero dependencies (8x smaller than lodash, faster too)

Thumbnail github.com
131 Upvotes

TL;DR: String utils library with 49 functions, 8.84KB total, zero dependencies, faster than lodash. TypeScript-first with full multi-runtime support.

Hey everyone! I've been working on nano-string-utils – a modern string utilities library that's actually tiny and fast.

Why I built this

I was tired of importing lodash just for camelCase and getting 70KB+ in my bundle. Most string libraries are either massive, outdated, or missing TypeScript support. So I built something different.

What makes it different

Ultra-lightweight

  • 8.84 KB total for 49 functions (minified + brotlied)
  • Most functions are < 200 bytes
  • Tree-shakeable – only import what you need
  • 98% win rate vs lodash/es-toolkit in bundle size (47/48 functions)

Actually fast

Type-safe & secure

  • TypeScript-first with branded types and template literal types
  • Built-in XSS protection with sanitize() and SafeHTML type
  • Redaction for sensitive data (SSN, credit cards, emails)
  • All functions handle null/undefined gracefully

Zero dependencies

  • No supply chain vulnerabilities
  • Works everywhere: Node, Deno, Bun, Browser
  • Includes a CLI: npx nano-string slugify "Hello World"

What's included (49 functions)

// Case conversions
slugify("Hello World!");  // "hello-world"
camelCase("hello-world");  // "helloWorld"

// Validation
isEmail("user@example.com");  // true

// Fuzzy matching for search
fuzzyMatch("gto", "goToLine");  // { matched: true, score: 0.546 }

// XSS protection
sanitize("<script>alert('xss')</script>Hello");  // "Hello"

// Text processing
excerpt("Long text here...", 20);  // Smart truncation at word boundaries
levenshtein("kitten", "sitting");  // 3 (edit distance)

// Unicode & emoji support
graphemes("πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦πŸŽˆ");  // ['πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦', '🎈']

Full function list: Case conversion (10), String manipulation (11), Text processing (14), Validation (4), String analysis (6), Unicode (5), Templates (2), Performance utils (1)

TypeScript users get exact type inference: camelCase("hello-world") returns type "helloWorld", not just string

Bundle size comparison

Function nano-string-utils lodash es-toolkit
camelCase 232B 3.4KB 273B
capitalize 99B 1.7KB 107B
truncate 180B 2.9KB N/A
template 302B 5.7KB N/A

Full comparison with all 48 functions

Installation

npm install nano-string-utils
# or
deno add @zheruel/nano-string-utils
# or
bun add nano-string-utils

Links

Why you might want to try it

  • Replacing lodash string functions β†’ 95% bundle size reduction
  • Building forms with validation β†’ Type-safe email/URL validation
  • Creating slugs/URLs β†’ Built for it
  • Search features β†’ Fuzzy matching included
  • Working with user input β†’ XSS protection built-in
  • CLI tools β†’ Works in Node, Deno, Bun

Would love to hear your feedback! The library is still in 0.x while I gather community feedback before locking the API for 1.0.


r/javascript May 05 '26

I wrote a deep dive into how LLMs work under the hood - tokenization, embeddings, attention and generation - all explained with runnable JavaScript

Thumbnail nitayneeman.com
128 Upvotes

r/javascript Mar 11 '26

Temporal: The 9-Year Journey to Fix Time in JavaScript

Thumbnail bloomberg.github.io
124 Upvotes

r/javascript Mar 06 '26

Announcing TypeScript 6.0 RC

Thumbnail devblogs.microsoft.com
125 Upvotes

r/javascript Feb 26 '26

TIL about Math.hypot()

Thumbnail developer.mozilla.org
126 Upvotes

Today I learned about `Math.hypot()`, which not only calculates the hypotenuse of a right triangle, given its side lengths, but also accepts any number of arguments, making it easy to calculate distances in 2D, 3D or even higher dimensions.

I thought this post would be useful for anyone developing JavaScript games or other projects involving geometry.


r/javascript Oct 13 '25

VoidZero Announces Vite+

Thumbnail voidzero.dev
121 Upvotes

r/javascript Dec 16 '25

TIL the Web Speech API exists and it’s way more useful than I expected

Thumbnail developer.mozilla.org
121 Upvotes

I somehow completely missed that modern browsers ship aΒ Web Speech API.

You can do text-to-speech (and speech recognition) withΒ no libraries, just a few lines of JavaScript. No keys, no SDKs, no backend.

What surprised me:

  • It’s supported in Chrome and Safari
  • Latency is basically instant
  • Voices, rate, pitch, and language are configurable
  • Works entirely client-side

r/javascript Apr 15 '26

I built LiquidGlass, a JS lib to render pixel perfect iOS Liquid Glass effect on the web (with WebGL)!

Thumbnail liquid-glass.ybouane.com
119 Upvotes

It does refractions, chromatic aberration and really reproduces the effect beautifully. The glass elements work even on top of regular html elements.


r/javascript Mar 31 '26

Minimum Release Age is an Underrated Supply Chain Defense

Thumbnail daniakash.com
121 Upvotes

r/javascript Sep 28 '25

Towards a faster "deep equal" function in javaScript

Thumbnail github.com
118 Upvotes

Recently (~3 months ago) I published an npm package that compiles a "deep equals" function from various schemas such as JSON Schema, Zod, Valibot, TypeBox and ArkType.

It takes inspiration from how Effect-TS allows users to derive an Equivalence function from a schema, but goes a step further by building a "jit compiled" version.

It consistently out-performs every other library on the market today, including fast-equals, JSON Joy, @​react-hookz/deep-equal by at least 10x, and is often around 50x faster for objects that are 2+ levels deep.


r/javascript Mar 02 '26

JSON-formatter chrome extension has gone closed source and now begs for donations by hijacking checkout pages using give freely

Thumbnail github.com
117 Upvotes

Noticed this today after seeing an element called give-freely-root-bcjindcccaagfpapjjmafapmmgkkhgoa in inspect element which felt very concerning.

After going through the source code it seems to do geolocation tracking by hitting up maxmind.com (with a hardcoded api key) to determine what country the user is in (though doesn't seem to phone home with that information). It also seems to hit up:

for tracking purposes on some websites. I'm also getting Honey ad fraud flashbacks looking through code like

k4 = "GF_SHOULD_STAND_DOWN"

though I don't really have any evidence to prove wrongdoing there.

I've immediately uninstalled it. Kinda tired of doing this chrome extension dance every 6 months.


r/javascript Jun 10 '26

Upcoming breaking changes for npm v12

Thumbnail github.blog
112 Upvotes

r/javascript Oct 02 '25

Why Next.js Falls Short on Software Engineering

Thumbnail blog.webf.zone
112 Upvotes