<commit_before>const _ = require('underscore');

module.exports = function layergroupTokenMiddleware(req, res, next) {
    // FIXME: Temporary hack to share data between middlewares. Express overrides req.params to
    // parse url params to an object and it's performed after matching path and controller.
    res.locals = {};
    _.extend(res.locals, req.params);

    next();
};
<commit_msg>fix function name and removing comments of localsMiddleware<commit_after>const _ = require('underscore');

module.exports = function localsMiddleware(req, res, next) {
    res.locals = {};
    _.extend(res.locals, req.params);

    next();
};

{'fraction_non_alphanumeric': 0.11773940345368916, 'fraction_numerical': 0.0, 'mean_word_length': 4.104, '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': '118610', 'n_tokens_mistral': 182, 'n_tokens_neox': 180, 'n_words': 55}