# text-to-worker

> Run functions directly in a webworker

Latest version **0.1.6** (published 2019-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install text-to-worker
pnpm add text-to-worker
yarn add text-to-worker
bun add text-to-worker
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2019-08-26 |
| First published | 2019-05-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Nishkal |
| Maintainers | nishkal |
| Keywords | webworker, workerize, worker |

## Links

- npm: https://www.npmjs.com/package/text-to-worker
- Repository: https://github.com/Nishkalkashyap/text-to-worker
- Issues: https://github.com/Nishkalkashyap/text-to-worker/issues
- npm.io page: https://npm.io/package/text-to-worker

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 0.1.6 (latest) — 2019-08-26
- 0.1.5 — 2019-05-10
- 0.1.4 — 2019-05-10
- 0.1.3 — 2019-05-10
- 0.1.2 — 2019-05-09
- 0.1.1 — 2019-05-09
- 0.1.0 — 2019-05-09
- 0.0.9 — 2019-05-06
- 0.0.8 — 2019-05-06
- 0.0.7 — 2019-05-06
- 0.0.6 — 2019-05-06
- 0.0.5 — 2019-05-06
- 0.0.4 — 2019-05-06
- 0.0.3 — 2019-05-06
- 0.0.2 — 2019-05-06
- … 2 more at https://npm.io/package/text-to-worker/versions

## README

# text-to-worker
<!-- > Under development. Has errors!!!!!! -->

> Moves a module into a Web Worker, automatically reflecting exported functions as asynchronous proxies.


## Install

```sh
npm install --save text-to-worker
```


**worker.js**:
```js
import { textToWorker } from "text-to-worker";

let worker = textToWorker(`
	function sum(a, b) {
        return a + b;
    }
`);

(async () => {
    const result = await worker.sum(1, 2);
    console.log(result);//prints 3;
})();
```


### License

[MIT License](https://oss.ninja/mit/developit/) © [Nishkal Kashyap](https://nishkal.in)

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