<commit_before>define([
    'views/list'
], function(ListView) {
    var NodeList = ListView.extend({

        single_select: true,

        initialize: function(options) {
            ListView.prototype.initialize.apply(this, arguments);
            this.items = options.graphModel.get('nodes');
        },

        selectItem: function(item, evt){
            ListView.prototype.selectItem.apply(this, arguments);
            item.editing(!item.editing());
        },

        clearSelection: function(){
            ListView.prototype.clearSelection.apply(this, arguments);
            this.items().forEach(function(item){
                item.editing(false);
            }, this);
        },

    });
    return NodeList;
});
<commit_msg>implement filter function to search on name, data type, and ontology class<commit_after>define([
    'views/list'
], function(ListView) {
    var NodeList = ListView.extend({

        single_select: true,
        filter_function: function(newValue){
            var filter = this.filter().toLowerCase();
            this.items().forEach(function(item){
                item.filtered(true);
                if(item.name().toLowerCase().indexOf(filter) !== -1 ||
                   item.datatype().toLowerCase().indexOf(filter) !== -1 ||
                   item.ontologyclass.toLowerCase().indexOf(filter) !== -1){
                    item.filtered(false);
                }
            }, this);
        },

        initialize: function(options) {
            ListView.prototype.initialize.apply(this, arguments);
            this.items = options.graphModel.get('nodes');
        },

        selectItem: function(item, evt){
            ListView.prototype.selectItem.apply(this, arguments);
            item.editing(!item.editing());
        },

        clearSelection: function(){
            ListView.prototype.clearSelection.apply(this, arguments);
            this.items().forEach(function(item){
                item.editing(false);
            }, this);
        },

    });
    return NodeList;
});

{'fraction_non_alphanumeric': 0.13636363636363635, 'fraction_numerical': 0.001466275659824047, 'mean_word_length': 1.9926900584795322, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1081175', 'n_tokens_mistral': 533, 'n_tokens_neox': 514, 'n_words': 84}