lib/index.js
function (cb) {
      files.forEach(function (file) {
        var proof = file.content;
        if (!proof) return;
        if (!proof.id) {
          errors.push(file.path + ' has no ID property.');
          return;
        }
        res[proof.id] = res[proof.id] || {};
        res[proof.id][file.type] = proof;
      });
      cb();
    }
function (cb) {
      files.forEach(function (file) {
        var proof = file.content;
        if (!proof) return;
        if (!proof.id) {
          errors.push(file.path + ' has no ID property.');
          return;
        }
        res[proof.id] = res[proof.id] || {};
        res[proof.id][file.type] = proof;
      });
      cb();
    }
function ( cb ) { files . forEach ( function ( file ) { var proof = file . content ; if ( ! proof ) return ; if ( ! proof . id ) { errors . push ( file . path + ' has no ID property.' ) ; return ; } res [ proof . id ] = res [ proof . id ] || { } ; res [ proof . id ] [ file . type ] = proof ; } ) ; cb ( ) ; }
Group files by ID and set on result
Group files by ID and set on result