Something went wrong. Try again.
Offload functions to worker threads with shared memory primitives for Node.js.
Something went wrong. Try again.
217 B · 9 lines
TypeScript
at main
12345678910import { mo } from '../../src/index.ts';
export const square = mo(import.meta, (n: number): number => { return n * n;});
export const add = mo(import.meta, (a: number, b: number): number => { return a + b;});