{"id":24395341,"url":"https://github.com/janispritzkau/mc-chat-format","last_synced_at":"2025-04-11T15:04:18.046Z","repository":{"id":57292974,"uuid":"200819407","full_name":"janispritzkau/mc-chat-format","owner":"janispritzkau","description":"Formats JSON chat components of Minecraft with the corresponding translation.","archived":false,"fork":false,"pushed_at":"2021-02-16T21:38:32.000Z","size":111,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T11:11:17.462Z","etag":null,"topics":["chat","format","formatting","json","minecraft","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janispritzkau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-06T09:24:40.000Z","updated_at":"2025-01-25T01:52:31.000Z","dependencies_parsed_at":"2022-08-27T12:21:10.004Z","dependency_job_id":null,"html_url":"https://github.com/janispritzkau/mc-chat-format","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janispritzkau%2Fmc-chat-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janispritzkau%2Fmc-chat-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janispritzkau%2Fmc-chat-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janispritzkau%2Fmc-chat-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janispritzkau","download_url":"https://codeload.github.com/janispritzkau/mc-chat-format/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429056,"owners_count":21101779,"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":["chat","format","formatting","json","minecraft","typescript"],"created_at":"2025-01-19T20:27:13.216Z","updated_at":"2025-04-11T15:04:18.010Z","avatar_url":"https://github.com/janispritzkau.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mc-chat-format\n\nTranslate and convert Minecraft's chat components into plain text or a string component.\n\n```js\nimport { format, convert, flatten } from \"mc-chat-format\"\n\nformat({\n    translate: \"death.attack.player.item\",\n    with: [\"jeb_\", \"Notch\", { translate: \"item.minecraft.wooden_shovel\" }]\n})\n// ⮡ 'jeb_ was slain by Notch using Wooden Shovel'\n\nflatten({ text: \"1 \", extra: [{ text: \"2\", extra: [{ text: \" 3\" }] }] })\n// ⮡ [ { text: '1 ' }, { text: '2' }, { text: ' 3' } ]\n\nconvert({\n    translate: \"block.minecraft.comparator\",\n    bold: true,\n    insertion: \"Test\"\n}, { stripNonText: true })\n// ⮡ { text: 'Redstone Comparator', bold: true }\n\nformat({\n    text: \"§bHello §cworld\",\n    bold: true\n}, { useAnsiCodes: true })\n// ⮡ '\\x1b[1m\\x1b[38;2;85;255;255mHello \\x1b[38;2;255;85;85mworld\\x1b[0m'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanispritzkau%2Fmc-chat-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanispritzkau%2Fmc-chat-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanispritzkau%2Fmc-chat-format/lists"}