Add support iterator
- Linguagem predominante
- JavaScript
- Estrelas
- 9k
- Forks
- 181
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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();
```
Guia de contribuição
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript
- Domínio
- frontend
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 35/100