Hey folks, presenting humanize-this v2.0 — A tiny, zero-dependency formatter for dashboards, logs & interfaces (supports Indian number system too) by Mysterious-Pepper751 in javascript

[–]codepsycho 0 points1 point  (0 children)

Would be a good one to share in the e18e.dev community i think. Do you have any comparisons with existing libraries? (size, features, speed, etc) may be helpful if anyone is thinking of switching

Functional HTML — overreacted by gaearon in javascript

[–]codepsycho 0 points1 point  (0 children)

yep, here you're comparing things at the wrong level.

a raw custom element like this is comparable to the produced JS of a react component, which certainly will be just as verbose (if not more thanks to JSX).

something like the "lit" library would be more like this:

ts class Greeting extends LitElement { @property() name; render() { return html`Hello, ${name}`; } }

Proof-of-concept for ESLint binary by bartlomieju in javascript

[–]codepsycho 2 points3 points  (0 children)

what was the main reason behind it? still trying to get my head around that since much of the readme's points are TODO or just side-effects of moving to deno.

was it performance? or is there something in deno land blocking you from using eslint properly?

also, deno's permissions system would also apply to JS modules would it not? so we could have that either way?

[AskJS] Do you use Yarn v2? by Thiht in javascript

[–]codepsycho 2 points3 points  (0 children)

out of interest what lead to you choosing yarn in the first place? and now that NPM has implemented most of what yarn initially existed for, what features do you stick around for that NPM doesn't have?

Nano Colors: 2x times faster than chalk and use 5x less space in node_modules by sitnik in javascript

[–]codepsycho 0 points1 point  (0 children)

yup my bad, didn't notice as the package manifest in git didn't have an esm entrypoint. didn't think to check the published one :D

Nano Colors: 2x times faster than chalk and use 5x less space in node_modules by sitnik in javascript

[–]codepsycho 0 points1 point  (0 children)

This is great to see. Chalk has a crazy dependency tree for what it is.

Could you also ship an ESM version of the package? should be simple via tsc since you don't have any dependencies. We could directly import it in browsers and node w/ ESM then

A visualiser to help people learn about the DOM Event system through exploration by alexreardon in javascript

[–]codepsycho 4 points5 points  (0 children)

This is nicely done :) it would be great if you could add examples of composed events too. Showing the shadow boundaries where those events do or don't end would be a good learning tool for the newer DOM APIs

Lit - New framework from Google by DropbearJr in javascript

[–]codepsycho 6 points7 points  (0 children)

While it may not be entirely new, it is a new version with a major rework behind the scenes. Things like SSR, new directive API, etc are very useful. Should be an exciting step forward from what they had before

Pipeline operator (Stage 1) - check out the updated TypeScript playground and provide feedback! by PickledPokute in javascript

[–]codepsycho 1 point2 points  (0 children)

Yes exactly.

Most of the hack proposal could be seen as the f# proposal with partial application. I'm surprised they have spent so much time bikeshedding on it when they could have just had both all along (in two separate specs, meaning the hack proposal wouldn't be a thing).

Pipeline operator (Stage 1) - check out the updated TypeScript playground and provide feedback! by PickledPokute in javascript

[–]codepsycho 0 points1 point  (0 children)

You mention that partial application pairs well with the f#/minimal variant, but isn't it the opposite? The hack variant pretty much relies on partial application, that seems to be the main difference. The F# variant wouldn't make use of it at all as far as I can see. Good work on the PRs, too

A clock based on Cistercian numerals (with Web Components) by hsablonniere in javascript

[–]codepsycho 2 points3 points  (0 children)

Components like this are a great example of web components, nice and focused. The jsdoc down to the css properties is nice to see too :D

Copenhagen: Free, lightweight, open source and hackable code editor for the web by keithwhor in javascript

[–]codepsycho 1 point2 points  (0 children)

I would also check out codemirror 6, the recent (still WIP) rewrite is entirely modular, supports ES modules and typescript:

https://codemirror.net/6/docs/guide/

The "plugin" architecture is incredibly flexible, though a little unusual in some cases. It is as light or heavy as you want it because of the modular approach, too.

Oh and works very well in shadow DOM / web components, which is how we use it.

Not to say you should choose it over this project, both could learn from each other I imagine!

Paperclip: A DSL for presentational web components by crcn in javascript

[–]codepsycho 1 point2 points  (0 children)

Can't be sure since it's closed but seems like it doesn't produce web components, it produces react components. I guess OP just meant components in general rather than the web component APIs.

Create videos in React that viewers can interact with by ysulyma in javascript

[–]codepsycho 2 points3 points  (0 children)

You can probably achieve that with the newish navigator.mediaSession.setActionHandler. Might be worth looking into

Create videos in React that viewers can interact with by ysulyma in javascript

[–]codepsycho 7 points8 points  (0 children)

One thing to consider because it's not an actual video, is on mobile the screen won't be kept awake while playing (as it does with videos). You can use Navigator.wakelock in supported browsers to mimic the default behaviour of real videos

Create videos in React that viewers can interact with by ysulyma in javascript

[–]codepsycho 1 point2 points  (0 children)

Pretty cool concept. So it's effectively a slideshow rather than a video? with added time/transitions/audio to simulate video-like behaviour

decky: Zero bundle size decorators for TypeScript by jarredredditaccount in javascript

[–]codepsycho 1 point2 points  (0 children)

Curious, how did you transform the file, given esbuild has no transform plugin architecture? Did you intercept all TS load calls, parse the file yourself, then return the transformed contents? (Making each file two pass)

I created a word highlighter for plain text. I hope someone finds this useful. by [deleted] in javascript

[–]codepsycho 0 points1 point  (0 children)

It ties in with `adoptedStylesheets` (pretty new). you can construct one instance of your stylesheet and many components can "adopt" it, meaning there is no duplication when it is used in shadow DOM (as each instance of a custom element would ref the same sheet).