{"size": 615, "ext": "js", "max_stars_repo_path": "src/lib/reader.js", "max_stars_repo_name": "ashtonkellis/03-asyncronous-callbacks", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/lib/reader.js", "max_issues_repo_name": "ashtonkellis/03-asyncronous-callbacks", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/lib/reader.js", "max_forks_repo_name": "ashtonkellis/03-asyncronous-callbacks", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.9545454545, "max_line_length": 79, "alphanum_fraction": 0.606504065}
'use strict';

const fs = require('fs');

const reader = module.exports = (paths, callback) => { // eslint-disable-line
  const filePath1 = paths[0];
  const filePath2 = paths[1];
  const filePath3 = paths[2];
  
  fs.readFile(filePath1, (err1, data1) => {
    if (err1) return callback(err1);
    return fs.readFile(filePath2, (err2, data2) => {
      if (err2) return callback(err2);
      return fs.readFile(filePath3, (err3, data3) => {
        if (err3) return callback(err3);
        callback(null, [data1.toString(), data2.toString(), data3.toString()]);
        return undefined;
      });
    });
  });
};
