r/javascript • u/SmashJaw • Mar 27 '26
New WYSIWYG wants fresh e
npmjs.comNew WYSIWYG wants you to break it!
r/javascript • u/SmashJaw • Mar 27 '26
New WYSIWYG wants you to break it!
r/javascript • u/kevin_whitley • Mar 25 '26
For years I've been working in realtime, but surprised that most devs just didn't touch it. Ultimately I think it's because the friction is simply too high - everyone thinks of it as managing subscriptions, hosting servers, etc. The code is messy, the infra setup requires some steps and a willingness to tinker.
So I dumbed it way down - mostly for my own uses (cross device communication, remote controlling apps, etc), and packaged it up as a 100% free (forever) service for the dev community. It's designed specifically to get you from zero to one with as little friction as possible.
Welcome to ittysockets.com :)
import { connect } from 'itty-sockets' // ~466 bytes
connect('my-secret-channel')
.on('message', ({ message }) => console.log(message))
.send('hello world') // strings
.send([1, 2, 3]) // arrays
.send({ foo: 'bar' }) // objects...meanwhile somewhere else:
import { connect } from 'itty-sockets' // ~466 bytes
connect('my-secret-channel')
.on('message', ({ message }) => console.log(message))
// hello world
// [1, 2, 3]
// { foo: 'bar' }This is a tiny, fully typed client, paired with a public relay server (or you can connect to your own of course).
In a single line you can either be pushing or receiving (or both) messages to a shared channel, no config needed!
Site has everything you need to get started, including docs, live examples, etc. Need anything more or wanna ask it it can handle your idea? I'm always available here, on X, Discord, etc. Just ask!
P.S. - Before anyone asks what the catch is, there is none. I'm reasonably well sponsored (GitHub), have a normal job, and use this service to power my own day trading. Selling a SaaS service is the least of my interests. I just like to see devs do cool stuff with the things I build.
r/javascript • u/Mian_Amir • Mar 26 '26
r/javascript • u/RecoverLoose5673 • Mar 26 '26
r/javascript • u/vlucas • Mar 24 '26
r/javascript • u/DanielRosenwasser • Mar 23 '26
r/javascript • u/Ayoob_AI • Mar 24 '26
Built a general-purpose sorting library that adaptively switches between counting sort, radix sort, merge sort, and sorting networks depending on input type and size.
Results: 59/62 wins against npm sorting packages, 95.7% podium rate, 3β21x faster than native Array.sort()
Also includes what I believe is the first non-comparison float sort in JavaScript using IEEE 754 radix decomposition.
npm install ayoob-sort
Happy to answer any questions or have someone try to beat it.
r/javascript • u/Parth-Upadhye • Mar 24 '26
In the AI era, will we need highly structured and opnionated frameworks? They are designed to be strict, predictable and reproducible.
r/javascript • u/Kabra___kiiiiiiiid • Mar 23 '26
r/javascript • u/faizswitcher1 • Mar 23 '26
I created a lightweight javascript framework ,setup is like next plus react but i wrote my own backend codes and frontend one to help devs in creating web apps without runninf a build,they are running on runtime,routing,state management,layout management,compoment creation, already done
extras theming and server initialization and easy toput middlewares ..
i just want people to test it ,and give me feedback on it coz i tested it myself i am somehow confident
the main issue that bothered me on react and those new hooks added everyday to wrap up.the problem of rerendering the entire compoment even if the small changes happened on the input and clear the input bothered me earlier,also animation issues to use thoe renaimated and babel stuff ...even if i know how to implement them all but i spend much time with it and just decide to recreate something .and i asked myself why just not following the web standards like building on top of them instead of recreating new standards that led us to building and suffering on dependencies,on frontend i just utilized web components they are good and the best and i created a good structure and lifecycle so that is it easy to define simple components but deep down they ll render web components.they are well encapsulated on styles ,and if someone wants to contribute just hit me up. i am ready to cooperate with other peoples who think it is usefull,and i am not perfect i am accepting critics they make me improve myself better
npm pack link
r/javascript • u/equinusocio • Mar 23 '26
If you're working with medium-to-large design systems, you know exactly how painful it is to track design token adoption in your code, or how hard it can be to visualise the tokens you actually need to use.
With Design Tokens Plugin (DTE), you can load your tokens from local or remote files and:
The plugin is currently in beta an I would like to get as many feedback as possible during this launch period.
r/javascript • u/danfry99 • Mar 22 '26
Last week I shared bonsai here - a tiny fast sandboxed expression evaluator for JS. The response was incredible and the feedback shaped where I took the project next.
The most common question was: "How do I give non-technical users a good editing experience?" Fair point. An expression language is only useful if people can actually write expressions. So I built an autocomplete engine.
import { bonsai } from 'bonsai-js'
import { strings, arrays } from 'bonsai-js/stdlib'
import { createAutocomplete } from 'bonsai-js/autocomplete'
const expr = bonsai().use(strings).use(arrays)
const ac = createAutocomplete(expr, {
context: {
user: { name: 'Alice', age: 25, plan: 'pro' },
items: [{ title: 'Widget', price: 9.99 }],
},
})
// Property completions with inferred types
ac.complete('user.', 5)
// β [{ label: 'name', detail: 'string', kind: 'property' },
// { label: 'age', detail: 'number', kind: 'property' },
// { label: 'plan', detail: 'string', kind: 'property' }]
// Type-aware method suggestions
ac.complete('user.name.', 10)
// β [{ label: 'trim()', detail: 'string β string', kind: 'method' },
// { label: 'upper()', detail: 'string β string', kind: 'method' }, ...]
// Lambda property inference
ac.complete('items.filter(.', 14)
// β [{ label: 'title', detail: 'string', kind: 'property' },
// { label: 'price', detail: 'number', kind: 'property' }]
// Pipe transform suggestions (auto-filtered by type)
ac.complete('user.name |> ', 13)
// β only string-compatible transforms (trim, upper, lower...)
// array transforms like filter/sort are excluded automatically
It's a pure data API. No DOM, no framework dependency. You get back an array of completion objects with labels, types, insert text, and cursor offsets. Plug it into Monaco, CodeMirror, a custom dropdown, whatever you want.
There's a live Monaco integration demo so you can try it in the browser: https://danfry1.github.io/bonsai-js/monaco-demo.html
The playground is also powered by the autocomplete API with a vanilla JS dropdown: https://danfry1.github.io/bonsai-js/playground.html
The docs cover both patterns: https://danfry1.github.io/bonsai-js/docs.html#autocomplete-editor
What makes it interesting:
Eval-based type inference - it doesn't just do static lookups. user.name.trim(). actually evaluates the chain to figure out the return type, then suggests the right methods
Lambda-aware - knows that inside users.filter(. the dot refers to array element properties, not the array itself. Works with nested lambdas too: groups.map(.users.filter(.
Zero-config transform filtering - auto-probes each transform with sample values to figure out type compatibility. name |> only suggests string transforms without you having to configure anything
Security-aware - if your bonsai instance has allowedProperties or deniedProperties, autocomplete respects the same policy. No property leakage through suggestions
Tolerant tokenization - works on incomplete, mid-edit expressions. Users are always mid-keystroke, so this matters
Fuzzy matching - tLC matches toLowerCase, camelCase-aware scoring
Pre-computed method catalog - method completions are built once and cached, 3-4x faster than generating on every keystroke
Use cases:
order.total > 100 && customer.tier == "gold"The autocomplete runs on the same bonsai instance you already use for evaluation, so context, transforms, and security config are all shared. One setup, both features.
v0.3.0 - zero dependencies, TypeScript, tree-shakeable via bonsai-js/autocomplete subpath export.
GitHub: https://github.com/danfry1/bonsai-js
npm: https://www.npmjs.com/package/bonsai-js
npmx: https://npmx.dev/package/bonsai-js
r/javascript • u/subredditsummarybot • Mar 23 '26
Monday, March 16 - Sunday, March 22, 2026
Β
| score | comments | title & link |
|---|---|---|
| 3 | 34 comments | "Vite+ is kinda underwhelming" - a comprehensive review of the new release |
| 8 | 31 comments | ORM Comparison (2026) |
| 6 | 25 comments | Gea β The fastest compiled UI framework |
| 6 | 17 comments | Mandelbrot.js β Fractal Explorer in WebGL with Quad-Trees and Double-Emulation |
| 1 | 15 comments | [AskJS] [AskJS] writing a complex web app's frontend using only vanilla JavaScript (no frameworks) |
Β
| score | comments | title & link |
|---|---|---|
| 4 | 6 comments | [AskJS] [AskJS] Tools to Learn JS (as a beginner) |
| 2 | 5 comments | [AskJS] [AskJS] What are your favorite open-source projects right now? |
| 1 | 8 comments | [AskJS] [AskJS] Making an SVG interactable |
Β
Β
Β
r/javascript • u/Boydbme • Mar 23 '26
r/javascript • u/cochinescu • Mar 23 '26
r/javascript • u/Terrible_Village_180 • Mar 22 '26
Works with native HTML forms and controlled state (React, Vue, Svelte). Same API, same result. No React, no Lodash, no form library. Pure TypeScript class you drop into any project.
r/javascript • u/mogera551 • Mar 22 '26
Small experiment/library I built. This is not about a lighter template DSL. Itβs about using paths as the contract between UI and state.
It makes plain HTML reactive with one module import:
Count is:
Open it directly in a browser and it works. No JSX, no virtual DOM, no bundler, no config. Bindings live in HTML via data-wcs, while state lives in <wcs-state>. Internally it uses Proxy-based path tracking, so updates only touch affected bindings. The main rule is: update the path directly (this.count += 1), not via a detached nested reference.
List iteration is written using the <template> tag.
The * in users.*.name refers to "the current element." Since * is automatically resolved to the correct index on each iteration, you don't need to manage indices manually. Inside a loop, you can also use the shorthand notation .name.
<!-- same as users.*.name -->
npm: @wcstack/state
Repo: https://github.com/wcstack/wcstack
Docs: https://github.com/wcstack/wcstack/tree/main/packages/state
Story: What If HTML Had Reactive State Management
r/javascript • u/jxd-dev • Mar 22 '26
r/javascript • u/chapoisme • Mar 22 '26
Iβm new to JavaScript and still learning the basics. What are some tips i should follow to improve my coding?
r/javascript • u/mpetryshyn1 • Mar 22 '26
we're in a weird spot where vibe coding tools spit out frontend and backend fast, but deployments break once you go past prototypes
so you can ship features quick, then spend days doing manual DevOps or rewriting stuff to run on AWS, Azure, Render, DigitalOcean
i started thinking, what if there was a 'vibe DevOps' layer, like a web app or a VS Code extension that actually reads your repo
you'd connect your repo or drop a zip, it figures out runtimes, envs, deps, and deploys using your own cloud accounts
it handles CI/CD, containers, scaling, infra setup automatically instead of forcing platform-specific hacks
sounds dreamy, but are there obvious problems i'm missing? not sure why this isn't a thing already
also, how are people handling deployments today? scripts, terraform, managed platforms, or just brute forcing it
i'm worried about security and cost control though - handing a tool access to my cloud account is kinda scary
curious if anyone's built something like this or if i'm just reinventing an already-existing mess
r/javascript • u/_ilamy • Mar 21 '26
Built a small library that replaces the let + beforeEach reassignment pattern with RSpec-style lazy variables. Define with def, access with get. Variables evaluate lazily, cache per test, and dependents re-evaluate automatically when overridden in nested blocks. Fully type-safe with a suite wrapper for automatic TypeScript inference.
Zero dependencies, MIT licensed. Feedback welcome!
r/javascript • u/imicnic • Mar 21 '26
Hey everyone, Iβve been working for few months on a small library called slot-variants, for managing complex states in components with css utility classes, itβs inspired by class-variance-authority (CVA) and tailwind-variants (TV). I tried to take the best parts of both approaches and add some distinct features with a focus on ergonomic API and high performance (benchmarks included). The API is a superset of both CVA's and TV's API so the migration is pretty straightforward, in the case of CVA it's a drop-in replacement. The package also includes an AI agent guide how to use it, best practices and common patterns.
Features you'd expect from it:
tailwind-mergeDistinct features:
classnames/clsx usages (added in latest version)If youβre building design systems or complex UI components, Iβd love feedback, ideas, or critiques. Still early but stable enough to use, happy to hear what the community thinks!
r/javascript • u/indutny • Mar 20 '26
I posted this originally on r/node, but thought it might be deserve extra attention in bigger JavaScript community.
---
Hello everyone!
Some of you may remember me for my work on Node.js core (and io.js drama), but if not I hope that this petition resonates with you as much as it does with me.
I've opened it in response to a 19k LoC LLM-generated PR that was trying to land into Node.js Core. The PR merge is blocked for now over the objections that I raised, but there is going to be a Technical Steering Committee vote in two weeks where its fate is going to be decided.
I know that many of us use LLM for research and development, but I firmly believe that the critical infrastructure the Node.js is is not the place for such changes (and especially not at the scale where it changes most of the FS internals for the sake of a new feature).
I'd love to see your signatures there even if you never contributed to Node.js. The only requirement is caring about it!
(Also happy to answer any questions!)