title: Node.js - Get number of processors available
body: <p>This is really just to satisfy curiosity, and see if there's a better way to do this.</p>
  
  <p>On my Windows 8 box, Node's <code>process.env</code> object has a <code>NUMBER_OF_PROCESSORS</code> property, on my Linux box it doesn't.</p>
  
  <p>Obviously different platforms have different environment variables, that much is a given, but it seems like NUMBER_OF_PROCESSORS would be a useful thing to have regardless.</p>
  
  <p>My quick fix for Linux was spawning a child process to run the <code>nproc</code> command, but I'd like to avoid using a callback for simply getting the number of processors. Seems like there must be a simpler way.</p>
  
  <p>What have other people done to solve this?</p>