title: Get LCOV compatible output from JSCover/JSCoverage coverage.xml or jscoverage.json
body: <p><strong>Summary</strong></p>
  
  <p>I've recently switched from using <a href="http://code.google.com/p/js-test-driver/" rel="nofollow">Google's JsTestDriver</a> to <a href="http://github.com/airportyh/testem" rel="nofollow">Testem</a> but miss <a href="http://ltp.sourceforge.net/coverage/lcov.php" rel="nofollow">LCOV HTML Code Coverage Reports</a>, is there a way to convert <a href="http://tntim96.github.com/JSCover/" rel="nofollow">JSCover</a> output into LCOV format, so I can <a href="http://ltp.sourceforge.net/coverage/lcov/output/index.html" rel="nofollow">use genhtml to create reports like these</a>.</p>
  
  <p><strong>Detail</strong></p>
  
  <p>I'm working from a <a href="https://github.com/richardbutler/testem-coverage-sandbox" rel="nofollow">JSCoverage example using Testem, Jasmine and PhantomJS</a> which generates the 2 following coverage output formats;</p>
  
  <p>coverage.xml</p>
  
  <pre><code>&lt;report&gt;
    &lt;stats&gt;
      &lt;packages value="1"/&gt;
      &lt;classes value="1"/&gt;
      &lt;methods value="1"/&gt;
      &lt;srcfiles value="1"/&gt;
      &lt;srclines value="3"/&gt;
    &lt;/stats&gt;
    &lt;data&gt;
      &lt;all name="all classes"&gt;
        &lt;coverage type="class, %" value="100% (1/1)"/&gt;
        &lt;coverage type="method, %" value="100% (1/1)"/&gt;
        &lt;coverage type="block, %" value="100% (1/1)"/&gt;
        &lt;coverage type="line, %" value="100% (3/3)"/&gt;
      &lt;/all&gt;
    &lt;/data&gt;
  &lt;/report&gt;
  </code></pre>
  
  <p>jscoverage.json</p>
  
  <pre><code>{
    "hello.js": {
      "coverage": [null, 1, 1, 1],
      "source": ["(function(exports) {", "    exports.hello = function(){", "        return \"hello world\";", "    }", "})(typeof(module) !== \"undefined\" ? module.exports : this);"]
    }
  }
  </code></pre>
  
  <p>Is there a way to cover the above into the jstestdriver.conf-coverage.dat format output by js-test-driver?</p>
  
  <p>Thanks.</p>