<commit_before>var postcss = require('postcss');

var plugin = postcss.plugin('postcss-selector-prefix', function (prefix) {
    return function (root) {
        root.eachRule(function (rule) {
            rule.selectors = rule.selectors.map(function(selector) {
                if (selector.includes(prefix)) {
                    return selector;
                }
                else if (selector === 'body' || selector === 'html'){
                    return prefix;
                }
                else {
                    return prefix + ' ' + selector;
                }
            });
        });
    };
});

module.exports = plugin;
<commit_msg>fixed TypeError: Object has no method 'includes'<commit_after>var postcss = require('postcss');

var plugin = postcss.plugin('postcss-selector-prefix', function (prefix) {
    return function (root) {
        root.eachRule(function (rule) {
            rule.selectors = rule.selectors.map(function(selector) {
                if (selector.indexOf(prefix) !== -1) {
                    return selector;
                }
                else if (selector === 'body' || selector === 'html'){
                    return prefix;
                }
                else {
                    return prefix + ' ' + selector;
                }
            });
        });
    };
});

module.exports = plugin;

{'fraction_non_alphanumeric': 0.12564290962527552, 'fraction_numerical': 0.0007347538574577516, 'mean_word_length': 1.4584837545126355, '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': '5020118', 'n_tokens_mistral': 351, 'n_tokens_neox': 332, 'n_words': 73}