GitHub - developit/workerize: Run a module in a Web Worker.


30 bookmarks. First posted by acemarke january 2018.


kevinold starred developit/workerize
from:ifttt  github 
12 weeks ago by kevinold
Moves a module into a Web Worker, automatically reflecting exported functions as asynchronous proxies.

javascript 
june 2018 by sjelfull
GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
async  github  javascript  web-worker 
march 2018 by jppferguson
Github repo
Name: workerize
Tagline: πŸ—οΈ Run a module in a Web Worker.
Homepage: https://github.com/developit/workerize-loader
Languages:
JavaScript = 3246 bytes
HTML = 497 bytes

<h2 align="center">
πŸ’– Using Webpack? You want <a href="https://github.com/developit/workerize-loader">workerize-loader ➑️</a>
</h2>

<img src="https://i.imgur.com/MBlHoDp.jpg" width="1358" alt="workerize">

# Workerize [![npm](https://img.shields.io/npm/v/workerize.svg?style=flat)](https://www.npmjs.org/package/workerize) [![travis](https://travis-ci.org/developit/workerize.svg?branch=master)](https://travis-ci.org/developit/workerize)

> Moves a module into a Web Worker, automatically reflecting exported functions as asynchronous proxies.

- Bundles a tiny, purpose-built RPC implementation into your app
- If exported module methods are already async, signature is unchanged
- Supports synchronous and asynchronous worker functions
- Works beautifully with async/await
- Just **800 bytes** of gzipped ES3

## Install

```sh
npm install --save workerize
```

### Usage

Pass either a function or a string containing code.

**worker.js**:

```js
let worker = workerize(`
export function add(a, b) {
// block for half a second to demonstrate asynchronicity
let start = Date.now();
while (Date.now()-start < 500);
return a + b;
}
`);

(async () => {
console.log('3 + 9 = ', await worker.add(3, 9));
console.log('1 + 2 = ', await worker.add(1, 2));
})();
```

### License

[MIT License](https://oss.ninja/mit/developit/) Β© [Jason Miller](https://jasonformat.com)
github  programming  github-starred-to-pinboard  crypto 
february 2018 by brianyang
TIL that web workers have browser support all the way back to IE10 😱 Usage is also really simple with https://t.co/rOjoukD5cN and https://t.co/hpNOUEGPKo by @_developit... Why aren't we using them for everything?!https://t.co/NR1R9QrnqB pic.twitter.com/DctYiac1Zt

β€” Max Stoiber (@mxstbr) January 27, 2018
IFTTT  Twitter 
january 2018 by abraham
workerize - πŸ—οΈ Run a module in a Web Worker.
web-worker  javascript 
january 2018 by spdaly
Workerize: Automatically offload modules into Web Workers on-the-fly or via Webpack http://ift.tt/2FlbMif
january 2018 by johnloy
Moves a module into a Web Worker, automatically reflecting exported functions as asynchronous proxies.
:vos:tool?  worker  threads  threading  js  javascript 
january 2018 by reedhedges
GitHub – developit/workerize: πŸ—οΈ Run a module in a Web Worker.
from twitter
january 2018 by jackysee
Moves a module into a Web Worker, automatically reflecting exported functions as asynchronous proxies.
JS  concurrency  browser  opensource 
january 2018 by liqweed
Moves a module into a Web Worker, automatically reflecting exported functions as asynchronous proxies.
from twitter
january 2018 by codepo8
workerize - Run a module in a Web Worker.
javascript  webworker  development  webdev  programming 
january 2018 by berberich
πŸ“£ Introducing Workerize: Offload modules into Web Workers with a simple prefix! 😍 Statically compiles exports to reflected async functions πŸ˜ƒ ✨ https://t.co/j22LuQlx1B https://t.co/kMsEyjUCHq

πŸ“£ Introducing Workerize:
Offload modules into Web Workers with a simple prefix! 😍
Statically compiles exports to reflected async functions πŸ˜ƒ
✨ https://t.co/j22LuQlx1B http://pic.twitter.com/kMsEyjUCHq

β€” Jason Miller πŸ¦Šβš› (@_developit) January 10, 2018

(favorited tweet)
IFTTT  Twitter 
january 2018 by juniorbird
lmorchard starred developit/workerize
github  needs-tags 
january 2018 by deusx
lmorchard starred developit/workerize
github  needs-tags 
january 2018 by zhaocai
Layzie starred developit/workerize
from:ifttt  github 
january 2018 by Layzie
Converts the string source of an ES6 module into a Web Worker, where all exported functions are promise-ified proxies.
programming  javascript  rpc  webworker  threads  threading  promises  async  modules 
january 2018 by acemarke