Functions with workerpool
npm install workerpool-functionsworkerpool-functions offers some basic operations with a dedicated worker created with workerpool.
npm install workerpool-functions
workerpool-functions.full.min.js, workerpool-functions.worker.js and workerpool.min.js from node_modules\workerpool-functions\lib\worker to your public directory - e.g. public\libs\workerpool These 2 files should be in same directory. After that point the application to the path of the workerpool-functions.full.min.js file.js
import { workerOptions } from 'workerpool-functions';
workerOptions.workerSrc = '/libs/workerpool/workerpool-functions.worker.js';
`Sample Usage
Example to sort a list of user informations.
`js
import { workerSort } from 'workerpool-functions';
await workerSort<{name: string; email: string}>('asc', ['email'], [{name: 'My Name', email: 'my@mail.de'}])
``|Name|Description|Arguments|Return|
|----|----|----|----|
|workerValueFromPath<T, R>|Reduces the object to get the value for a given path|