{"size": 382, "ext": "js", "max_stars_repo_path": "common/Langs.js", "max_stars_repo_name": "Jho00/distance-converter", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "common/Langs.js", "max_issues_repo_name": "Jho00/distance-converter", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "common/Langs.js", "max_forks_repo_name": "Jho00/distance-converter", "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.2857142857, "max_line_length": 78, "alphanum_fraction": 0.6335078534}
export const RU = 'RU-ru';
export const EN = 'EN-en';

export const inputText = {
    ruName: 'Введите значение',
    enName: 'Enter value'
};

export const convert = (object, lang) =>  {
    if(!object.hasOwnProperty('enName') || !object.hasOwnProperty('ruName')) {
        throw new Error('Wrong object structure');
    }
    return lang === EN ? object.enName : object.ruName;
};