{"size": 481, "ext": "js", "max_stars_repo_path": "packages/plugin-r/index.js", "max_stars_repo_name": "yoyosource/OctoLinker", "max_stars_repo_stars_event_min_datetime": "2018-01-14T01:32:14.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T18:50:50.000Z", "max_issues_repo_path": "packages/plugin-r/index.js", "max_issues_repo_name": "yoyosource/OctoLinker", "max_issues_repo_issues_event_min_datetime": "2018-01-14T21:27:51.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-29T04:00:03.000Z", "max_forks_repo_path": "packages/plugin-r/index.js", "max_forks_repo_name": "yoyosource/OctoLinker", "max_forks_repo_forks_event_min_datetime": "2018-01-23T13:19:24.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-12T14:48:06.000Z"}
{"max_stars_count": 2677, "max_issues_count": 470, "max_forks_count": 158, "avg_line_length": 19.24, "max_line_length": 64, "alphanum_fraction": 0.6216216216}
import {
  R_LIBRARY,
  R_NAMESPACE,
} from '@octolinker/helper-grammar-regex-collection';
import liveResolverQuery from '@octolinker/resolver-live-query';

export default {
  name: 'r',

  resolve(path, [target]) {
    return liveResolverQuery({ type: 'cran', target });
  },

  getPattern() {
    return {
      pathRegexes: [/\.R$/, /\.Rmd$/],
      githubClasses: ['type-r', 'highlight-source-r'],
    };
  },

  getLinkRegexes() {
    return [R_LIBRARY, R_NAMESPACE];
  },
};
