<commit_before>/*global Harpy*/

Harpy.util = (function(){

    function getMimetype(type) {

        function is(str) {
            return type.indexOf(str) !== -1;
        }

        if(is("image")) {
            return "image";
        }
        if(is("html")) {
            return "html";
        }
        if(is("javascript")) {
            return "js";
        }
        if(is("css")) {
            return "css";
        }
        if(is("text")) {<commit_msg>handle error when null type<commit_after>/*global Harpy*/

Harpy.util = (function(){

    function getMimetype(type) {

        type = type || "";

        function is(str) {
            return type.indexOf(str) !== -1;
        }

        if(is("image")) {
            return "image";
        }
        if(is("html")) {
            return "html";
        }
        if(is("javascript")) {
            return "js";
        }
        if(is("css")) {
            return "css";
        }
        if(is("text")) {
{'fraction_non_alphanumeric': 0.16872427983539096, 'fraction_numerical': 0.00205761316872428, 'mean_word_length': 1.344578313253012, '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': '4710554', 'n_tokens_mistral': 297, 'n_tokens_neox': 289, 'n_words': 54}