Demonstrates the most general way to use kiss-worker
with an object, see
Worker Code Isolation.
You can play with this on StackBlitz. To compile the example on your computer and run it in your browser you can proceed as follows (requires node >=18.18):
git clone https://github.com/andreashuber69/kiss-worker-demo4.git
cd kiss-worker-demo4
npm install
npm start
Naturally, the exact same worker code also runs on node (but not on StackBlitz, unfortunately):
npm run node-start