code: function(files) {
      var collection = {};
      files.forEach(function(file) {
          var filename = file.name;
          if (!collection.hasOwnProperty(filename) || collection[filename].version < file.version) {
              collection[filename] = file;
          }
      });
      return Object.keys(collection).map(function(name) {
          return collection[name];
      });
  }
docs: Deduplicate the list of files.
  
  Only keep the most recent file versions.
  
  @param array files
  @return array