<commit_before>var path = require('path'),
    static = require('serve-static');

module.exports = {
    setup: function (app, assetpath, options) {

        if (arguments.length === 2 && typeof assetpath === 'object') {
            options = assetpath;
            assetpath = '';
        }

        options = options || {};
        assetpath = assetpath || options.path || '/govuk-assets';

        app.use(assetpath, static(path.join(__dirname, './node_modules/govuk_template_mustache/assets'), options));
        app.use(function (req, res, next) {
            res.locals.govukAssetPath = assetpath + '/';
            res.locals.partials = res.locals.partials || {};
            res.locals.partials['govuk-template'] = path.resolve(__dirname, './govuk_template');
            next();
        });

    }
};<commit_msg>Bring code implementation in line with documentation<commit_after>var path = require('path'),
    servestatic = require('serve-static');

module.exports = {
    setup: function (app, options) {

        options = options || {};
        options.path = options.path || '/govuk-assets';

        app.use(options.path, servestatic(path.join(__dirname, './node_modules/govuk_template_mustache/assets'), options));
        app.use(function (req, res, next) {
            res.locals.govukAssetPath = options.path + '/';
            res.locals.partials = res.locals.partials || {};
            res.locals.partials['govuk-template'] = path.resolve(__dirname, './govuk_template');
            next();
        });

    }
};
{'fraction_non_alphanumeric': 0.15851272015655576, 'fraction_numerical': 0.0006523157208088715, 'mean_word_length': 2.550925925925926, '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': '6210559', 'n_tokens_mistral': 443, 'n_tokens_neox': 433, 'n_words': 79}