# i-web-worker

> webworker的简单应用

Latest version **1.0.2** (published 2019-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install i-web-worker
pnpm add i-web-worker
yarn add i-web-worker
bun add i-web-worker
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-09-05 |
| First published | 2019-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | 潘丽敏 |
| Maintainers | idler8 |
| Keywords | worker, web, webworker, simplewebworker |

## Links

- npm: https://www.npmjs.com/package/i-web-worker
- Repository: https://github.com/idler8/iworker
- Homepage: https://github.com/idler8/iworker#readme
- Issues: https://github.com/idler8/iworker/issues
- npm.io page: https://npm.io/package/i-web-worker

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2019-09-05
- 1.0.1 — 2019-09-05
- 1.0.0 — 2019-09-05

## README

# iworker
webworker的简单应用

simple-web-worker的作者好像已经不活跃了，为了用到更方便的webworker建立了本仓库

## 安装方法
```
  npm i i-web-worker
```
## 调用方法
```javascript
  const A = function(data){
    console.log('A',data);
  }
  function B(data){
    console.log('B',data)
    A('A is Run in B');
  }
  import IWorker from 'i-web-worker';
  let worker = new IWorker();
  worker.set(A);
  worker.set(B);
  worker.run('A','A is Run');
  //A A is Run
  worker.run('B','B is Run');
  //B B is Run
  //A A is Run in B
```

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