title: How to create a child process from a string
body: <p>In the browser, we can create workers from a javascript string as follows:</p>
  
  <pre><code>var blob = new Blob([sourceString]);
  var url = window.URL.createObjectURL(blob);
  var worker = new Worker(url);
  </code></pre>
  
  <p>Is there any way to do this with node's <a href="https://nodejs.org/api/child_process.html" rel="noreferrer">child process</a>? I have a single JavaScript file I and want to create workers that are coded dynamically.</p>
  
  <p><strong>The source string is a created dynamically at run time.</strong></p>
  
  <p>The closest answer I found was <a href="https://stackoverflow.com/a/13371439/4576519">this one</a>, but it requires a seperate file.</p>