<commit_before>/*
Selleck
Copyright (c) 2011 Yahoo! Inc.
Licensed under the BSD License.
*/

var util = require('../util'); // Selleck's util, not Node's util.

function View(data, templateName) {
    this.templateName = templateName;
    util.mix(this, data);

    if (this.examples) {
        this.examples.forEach(function (example) {
            // If the name of the current template matches the name of an
            // example, mix the example's metadata into the view.
            if (example.name === this.templateName) {
                this.example = true;
                util.mix(this, example);
            }
        }, this);
    }
}

View.prototype = {
    // -- Properties -----------------------------------------------------------

    /**
    @property toc
    **/
    toc: require('../higgins').TOC_PLACEHOLDER_TEXT,

    // -- Functions ------------------------------------------------------------<commit_msg>Add support for a metadata "pages" object, which is a name/value mapping of template names to metadata overrides for those pages.<commit_after>/*
Selleck
Copyright (c) 2011 Yahoo! Inc.
Licensed under the BSD License.
*/

var util = require('../util'); // Selleck's util, not Node's util.

function View(data, templateName) {
    this.templateName = templateName;
    util.mix(this, data);

    if (this.examples) {
        this.examples.forEach(function (example) {
            // If the name of the current template matches the name of an
            // example, mix the example's metadata into the view.
            if (example.name === this.templateName) {
                this.example = true;
                util.mix(this, example);
            }
        }, this);
    }

    if (this.pages) {
        // If the name of the current template matches the name of a page
        // with custom metadata, mix the page's metadata into the view.
        if (this.pages[this.templateName]) {
            util.mix(this, this.pages[this.templateName]);
        }
    }
}

View.prototype = {
    // -- Properties -----------------------------------------------------------

    /**
    @property toc
    **/
    toc: require('../higgins').TOC_PLACEHOLDER_TEXT,

    // -- Functions ------------------------------------------------------------
{'fraction_non_alphanumeric': 0.21419127368884971, 'fraction_numerical': 0.0035257822829440283, 'mean_word_length': 1.511061946902655, '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': '7511791', 'n_tokens_mistral': 615, 'n_tokens_neox': 576, 'n_words': 181}