{"id":15669068,"url":"https://github.com/dcdunkan/pmodes","last_synced_at":"2025-06-17T10:38:19.085Z","repository":{"id":170375735,"uuid":"633346192","full_name":"dcdunkan/pmodes","owner":"dcdunkan","description":"TypeScript implementation of TDLib's functions and utilities related to text parsing and matching text entities.","archived":false,"fork":false,"pushed_at":"2024-06-29T18:08:35.000Z","size":738,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T02:22:02.721Z","etag":null,"topics":["tdlib"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcdunkan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-27T09:52:47.000Z","updated_at":"2024-06-29T18:08:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0ecf684-17e6-4216-9552-700fe30dd3fd","html_url":"https://github.com/dcdunkan/pmodes","commit_stats":null,"previous_names":["dcdunkan/pmodes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdunkan%2Fpmodes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdunkan%2Fpmodes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdunkan%2Fpmodes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdunkan%2Fpmodes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcdunkan","download_url":"https://codeload.github.com/dcdunkan/pmodes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252758449,"owners_count":21799849,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tdlib"],"created_at":"2024-10-03T14:21:22.025Z","updated_at":"2025-05-06T19:48:24.073Z","avatar_url":"https://github.com/dcdunkan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Parse Modes\n\n\u003csup\u003eSynced with [tdlib/td:7c3822d932](https://github.com/tdlib/td/tree/7c3822d932f96aeca2861b6ae0cb25eacb27136f).\u003c/sup\u003e\n\n\u003c/div\u003e\n\nA **work-in-progress** TypeScript implementation of [TDLib](https://github.com/tdlib/td)'s functions and utilities related to parsing text with several parse\nmodes and matching text entities.\n\nFew more methods are left to be implemented. But the tests are direclty ported from TDLib source without a change. And they seem to be passing. So, I'll take\nthat as a \"it works\"! I cannot assure you the quality of the implementation, as I'm **not** good at C++ (TDLib is written in C++). So, I probably have done few\nstupid things because I missed how C++ actually works.\n\n\u003cdetails\u003e\n  \u003csummary\u003eAnyway, thank you.\u003c/summary\u003e\n\n#### Here is what we currently have here.\n\nBut of course, they still might have a few bugs. If you ever encounter one please consider opening an issue.\n\n###### match.ts (td/telegram/MessageEntity.cpp)\n\n- match_mentions\n- match_bot_commands\n- match_hashtags\n- match_cashtags\n- match_media_timestamps\n- match_bank_card_numbers\n- is_url_unicode_symbol\n- is_url_path_symbol\n- match_tg_urls\n- is_protocol_symbol\n- is_user_data_symbol\n- is_domain_symbol\n- match_urls\n- is_valid_bank_card\n- is_email_address\n- is_common_tld\n- fix_url\n- get_valid_short_usernames\n- find_mentions\n- find_bot_commands\n- find_hashtags\n- find_cashtags\n- find_bank_card_numbers\n- find_tg_urls\n- find_urls\n- find_media_timestamps\n- text_length\n- get_type_priority\n- remove_empty_entities\n- sort_entities\n- check_is_sorted\n- check_non_intersecting\n- get_entity_type_mask\n- get_splittable_entities_mask\n- get_blockquote_entities_mask\n- get_continuous_entities_mask\n- get_pre_entities_mask\n- get_user_entities_mask\n- is_splittable_entity\n- is_blockquote_entity\n- is_continuous_entity\n- is_pre_entity\n- is_user_entity\n- is_hidden_data_entity\n- get_splittable_entity_type_index\n- are_entities_valid\n- remove_intersecting_entities\n- remove_entities_intersecting_blockquote\n- fix_entity_offsets\n- find_entities\n- find_media_timestamp_entities\n- merge_entities\n- is_plain_domain\n- get_first_url\n- parse_markdown\n- parse_markdown_v2\n- decode_html_entity\n- parse_html\n- get_formatted_text_object\n- find_text_url_entities_v3\n- clean_input_string_with_entities\n- remove_invalid_entities\n- split_entities\n- resplit_entities\n- merge_new_entities\n- fix_entities\n- fix_formatted_text\n- get_type_priority\n- MessageEntity\n- TextEntityObject\n- get_text_entities_object\n- message_entity_type_string\n- MessageEntityType\n\n###### random.ts (td/utils/Random.{h,cpp})\n\n- fast_uint32\n- fast_bool\n- fast(int, int)\n\n###### utilities.ts (from a lot of source files)\n\n- is_word_character\n- to_lower_begins_with\n- to_lower\n- split\n- full_split\n- begins_with\n- ends_with\n- is_space\n- is_alpha\n- is_alpha (from misc.h)\n- is_alnum\n- is_digit\n- is_alpha_digit\n- is_alpha_digit_or_underscore\n- is_alpha_digit_underscore_or_minus\n- is_hex_digit\n- hex_to_int\n- is_hashtag_letter\n- CHECK\n- LOG_CHECK\n- to_integer\n- get_to_integer_safe_error\n- to_integer_safe\n- replace_offending_characters\n- clean_input_string\n- trim\n- strip_empty_characters\n- is_empty_string\n\n###### unicode.ts (tdutils/td/utils/unicode.cpp)\n\n- UnicodeSimpleCategory\n- get_unicode_simple_category\n- binary_search_ranges\n- unicode_to_lower\n\n###### utf8.ts (tdutils/td/utils/utf8.cpp)\n\n- is_utf8_character_first_code_unit\n- utf8_length\n- utf8_utf16_length\n- prev_utf8_unsafe\n- next_utf8_unsafe\n- append_utf8_character\n- append_utf8_character_unsafe\n- utf8_to_lower\n- utf8_truncate\n- utf8_utf16_truncate\n- utf8_substr\n- utf8_utf16_substr\n- check_utf8\n\n###### Other stuff\n\n- CustomEmojiId\n- HttpUrl\n- HttpUrlProtocol\n- parse_url\n- IpAddress\n- parse_ipv6 (a compatible port from core-js)\n- LinkManager\n  - getLinkUserId\n  - getLinkCustomEmojiId\n  - getCheckedLink\n  - checkLinkImpl\n- UserId\n\n\u003e \\* Most likely too buggy.\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcdunkan%2Fpmodes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcdunkan%2Fpmodes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcdunkan%2Fpmodes/lists"}