<commit_before>// Dependencies
var Url = require("url")
  , Fs  = require("fs")
  , Path = require("path")
  , Events = require("events")
  , Debug = require("bug-killer")
  , RegexpParser = require("regex-parser")
  , Mime = require("mime")
  ;

/**
 * Le Statique
 * -----------
 * Another Node.JS static server module.
 * Licensed under the MIT license. See the LICENSE file.
 *
 * Documentation can be found in README and on GitHub:
 * http://github.com/IonicaBizau/node-statique
 */
var Statique = module.exports = function (options) {
    var self = this;
    self._routes = {};
    self._regexpRoutes = [];
    return self.server(options);
};

/**
 * Sets the root of the public folder.
 *
 * @name server
 * @function
 * @param {Object} options an object containing the following fields:
 *  - root: string representing the absolute path to the public folder.
 *  - cache: the number of seconds of cache
 * @return {Object} Statique object
 */
Statique.prototype.server = function (options) {

    var self = this;

    if (typeof options === "string") {
        options = {
            root: options
        }
    }<commit_msg>Attach methods using bind<commit_after>// Dependencies
var Url = require("url")
  , Fs  = require("fs")
  , Path = require("path")
  , Events = require("events")
  , Debug = require("bug-killer")
  , RegexpParser = require("regex-parser")
  , Mime = require("mime")
  ;

/**
 * Le Statique
 * -----------
 * Another Node.JS static server module.
 * Licensed under the MIT license. See the LICENSE file.
 *
 * Documentation can be found in README and on GitHub:
 * http://github.com/IonicaBizau/node-statique
 */
var Statique = module.exports = function (options) {
    var self = this;
    self._routes = {};
    self._regexpRoutes = [];

    for (var foo in self) {
        if (typeof self[foo] !== "function") { continue; }
        self[foo] = self[foo].bind(self);
    }

    return self.server(options);
};

/**
 * Sets the root of the public folder.
 *
 * @name server
 * @function
 * @param {Object} options an object containing the following fields:
 *  - root: string representing the absolute path to the public folder.
 *  - cache: the number of seconds of cache
 * @return {Object} Statique object
 */
Statique.prototype.server = function (options) {

    var self = this;

    if (typeof options === "string") {
        options = {
            root: options
        }
    }
{'fraction_non_alphanumeric': 0.14002478314745972, 'fraction_numerical': 0.0, 'mean_word_length': 2.802197802197802, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2662615', 'n_tokens_mistral': 730, 'n_tokens_neox': 716, 'n_words': 231}