Hacker News new | ask | show | jobs
by franciscop 3400 days ago
If you don't like to have to load an external file (+ an extra request) you can use my library uwork: https://github.com/franciscop/uwork

It has some limitations, but for long lived process intensive and async functions is perfect. It has a really clean and easy syntax where you don't need to learn everything about Web Workers and their APIs to be able to use it.

If you are already using promises you might not even need anything besides wrapping the function in a callback.