<commit_before><commit_msg>created record tree view factory<commit_after>export default function(ngapp, xelib) {
    ngapp.service('recordTreeViewFactory', function() {
        let factory = this;

        this.releaseChildren = function(node) {
            node.children.forEach(function(child) {
                if (child.children) factory.releaseChildren(child);
                xelib.Release(child);
            });
        };

        this.destroy = function(view) {
            factory.releaseChildren(view.data.tree);
        };

        this.new = function() {
            return {
                name: 'recordTreeView',
                data: {
                    tabLabel: 'Record View',
                    tree: {}
                },
                destroy: factory.destroy
            }
        };
    });

    ngapp.run(function(viewFactory, recordTreeViewFactory) {
        viewFactory.registerView('recordTreeView', recordTreeViewFactory.new);
    });
};
{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.0, 'mean_word_length': 1.717877094972067, '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': '1443311', 'n_tokens_mistral': 251, 'n_tokens_neox': 238, 'n_words': 39}