# jfee

> turn NodeJS EventEmitters into asynchronous generators that one can iterate over with for-loops

Latest version **0.1.5** (published 2023-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install jfee
pnpm add jfee
yarn add jfee
bun add jfee
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-08-27 |
| First published | 2020-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 22.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | loveencounterflow |
| Keywords | generator, eventemitter, events, for-loop, iterator, stream, pipestreaming |

## Links

- npm: https://www.npmjs.com/package/jfee
- Repository: https://github.com/loveencounterflow/jfee
- Homepage: https://github.com/loveencounterflow/jfee#readme
- Issues: https://github.com/loveencounterflow/jfee/issues
- npm.io page: https://npm.io/package/jfee

## Dependencies (1)

- [intertype](https://npm.io/package/intertype.md) 7.6.5

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.1.5 (latest) — 2023-08-27
- 0.1.4 — 2021-03-01
- 0.1.3 — 2021-02-02
- 0.1.2 — 2021-02-02
- 0.1.1 — 2021-02-02
- 0.1.0 — 2021-02-02
- 0.0.2 — 2020-09-12
- 0.0.1 — 2020-09-11

## README

# JfEE



<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [What it Does](#what-it-does)
- [Usage](#usage)
- [API](#api)
- [Acknowledgements](#acknowledgements)
- [How it Works](#how-it-works)
- [To Do](#to-do)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->


## What it Does

JfEE (['dʒæfi], **G**enerator **f**rom **E**vent**E**mitter) provides a way to turn a NodeJS EventEmitter
into an asynchronous generator, which is convenient in a lot of situations, such as when one wants to use
an EventEmitter as the data source for pipelined data processing.

## Usage

## API


## Acknowledgements

thx to https://stackoverflow.com/a/59347615/7568091

## How it Works

> Seems to be working so far.
>
> i.e. you create a dummy promise like in Khanh's solution so that you can wait for the first result, but then
> because many results might come in all at once, you push them into an array and reset the promise to wait
> for the result (or batch of results). It doesn't matter if this promise gets overwritten dozens of times
> before its ever awaited.
>
> Then we can yield all the results at once with yield* and flush the array for the next batch.





## To Do

* [ ] integrate with `intertext-splitlines`

---
_Source: https://npm.io/package/jfee · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
