<commit_before>let id_regex = /\b\d+(\.\d+){2}\b/;

var Utils = {
    get_object_id: (obj_id) => {
        let id_regex_res = id_regex.exec(obj_id);
        return id_regex_res ? Number.parseInt(id_regex_res[1]) : 0;
    },

    is_object_id: (obj_id) => {
        let match = id_regex.exec(obj_id);
        return (match !== null && obj_id.split(".").length === 3);
    },

    get_asset_precision: (precision) => {
        return Math.pow(10, precision);
    }

};

module.exports = Utils;<commit_msg>Add a method that returns the type of order from the order id<commit_after>import {object_type} from "chain/chain_types";
var opTypes = Object.keys(object_type);
console.log(opTypes);

let id_regex = /\b\d+(\.\d+){2}\b/;

var Utils = {
    get_object_id: (obj_id) => {
        let id_regex_res = id_regex.exec(obj_id);
        return id_regex_res ? Number.parseInt(id_regex_res[1]) : 0;
    },

    is_object_id: (obj_id) => {
        let match = id_regex.exec(obj_id);
        return (match !== null && obj_id.split(".").length === 3);
    },

    get_asset_precision: (precision) => {
        return Math.pow(10, precision);
    },

    order_type: (id) => {
        var type = id.split(".")[1];
        console.log("type:", type, opTypes[type]);
        return opTypes[type];
    }

};

module.exports = Utils;
{'fraction_non_alphanumeric': 0.17249240121580547, 'fraction_numerical': 0.009878419452887538, 'mean_word_length': 2.7844827586206895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '7183264', 'n_tokens_mistral': 493, 'n_tokens_neox': 474, 'n_words': 91}