code: function jscoverageFromIstanbulCoverage(coverage, chdir) {
    var jscov = {}, file, filename, hitCount, line, sid;
  
    chdir = chdir || process.cwd();
  
    for (file in coverage) {
      filename = path.relative(chdir, file);
      jscov[filename] = {};
      jscov[filename]['source'] = fs.readFileSync(file).toString().split('\n');
  
      for (line = 0; line < jscov[filename]['source'].length; ++line) {
        jscov[filename][line] = null;
      }
  
      for (sid in coverage[file].s) {
        if (coverage[file].s.hasOwnProperty(sid)) {
          hitCount = coverage[file].s[sid];
          if (typeof(coverage[file].statementMap[sid]) !== 'undefined') {
            line = coverage[file].statementMap[sid].start.line;
            jscov[filename][line] = hitCount;
          } else {
            // somehow log an error here.  Recommendations welcome.
            // Can this error ever happen in the first place?
          }
        }
      }
    }
  
    return jscov;
  }
docs: /*
  Convert an Istanbul __coverage__ object so it's JSON serializable