<commit_before>/**
 * Creates a route
 * @constructor
 * @param {string} method - The route method (ie. GET)
 * @param {string} path - The route path (ie. /myapi/v1/something/awesome)
 * @param {string} controller - The path to the controller (ie. controllers/something)
 * @param {string} target - The controller function (ie. .awesome). if null; the controller is called directly
 */
module.exports = function Route(method, path, controller, target) {
  this.method = method
  this.path = path
  this.controller = controller
  this.target = target
 
  /**
   * mounts this route on the provided router
   * @param {express.Router} router 
   */
  this.mount = (router) => {
    /**
     * load the controller
     * @type {Object|Function}
     */
    var controller = require(this.controller)

    // if there is a target method, check to see if it exists and replace the original controller with it<commit_msg>Modified the parser so that the route path and method are case insensitive<commit_after>/**
 * Creates a route
 * @constructor
 * @param {string} method - The route method (ie. GET)
 * @param {string} path - The route path (ie. /myapi/v1/something/awesome)
 * @param {string} controller - The path to the controller (ie. controllers/something)
 * @param {string} target - The controller function (ie. .awesome). if null; the controller is called directly
 */
module.exports = function Route(method, path, controller, target) {
  this.method = method.toLocaleLowerCase();
  this.path = path.toLocaleLowerCase();
  this.controller = controller
  this.target = target
 
  /**
   * mounts this route on the provided router
   * @param {express.Router} router 
   */
  this.mount = (router) => {
    /**
     * load the controller
     * @type {Object|Function}
     */
    var controller = require(this.controller)

    // if there is a target method, check to see if it exists and replace the original controller with it
{'fraction_non_alphanumeric': 0.1108234075608493, 'fraction_numerical': 0.0010357327809425167, 'mean_word_length': 3.2838137472283813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3456556', 'n_tokens_mistral': 538, 'n_tokens_neox': 526, 'n_words': 209}