{"size": 523, "ext": "js", "max_stars_repo_path": "src/services.js", "max_stars_repo_name": "A2Lab-Team/Search-Services-App", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/services.js", "max_issues_repo_name": "A2Lab-Team/Search-Services-App", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/services.js", "max_forks_repo_name": "A2Lab-Team/Search-Services-App", "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": 19.3703703704, "max_line_length": 68, "alphanum_fraction": 0.6347992352}
import CSV from 'parse-csv';

/**
 * Service model.
 * @typedef {object} Service
 * @property {string} name
 * @property {string} category
 * @property {string} description
 * @property {string} link
 */

/**
 * Import and parse services.
 * @returns {Promise.<Array.<Service>>}
 */
const getServices = async () => {
  const { 'default': data } = await import('@/assets/services.csv');
  const services = CSV.toJSON(data, {
    headers: {
      included: true
    }
  });
  return services;
};

export default getServices;
