<commit_before>/*
 * Copyright (c) 2013, Yahoo! Inc.  All rights reserved.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE.txt file for terms.
 */

/*jslint nomen:true, node:true*/
/*global YUI*/

YUI.add('default-handler', function (Y, NAME) {

    var classify = Y.PN.util.classify;

    function DefaultHandler(name) {

        return function (req, res) {

            var ControllerClass = Y.Controllers[classify(name + '-controller')],
                ModelClass = Y.Models[classify(name + '-model')],
                controller,
                model,
                config,
                data;

            if (typeof window !== 'undefined') {
                data = Y.config.global.DATA[name];
            }

            if (ModelClass) {
                model = new ModelClass(data);
            } else {
                model = new Y.Models.DefaultModel(data);
            }

            config = Y.merge({}, req.params || {}, { name: name, model: model });
            if (ControllerClass) {
                controller = new ControllerClass(config);
            } else {
                controller = new Y.Controllers.DefaultController(config);
            }

            res.render(name, controller);

        };
    };

    Y.DefaultHandler = DefaultHandler;

}, '@VERSION', { requires: [
    'util'
]});<commit_msg>resolved conflicts<commit_after>/*
 * Copyright (c) 2013, Yahoo! Inc.  All rights reserved.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE.txt file for terms.
 */

/*jslint nomen:true, node:true*/
/*global YUI*/

YUI.add('default-handler', function (Y, NAME) {

    var classify = Y.PN.util.classify;

    function DefaultHandler(name) {

        return function (req, res) {

            var ControllerClass = Y.Controllers[classify(name + '-controller')],
                ModelClass = Y.Models[classify(name + '-model')],
                controller,
                model,
                config,
                data;

            if (typeof window !== 'undefined') {
                data = Y.config.global.DATA[name];
            }

            if (ModelClass) {
                model = new ModelClass(data);
            } else {
                model = new Y.Models.DefaultModel(data);
            }

            config = Y.merge({}, req.params || {}, { name: name, model: model });
            if (ControllerClass) {
                controller = new ControllerClass(config);
            } else {
                controller = new Y.Controllers.DefaultController(config);
            }

            res.render(name, controller);

        };
    }

    Y.DefaultHandler = DefaultHandler;

}, '@VERSION', { requires: [
    'util'
]});
{'fraction_non_alphanumeric': 0.12527392257121986, 'fraction_numerical': 0.0029218407596785976, 'mean_word_length': 1.7011834319526626, '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': '3615107', 'n_tokens_mistral': 762, 'n_tokens_neox': 711, 'n_words': 181}