Skip to content

workio-js/workio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

Workio is a JavaScript library for building and managing Web Workers.

Touch-and-Go: No more worker.js to build additional off-thread operations. offload to comfortable worker threads with single line.
const { Workio } = await import("https://workio.dev/@0.1.0/mod.js");

const WorkerTemplate = new Workio((myName) => {
    function sayHello(yourName) {
        return `Hello, ${yourName} from ${myName}!` // use constructor arguments
    }
    return { sayHello, close } // expose methods as return value (inventive part!)
});

const workerInstance = await new WorkerTemplate("Workio"); // create web worker

console.log(await workerInstance.sayHello("Worker")); // "Hello Worker from Workio!" 

workerInstance.close();
I/O Optimization: Caching is available for large primitives.
This is how you dropdown.
Thin and Safe:
This is how you dropdown.

Visit StackBlitz for your first step into the developer experience at Workio.

Open in StackBlitz