developit / developit/htm

Add support iterator

オープン
#255 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
9k
フォーク
181
PR マージ指標
30日以内にマージされた PR はありません

説明

example

```js
const { on } = require('events');
const { request } = require('https');
const html = require('htm');

function h(type, props, ...children) {
return { type, props, children };
}

request('https://nodejs.org/en', async (res) => {
const iterator = on(res, "data");
const domIterator = html.bind(h).iterator(iterator);
for await (const element of emitter) {
console.log(element);
}
}).end();

request('https://nodejs.org/en', async (res) => {
const iterator = on(res, "data");
const domEmitter = html.bind(h).emitter(iterator);
domEmitter.on('div', (element) => {
console.log('emitter', element);
});
domEmitter.on('end', () => {
console.log('end');
});
}).end();
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the issue's Node.js example and compare the requested html.bind(h).iterator(iterator) API with the shown .emitter(iterator) usage. Trace the existing htm binding entry point and determine the expected behavior for the async iterator and its completion; the work is done when the documented example runs with the intended element output.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
frontend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。