<commit_before>// module Routing

exports.hashChanged = function(handler) {
    return function() {
        var getHash = function() {
            return document.location.href.split('#').splice(1).join('#');
        };
        var oldHash = '';
        handler('')(getHash())();
        window.addEventListener('hashchange', function(ev) {
            var newHash = getHash();
            handler(oldHash)(newHash)();
            oldHash = newHash;
        });
    };
};

exports.decodeURIComponent = window.decodeURIComponent;<commit_msg>window/global<commit_after>// module Routing

exports.hashChanged = function(handler) {
    return function() {
        var getHash = function() {
            return document.location.href.split('#').splice(1).join('#');
        };
        var oldHash = '';
        handler('')(getHash())();
        window.addEventListener('hashchange', function(ev) {
            var newHash = getHash();
            handler(oldHash)(newHash)();
            oldHash = newHash;
        });
    };
};

exports.decodeURIComponent = function(str) {
    if (typeof window !== "undefined") {
        return window.decodeURIComponent(str);
    } else {
        return global.decodeURIComponent(str);
    }
};
{'fraction_non_alphanumeric': 0.15579119086460033, 'fraction_numerical': 0.0016313213703099511, 'mean_word_length': 2.417827298050139, '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': '6149926', 'n_tokens_mistral': 331, 'n_tokens_neox': 339, 'n_words': 58}