<commit_before>﻿class TypeConverter {
    key: string;
    name: string;
    
    constructor(key: string, name: string) {
        this.key = key;
        this.name = name;
    }
    
    convertFrom(val: string | string[], queryString = false): any {
        return null;
    }

    convertTo(val: any): { val: string, queryStringVal?: string[] } {
        return null;
    }
    
    static getName(obj: any) {
        var fullName = typeof obj;
        var subName: string;
        if (Object.prototype.toString.call(obj) === '[object Array]') {
            var arr: any[] = obj;
            subName = 'string';
            for (var i = 0; i < arr.length; i++) {
                if (arr[i] != null && arr[i].toString()) {
                    subName = typeof arr[i];
                    break;
                }
            }
            fullName = subName + 'array';
        }
        return fullName;
    }
}<commit_msg>Used toString.call for all type lookups<commit_after>﻿class TypeConverter {
    key: string;
    name: string;
    
    constructor(key: string, name: string) {
        this.key = key;
        this.name = name;
    }
    
    convertFrom(val: string | string[], queryString = false): any {
        return null;
    }

    convertTo(val: any): { val: string, queryStringVal?: string[] } {
        return null;
    }
    
    static getName(obj: any) {
        var fullName: string = Object.prototype.toString.call(obj);
        fullName = fullName.substring(8, fullName.length - 1).toLowerCase();
        if (fullName === 'array') {
            var arr: any[] = obj;
            var subName = 'string';
            for (var i = 0; i < arr.length; i++) {
                if (arr[i] != null && arr[i].toString()) {
                    subName = typeof arr[i];
                    break;
                }
            }
            fullName = subName + fullName;
        }
        return fullName;
    }
}
{'fraction_non_alphanumeric': 0.1292834890965732, 'fraction_numerical': 0.0020768431983385254, 'mean_word_length': 1.5625, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1073279', 'n_tokens_mistral': 569, 'n_tokens_neox': 559, 'n_words': 146}