A way to use js promises with web workers to run any function asynchronously