"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.attrsFromEntries = void 0;
exports.tryCatch = tryCatch;
const attrsFromEntries = (tok) => {
    if (tok.attrs)
        return Object.fromEntries(tok.attrs);
    return {};
};
exports.attrsFromEntries = attrsFromEntries;
function tryCatch(fn) {
    try {
        const result = fn();
        return { success: true, result };
    }
    catch (error) {
        console.error(error);
        return { success: false, error };
    }
}
//# sourceMappingURL=helpers.js.map
