{"size": 323, "ext": "js", "max_stars_repo_path": "client/api/set-mode.js", "max_stars_repo_name": "cloudcmd/deepword", "max_stars_repo_stars_event_min_datetime": "2016-10-13T13:55:56.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T15:28:11.000Z", "max_issues_repo_path": "client/api/set-mode.js", "max_issues_repo_name": "cloudcmd/deepword", "max_issues_repo_issues_event_min_datetime": "2018-08-31T13:56:47.000Z", "max_issues_repo_issues_event_max_datetime": "2018-10-01T12:30:37.000Z", "max_forks_repo_path": "client/api/set-mode.js", "max_forks_repo_name": "cloudcmd/deepword", "max_forks_repo_forks_event_min_datetime": "2017-03-24T19:56:26.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-17T15:35:33.000Z"}
{"max_stars_count": 27, "max_issues_count": 2, "max_forks_count": 3, "avg_line_length": 16.15, "max_line_length": 43, "alphanum_fraction": 0.560371517}
'use strict';

module.exports = function setMode(mode) {
    const {
        _monaco,
        _eddy,
    } = this;
    
    const {createModel} = _monaco.editor;
    
    const value = this.getValue();
    const model = createModel(value, mode);
    
    _eddy.setModel(model);
    _eddy.focus();
    
    return this;
};

