Yuto Yoshino

Yuto Yoshino

@yossydev.com

i'm javascript and rust developer. https://yossy.dev/

81 followers92 following922 posts

worker.postMessageはすぐ理解できたけどself.onmessageに苦戦した。 最初のworkerスレッド起動時に受け取りを監視するメソッド呼び出してそれをループさせてんだな。 windowメソッドだからなかなかどこにあるかとメソッドの登録のせいで探すの難しかった

Yuto Yoshino reposted

so gooooood

Rob Palmer@robpalmer.bsky.social

ECMAScript excitement 😉 Congrats to @bridgear.bsky.social @jordan.har.band on advancing Object.keysLength to Stage 2 at TC39 today 🎉 let count = Object.keysLength(o) It counts the string-keyed own properties on an object. This avoids the cost of the intermediate array in Object.keys(o).length

Yuto Yoshino reposted

webidlみたいに汎用的に作りたかったし多分作れたけどそれするには型が面倒でクラス内に直定義してしまった github.com/tryandromeda...

github.comfeat(ext/fetch): Header forEach() by yossydev · Pull Request #162 · tryandromeda/andromedaref: https://developer.mozilla.org/en-US/docs/Web/API/Headers/forEach
Yuto Yoshino@yossydev.com

webidlでiterableにしてた。なるほどすぎる github.com/denoland/den...

あと const myHeader = new Header(); myHeader.append("key", "value"); // 通常は [["key, value"]...] みたいになってる console.log(myHeader) // { key: "value" } みたいな処理はconsole.log内で配列をオブジェクトに変換する処理頑張って書いてて面白かった