<commit_before>/*
 * grunt-banner
 * https://github.com/mattstyles/grunt-banner
 *
 * Copyright (c) 2014 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function ( grunt ) {

    // Please see the Grunt documentation for more information regarding task
    // creation: http://gruntjs.com/creating-tasks

    grunt.registerMultiTask( 'usebanner', 'Adds a banner or a footer to a file', function () {
        // Set up defaults for the options hash
        var options = this.options({
            position: 'top',
            banner: '',
            linebreak: true,
            process: false
        });

        if ( options.position !== 'top' && options.position !== 'bottom' ) {
            options.position = 'top';
        }

        var re = null;

        if ( options.pattern ) {
            re = new RegExp(options.pattern);
        }

        var linebreak = options.linebreak ? grunt.util.linefeed : '';

        // Iterate over the list of files and add the banner or footer
        this.files.forEach( function ( file ) {
            file.src.forEach( function ( src ) {
                if ( grunt.file.isFile( src ) ) {

                    var fileContents = grunt.file.read( src );

                    if ( re && !re.test(fileContents) ) {
                        return;
                    }

                    if ( typeof options.process === 'function' ) {
                        options.banner = options.process( src );
                    }

                    grunt.file.write( src,
                        options.position === 'top' ? options.banner + linebreak + fileContents : fileContents + linebreak + options.banner
                    );

                    grunt.verbose.writeln( 'Banner added to file ' + src.cyan );
                }

            });
        });

        grunt.log.writeln( '✔'.magenta + ' grunt-banner completed successfully' );

    });

};
<commit_msg>Switch to `u221A` for the OK character.<commit_after>/*
 * grunt-banner
 * https://github.com/mattstyles/grunt-banner
 *
 * Copyright (c) 2014 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function ( grunt ) {

    // Please see the Grunt documentation for more information regarding task
    // creation: http://gruntjs.com/creating-tasks

    grunt.registerMultiTask( 'usebanner', 'Adds a banner or a footer to a file', function () {
        // Set up defaults for the options hash
        var options = this.options({
            position: 'top',
            banner: '',
            linebreak: true,
            process: false
        });

        if ( options.position !== 'top' && options.position !== 'bottom' ) {
            options.position = 'top';
        }

        var re = null;

        if ( options.pattern ) {
            re = new RegExp(options.pattern);
        }

        var linebreak = options.linebreak ? grunt.util.linefeed : '';

        // Iterate over the list of files and add the banner or footer
        this.files.forEach( function ( file ) {
            file.src.forEach( function ( src ) {
                if ( grunt.file.isFile( src ) ) {

                    var fileContents = grunt.file.read( src );

                    if ( re && !re.test(fileContents) ) {
                        return;
                    }

                    if ( typeof options.process === 'function' ) {
                        options.banner = options.process( src );
                    }

                    grunt.file.write( src,
                        options.position === 'top' ? options.banner + linebreak + fileContents : fileContents + linebreak + options.banner
                    );

                    grunt.verbose.writeln( 'Banner added to file ' + src.cyan );
                }

            });
        });

        grunt.log.writeln( '\u221A'.magenta + ' grunt-banner completed successfully' );

    });

};

{'fraction_non_alphanumeric': 0.1166709216236916, 'fraction_numerical': 0.0035741639009446006, 'mean_word_length': 1.509929532351057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4509768', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1016, 'n_words': 274}