multithreading

Web Threads

generic threads using web workers for the web Installation add it to your project using npm install web-threads --save or yarn add web-threads Usage Simple function with arguments import { execute } from 'web-threads' let func = (value) => { return value * value } let params = { fn: func.toString(), args: [2] } execute(params) .then(console.log) .catch(console.error) Function with context import { execute } from 'web-threads' function Func(value){ this.