title: Formatting hexadecimal Number to short UUID in JavaScript
body: <p>I have a hexadecimal number in javascript. For display purposes, I would like to format the string as:</p>
  
  <pre><code>ffffffff-ffff-ffff
  00000000-0000-01ff
  </code></pre>
  
  <p><code>(8 digits)-(4 digits)-(4 digits)</code> with padded zeros on the front</p>
  
  <p>I've been trying to write my own loop to format an arbitrary hexadecimal number into this format, but this seems like something that should be available in JavaScript already.</p>
  
  <p>Is there a built-in way to format a hexadecimal number in JavaScript?</p>