{"size": 420, "ext": "js", "max_stars_repo_path": "src/services/util.js", "max_stars_repo_name": "khalidsheikhs/Shopping-store", "max_stars_repo_stars_event_min_datetime": "2021-09-02T10:42:30.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-02T10:42:30.000Z", "max_issues_repo_path": "src/services/util.js", "max_issues_repo_name": "khalidsheikhs/shopping-store-react", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/services/util.js", "max_forks_repo_name": "khalidsheikhs/shopping-store-react", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 32.3076923077, "max_line_length": 97, "alphanum_fraction": 0.6642857143}
/* Function to format currency */
export const formatCurrency = (num) => {
    return '$' + num;
}

/* Function to set page metas */
export const setMeta = (data = {}) => {
    data.title = data.title || 'Default title';
    data.description = data.description || 'Default description';

    document.title = data.title;
    document.querySelector('meta[name="description"]').setAttribute('content', data.description);
}