developit / developit/workerize

Consider removing expose(), call() and kill() ?

Open
#26 4 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
4.4k
Forks
87
PR merge metrics
No merged PRs in 30d

Description

``` javascript
worker.expose = methodName => {
worker[i] = function() {
return worker.call(methodName, [].slice.call(arguments));
};
};
```
Instead `methodName` parameter should be used:
``` javascript
worker.expose = methodName => {
worker[methodName] = function() {
return worker.call(methodName, [].slice.call(arguments));
};
};
```
Beside that I don't see why the `call` and `expose` methods are accessible from outside. (Don't assign to worker at all)
The purpose of the `kill` method is also not clear for me.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.