{"size": 418, "ext": "js", "max_stars_repo_path": "src/js/moonData.js", "max_stars_repo_name": "CosmoFrontier/Frontier", "max_stars_repo_stars_event_min_datetime": "2022-02-04T04:10:48.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-09T06:59:34.000Z", "max_issues_repo_path": "src/js/moonData.js", "max_issues_repo_name": "CosmoFrontier/Frontier", "max_issues_repo_issues_event_min_datetime": "2022-02-10T10:29:43.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-10T10:29:43.000Z", "max_forks_repo_path": "src/js/moonData.js", "max_forks_repo_name": "CosmoFrontier/Frontier", "max_forks_repo_forks_event_min_datetime": "2022-02-07T14:55:23.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-04T11:24:07.000Z"}
{"max_stars_count": 11, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 24.5882352941, "max_line_length": 98, "alphanum_fraction": 0.5909090909}
import { refetch } from "./Util";

export default function moonData(name) {
  //URL fetching for only moons
  return new Promise(async (resolve, reject) => {
    try {
      const data = await refetch(
        "https://ssd-abh80.vercel.app/satellite/" + name //https://ssd-abh80.vercel.app/satellite/
      );
      const json = await data.json();
      resolve(json);
    } catch (e) {
      reject(e);
    }
  });
}
