<commit_before>/*
 * This file is a fallback to the narrow.js in our starterkits.
 * The size classes (.four, .five, ...) are used by the layout.less file
 *
 * This file can be overriden by any derivates (starterkits).
 */
function checkNarrow(){
    var size = {
        threetwo: 320,
        four: 400,
        five: 500,
        six: 600,
        sixfive: 650,
        seven: 700,
        sevensome: 768,
        eightfive: 850,
        nine: 900,
        tablet: 480,
        desktop: 1024,
        wide: 1350,
        large: 1600
    };
    jQuery.each(size, function(cls, size) {
        if (jQuery(window).width() >= size) {
            jQuery('body').addClass(cls);
        } else {
            jQuery('body').removeClass(cls);
        }
    });
}

jQuery(window).resize(checkNarrow);
jQuery(window).ready(checkNarrow);
<commit_msg>narrow.js performance and style improvements<commit_after>/*
 * This file is a fallback to the narrow.js in our starterkits.
 * The size classes (.four, .five, ...) are used by the layout.less file
 *
 * This file can be overriden by any derivates (starterkits).
 */
(function($, w) {
    var size = {
        threetwo: 320,
        four: 400,
        five: 500,
        six: 600,
        sixfive: 650,
        seven: 700,
        sevensome: 768,
        eightfive: 850,
        nine: 900,
        tablet: 480,
        desktop: 1024,
        wide: 1350,
        large: 1600
    },
    $window = $(w),
    $body = $('body');

    function checkNarrow() {
        var classString = '',
        width = $window.width();

        $.each(size, function(cls, size) {
            if (width >= size) {
                classString = classString + ' ' + cls;
            } else {
                $body.removeClass(cls);
            }
        });

        $body.addClass(classString);
    }

    $window.resize(checkNarrow);
    $window.ready(checkNarrow);
}(jQuery, this));


{'fraction_non_alphanumeric': 0.13162034609334033, 'fraction_numerical': 0.04404824331410592, 'mean_word_length': 1.8266666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6394826', 'n_tokens_mistral': 672, 'n_tokens_neox': 576, 'n_words': 165}