<commit_before>/*
 * isAtRuleSupported
 * Feature test CSS at-rule support
 * @param {String} rule
 * @return {Boolean|Undefined}
 */

(function(win){
    'use strict'; 

    var CSSRule = win.CSSRule, 
    prefixes = ['MOZ_', 'WEBKIT_', 'O_', 'MS_', ''], 
    atRe = /^@/,
    support, 
    length;

    win.isAtRuleSupported = function(rule){
        // If the `CSSRule` interface doesn't exist, return undefined
        if(!win.CSSRule){
            return undefined;
        }
        support = false;
        // Convert the rule string to a form compatible with the `CSSRule` type constants: 
        // https://wiki.csswg.org/spec/cssom-constants#cssruletype-enumeration
        rule = rule.replace(atRe, '').toUpperCase().split('-').join('_') + '_RULE';
        length = prefixes.length;
        while(!support && length--){
            // Starting with the unprefixed version, iterate over all the vendor
            // prefixes to determine browser support
            support = (prefixes[length] + rule) in CSSRule;
        }
        return support;
    };<commit_msg>Give name to anonymous function<commit_after>/*
 * isAtRuleSupported
 * Feature test CSS at-rule support
 * @param {String} rule
 * @return {Boolean|Undefined}
 */

(function(win){
    'use strict'; 

    var CSSRule = win.CSSRule, 
    prefixes = ['MOZ_', 'WEBKIT_', 'O_', 'MS_', ''], 
    atRe = /^@/,
    support, 
    length;

    win.isAtRuleSupported = function isAtRuleSupported(rule){
        // If the `CSSRule` interface doesn't exist, return undefined
        if(!win.CSSRule){
            return undefined;
        }
        support = false;
        // Convert the rule string to a form compatible with the `CSSRule` type constants: 
        // https://wiki.csswg.org/spec/cssom-constants#cssruletype-enumeration
        rule = rule.replace(atRe, '').toUpperCase().split('-').join('_') + '_RULE';
        length = prefixes.length;
        while(!support && length--){
            // Starting with the unprefixed version, iterate over all the vendor
            // prefixes to determine browser support
            support = (prefixes[length] + rule) in CSSRule;
        }
        return support;
    };
{'fraction_non_alphanumeric': 0.13138686131386862, 'fraction_numerical': 0.0, 'mean_word_length': 2.3429878048780486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4637794', 'n_tokens_mistral': 654, 'n_tokens_neox': 628, 'n_words': 175}