# enginer

> An utility js/ts library to make Javscript conccurent

Latest version **0.0.2** (published 2021-08-10) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2021-08-10 |
| First published | 2021-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | João Augusto Perin de Souza |
| Maintainers | joojscript |
| Keywords | concurrency, javascript, typescript, worker, threads, pool |

## Links

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

## Dependencies (1)

- [worker-threads-pool](https://npm.io/package/worker-threads-pool.md) ^2.0.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2021-08-10

## README

<h1 align="center">
  <img src="https://github.com/joojscript/enginer/blob/master/.github/assets/logo.png?raw=true" height="200" /> <br />
  Enginer
</h1>

An utility js/ts library to make Javscript conccurent!

## Motivation

While trying to make high-scalable and performant systems, I end up being in contact with node.js' **worker_threads** which were trully nice! But unfortunelly, at least in my search, I could not find any implementations that support typescript.

I end up trying some work arounds, but, as a developer that likes a lot concurrency, I decided to make my own implementation. So here it is! Hope it helps! :)

## Installation

```shell
npm install enginer
```

or

```shell
yarn add enginer
```

## Usage

### Single Worker

```typescript
const filepath = resolve(__dirname, "file.ts");

new Worker({ filepath });
```

### Worker Pool

```typescript
const filepath = resolve(__dirname, "file.ts");

new Pool({
  max: 4,
  workers: [
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
  ],
});
```

## ToDo

- 🕐 Support commands as well as files/scripts.

## License

[MIT](https://choosealicense.com/licenses/mit/)

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