<commit_before>/**
 * @fileOverview  jq-bridge 主要实现像jQuery一样的功能方法，可以替换成jQuery，
 * 这里只实现了此组件所需的部分。
 */
define( 'jq-bridge', [], function() {
    var doc = window.document,
        emptyArray = [],
        slice = emptyArray.slice,
        class2type = {},
        hasOwn = class2type.hasOwnProperty,
        toString = class2type.toString,
        rId = /^#(.*)$/;

    function each( obj, iterator ) {
        var i;

        // like array
        if ( typeof obj !== 'function' && typeof obj.length === 'number' ) {
            for ( i = 0; i < obj.length; i++ ) {
                if ( iterator.call( obj[ i ], i, obj[ i ] ) === false ) {
                    return obj;
                }
            }
        } else {
            for ( i in obj ) {
                if ( hasOwn.call( obj, i ) && iterator.call( obj[ i ], i,
                        obj[ i ] ) === false ) {
                    return obj;
                }
            }
        }

        return obj;
    }

    function extend( target, source, deep ) {
        each( source, function( key, val ) {
            if ( deep && typeof val === 'object' ) {
                typeof target[ key ] === 'object' || (target[ key ] = {});
                extend( target[ key ], val, deep );
            } else {
                target[ key ] = val;
            }
        } );
    }

    each( ('Boolean Number String Function Array Date RegExp Object' +
            ' Error').split( ' ' ), function( i, name ) {
        class2type[ '[object ' + name + ']' ] = name.toLowerCase();
    } );

    function setAttribute( node, name, value ) {
        value == null ? node.removeAttribute( name ) :
                node.setAttribute( name, value );
    }

    function camelize( str ) {
        return str.replace( /-+(.)?/g, function( match, chr ) {
            return chr ? chr.toUpperCase() : ''
        } );<commit_msg>解决extend一个bug<commit_after>/**
 * @fileOverview  jq-bridge 主要实现像jQuery一样的功能方法，可以替换成jQuery，
 * 这里只实现了此组件所需的部分。
 */
define( 'jq-bridge', [], function() {
    var doc = window.document,
        emptyArray = [],
        slice = emptyArray.slice,
        class2type = {},
        hasOwn = class2type.hasOwnProperty,
        toString = class2type.toString,
        rId = /^#(.*)$/;

    function each( obj, iterator ) {
        var i;

        // like array
        if ( typeof obj !== 'function' && typeof obj.length === 'number' ) {
            for ( i = 0; i < obj.length; i++ ) {
                if ( iterator.call( obj[ i ], i, obj[ i ] ) === false ) {
                    return obj;
                }
            }
        } else {
            for ( i in obj ) {
                if ( hasOwn.call( obj, i ) && iterator.call( obj[ i ], i,
                        obj[ i ] ) === false ) {
                    return obj;
                }
            }
        }

        return obj;
    }

    function extend( target, source, deep ) {
        each( source, function( key, val ) {
            if ( deep && typeof val === 'object' ) {
                if ( typeof target[ key ] !== 'object' ) {
                    target[ key ] = type( val ) === 'array' ? [] : {};
                }
                extend( target[ key ], val, deep );
            } else {
                target[ key ] = val;
            }
        } );
    }

    each( ('Boolean Number String Function Array Date RegExp Object' +
            ' Error').split( ' ' ), function( i, name ) {
        class2type[ '[object ' + name + ']' ] = name.toLowerCase();
    } );

    function setAttribute( node, name, value ) {
        value == null ? node.removeAttribute( name ) :
                node.setAttribute( name, value );
    }

    function camelize( str ) {
        return str.replace( /-+(.)?/g, function( match, chr ) {
            return chr ? chr.toUpperCase() : ''
        } );
{'fraction_non_alphanumeric': 0.14831284331676695, 'fraction_numerical': 0.0026157467957101752, 'mean_word_length': 1.3855271366188397, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3661197', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1116, 'n_words': 288}