Ancestors

Written by jessitron on 2024-12-27 at 20:29

When your code helps people over bumps, your code looks bumpy.

=> More informations about this toot | More toots from jessitron@hachyderm.io

Written by jessitron on 2024-12-27 at 20:33

This post brought to you by the htm library for JS. It converts your jsx-looking string to HTML, without using JSX.

The code strikes me as elegant.

When I pass an extra closing tag, the exception says "h.push is not defined"

When I miss a closing tag, it returns the wrong type.

https://www.npmjs.com/package/htm

=> More informations about this toot | More toots from jessitron@hachyderm.io

Toot

Written by jessitron on 2024-12-27 at 20:35

so I wrapped it in bumpy code, to at least give my future self a better hint.

https://github.com/jessitron/hny-tricks/blob/1e90435b00ebc7911423471f17259c7c5d4f9ff6/src/htm-but-right.ts

=> More informations about this toot | More toots from jessitron@hachyderm.io

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113726699028488916
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
240.200406 milliseconds
Gemini-to-HTML Time
0.670144 milliseconds

This content has been proxied by September (3851b).