<commit_before>import elrUtlities from './elr-utilities';
const $ = require('jquery');

let elr = elrUtlities();

const elrFilterGrid = function(params) {
    const self = {};
    const spec = params || {};
    const gridClass = spec.gridClass || 'elr-flexible-grid';
    const $grid = $(`.${gridClass}`);

    const addListItems = function($items) {
        $grid.empty();
        $items.appendTo($grid);
    };

    const addFilterButtons = function(tags, $nav) {

        $.each(tags, function(k, v) {
            const $tagButton = $('<button></button>', {
                'class': 'elr-grid-filter',
                'text': elr.capitalize(v),
                'data-filter': v
            });

            $tagButton.appendTo($nav);
        });

        $nav.find('.elr-grid-filter').first().addClass('active');
    };<commit_msg>extend jQuery for non case sensitive contains<commit_after>import elrUtlities from './elr-utilities';
const $ = require('jquery');

let elr = elrUtlities();

$.extend($.expr[':'], {
    containsNC: function(elem, i, match) {
        return (elem.textContent || elem.innerText || '').toLowerCase().indexOf((match[3] || '').toLowerCase()) >= 0;
    }
});

const elrFilterGrid = function(params) {
    const self = {};
    const spec = params || {};
    const gridClass = spec.gridClass || 'elr-flexible-grid';
    const $grid = $(`.${gridClass}`);

    const addListItems = function($items) {
        $grid.empty();
        $items.appendTo($grid);
    };

    const addFilterButtons = function(tags, $nav) {

        $.each(tags, function(k, v) {
            const $tagButton = $('<button></button>', {
                'class': 'elr-grid-filter',
                'text': elr.capitalize(v),
                'data-filter': v
            });

            $tagButton.appendTo($nav);
        });

        $nav.find('.elr-grid-filter').first().addClass('active');
    };
{'fraction_non_alphanumeric': 0.18670886075949367, 'fraction_numerical': 0.0010548523206751054, 'mean_word_length': 2.3875, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, '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': '2201458', 'n_tokens_mistral': 590, 'n_tokens_neox': 580, 'n_words': 111}