<commit_before>'use strict';

// Node modules
const Extend = require('extend');
const Fs = require('fs');
const HttpCodes = require('http-codes');
const Moment = require('moment');
const Path = require('path');
const Striptags = require('striptags');

// Local modules
const DynamicImages = require(Path.join(__basedir, 'source/modules/dynamic_images.js'));
const Markdown = require(Path.join(__basedir, 'source/modules/markdown.js'));

const self = module.exports = {

  //
  // Renders a custom homepage.
  //
  customHomepage: (req, res, next) => {
    // Set custom homepage
    req.params.slug = req.app.locals.Settings.homepage;

    // Render it
    return self.view(req, res, next);
  },

  //
  // Renders a post.
  //
  //  slug* (string) - A post slug.
  //
  view: (req, res, next) => {
    const MakeUrl = require(Path.join(__basedir, 'source/modules/make_url.js'))(req.app.locals.Settings);
    const Settings = req.app.locals.Settings;
    const sequelize = req.app.locals.Database.sequelize;
    const models = sequelize.models;<commit_msg>Simplify settings var<commit_after>'use strict';

// Node modules
const Extend = require('extend');
const Fs = require('fs');
const HttpCodes = require('http-codes');
const Moment = require('moment');
const Path = require('path');
const Striptags = require('striptags');

// Local modules
const DynamicImages = require(Path.join(__basedir, 'source/modules/dynamic_images.js'));
const Markdown = require(Path.join(__basedir, 'source/modules/markdown.js'));

const self = module.exports = {

  //
  // Renders a custom homepage.
  //
  customHomepage: (req, res, next) => {
    // Set custom homepage
    req.params.slug = req.app.locals.Settings.homepage;

    // Render it
    return self.view(req, res, next);
  },

  //
  // Renders a post.
  //
  //  slug* (string) - A post slug.
  //
  view: (req, res, next) => {
    const Settings = req.app.locals.Settings;
    const MakeUrl = require(Path.join(__basedir, 'source/modules/make_url.js'))(Settings);
    const sequelize = req.app.locals.Database.sequelize;
    const models = sequelize.models;
{'fraction_non_alphanumeric': 0.15819477434679335, 'fraction_numerical': 0.0, 'mean_word_length': 3.51931330472103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6428869', 'n_tokens_mistral': 694, 'n_tokens_neox': 674, 'n_words': 159}