<commit_before>var boom = {
    defaults: {
      loop: true,
      preload: 'metadata',
      volume: 100
    },
    sounds: [],
    sound: function( src, settings ) {
        var settings = settings || {},
            options = {
                preload: settings.preload || boom.defaults.preload,
                loop: settings.loop || boom.defaults.loop,
                volume: settings.volume || boom.defaults.volume  
            },
            events = [];
        this.sound = document.createElement( 'audio' );
        this.sound.setAttribute( 'src', src );
        this.sound.setAttribute( 'preload', options.preload );
        this.sound.setAttribute( 'loop', options.loop );

        boom.sounds.push( this );

        this.volume = options.volume;

        this.play = function() {
            this.sound.play();
            return this;
        }
        this.stop = function() {
            this.sound.currentTime = 0;
            this.sound.pause();
            return this;
        }
        this.pause = function() {
            this.sound.pause();
            return this;
        }
        this.jump = function( time ) {
            this.setTime( time );
            return this;
        }
        this.toggle = function( ) {
            if ( this.sound.paused ) {
                this.sound.play();
            } else {
                this.sound.pause();
            }
            return this;
        }
        this.setVolume = function( volume ) {
            if ( volume > 100 ) {<commit_msg>Enhance options management<commit_after>var boom = {
    defaults: {
        preload: 'metadata', // auto, metadata, none
        autoplay: false, // true, false
        loop: false, // true, false
        volume: 100
    },
    sounds: [],
    sound: function( src, settings ) {
        var settings = settings || {},
            options = {},
            events = [];
        
        for( var i in boom.defaults ) {
            options[ i ] = settings[ i ] || boom.defaults[ i ];
        }
        
        this.sound = document.createElement( 'audio' );
        this.sound.setAttribute( 'src', src );
        this.sound.setAttribute( 'preload', options.preload );
        this.volume = options.volume;
        
        if ( options.loop ) {
            this.sound.setAttribute( 'loop', true );
        }
        if ( options.autoplay ) {
            this.sound.setAttribute( 'autoplay', true );            
        }

        boom.sounds.push( this );
        
        this.play = function() {
            this.sound.play();
            return this;
        }
        this.stop = function() {
            this.sound.currentTime = 0;
            this.sound.pause();
            return this;
        }
        this.pause = function() {
            this.sound.pause();
            return this;
        }
        this.jump = function( time ) {
            this.setTime( time );
            return this;
        }
        this.toggle = function( ) {
            if ( this.sound.paused ) {
                this.sound.play();
            } else {
                this.sound.pause();
            }
            return this;
        }
        this.setVolume = function( volume ) {
            if ( volume > 100 ) {
{'fraction_non_alphanumeric': 0.12368257904525728, 'fraction_numerical': 0.0043397396156230625, 'mean_word_length': 1.283793347487615, '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': '6127526', 'n_tokens_mistral': 869, 'n_tokens_neox': 850, 'n_words': 186}