{"id":24163295,"url":"https://github.com/groobledierne/minecraft-protocol-chat-parser","last_synced_at":"2025-09-20T07:31:51.125Z","repository":{"id":56466399,"uuid":"260222283","full_name":"GroobleDierne/minecraft-protocol-chat-parser","owner":"GroobleDierne","description":"A small library to transform a string formatted by Minecraft into a JavaScript object ","archived":false,"fork":false,"pushed_at":"2020-11-05T18:33:10.000Z","size":52,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-04T03:43:41.911Z","etag":null,"topics":["hacktoberfest","javascript","minecraft","parser"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/GroobleDierne.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}},"created_at":"2020-04-30T13:41:50.000Z","updated_at":"2022-07-14T22:20:26.000Z","dependencies_parsed_at":"2022-08-15T19:20:18.240Z","dependency_job_id":null,"html_url":"https://github.com/GroobleDierne/minecraft-protocol-chat-parser","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/GroobleDierne/minecraft-protocol-chat-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GroobleDierne%2Fminecraft-protocol-chat-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GroobleDierne%2Fminecraft-protocol-chat-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GroobleDierne%2Fminecraft-protocol-chat-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GroobleDierne%2Fminecraft-protocol-chat-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GroobleDierne","download_url":"https://codeload.github.com/GroobleDierne/minecraft-protocol-chat-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GroobleDierne%2Fminecraft-protocol-chat-parser/sbom","scorecard":{"id":59547,"data":{"date":"2025-08-11","repo":{"name":"github.com/GroobleDierne/minecraft-protocol-chat-parser","commit":"bce4ba687107680a664e5f4fd9d2a34b69989e4a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T01:25:38.651Z","repository_id":56466399,"created_at":"2025-08-15T01:25:38.651Z","updated_at":"2025-08-15T01:25:38.651Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276064222,"owners_count":25578997,"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","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hacktoberfest","javascript","minecraft","parser"],"created_at":"2025-01-12T18:17:29.316Z","updated_at":"2025-09-20T07:31:50.897Z","avatar_url":"https://github.com/GroobleDierne.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minecraft-protocol-chat-parser\n[![npm version](https://badge.fury.io/js/minecraft-protocol-chat-parser.svg)](https://www.npmjs.com/package/minecraft-protocol-chat-parser)\n\nA small library to transform a string with Minecraft format character into a JavaScript object compatible with Minecraft's chat protocol\n\n## Functions\n\n### parseString(message: string, acceptAndChar?: boolean)\n\n```javascript\nconst parseString = require('minecraft-protocol-chat-parser')(735).parseString // replace 735 by the protocol number of the targeted minecraft version, 735 is 1.16\n\nconsole.log(parseString('§4Hello §bWorld'));\n```\nOutput\n```javascript\n{\n  text: 'Hello ',   \n  color: 'dark_red',\n  bold: false,      \n  italic: false,\n  underlined: false,\n  strikethrough: false,\n  obfuscated: false,\n  extra: [\n    {\n      text: 'World',\n      color: 'aqua',\n      bold: false,\n      italic: false,\n      underlined: false,\n      strikethrough: false,\n      obfuscated: false\n    }\n  ]\n}\n```\n### parseJSON(message: string | object, useAndChar?: boolean)\n\nVersion 2.0.0 include a partial support to parse a JSON chat protocol data into a string. It's only support formatting properties and will crash if the data contain hoverEvent, clickEvent or others properties who aren't used for text formatting.\n\n```javascript\nlet parsed = parseJSON({\n    text: \"Hello \",\n    extra: [\n        {\n            text: \"Grooble \",\n            color: \"black\",\n            bold: false,\n            italic: false,\n            underlined: false,\n            strikethrough: false,\n            obfuscated: false\n\n        },\n        {\n            text: \"How are u \",\n            color: \"dark_purple\",\n            bold: false,\n            italic: true,\n            underlined: true,\n            strikethrough: false,\n            obfuscated: false\n\n        },\n        {\n            text: \"?\",\n            color: \"yellow\",\n            bold: true,\n            italic: false,\n            underlined: false,\n            strikethrough: false,\n            obfuscated: false\n\n        }\n    ]\n})\n\nconsole.log(parsed);\n```\n\nOutput\n\n\u003e Hello §0Grooble §5§o§nHow are u §e§l?\n\nIf the argument `useAndChar` is set to true the `§` will be replaced by `\u0026` in the result string.\n\n### parseExtra(extra: string | object, useAndChar?: boolean)\n\nThe method `parseExtra(extra, useAndChar)` take only one extra not the full message.\n\nIf the argument `useAndChar` is set to true the `§` will be replaced by `\u0026` in the result string.\n\n## Variables\n\n### jsonCodes\n\n```javascript\n{\n    'bold': 'l',\n    'italic': 'o',\n    'underlined': 'n',\n    'strikethrough': 'm',\n    'obfuscated': 'k',\n    'black': '0',\n    'dark_blue': '1',\n    'dark_green': '2',\n    'dark_cyan': '3',\n    'dark_red': '4',\n    'dark_purple': '5',\n    'gold': '6',\n    'gray': '7',\n    'dark_gray': '8',\n    'blue': '9',\n    'green': 'a',\n    'aqua': 'b',\n    'red': 'c',\n    'light_purple': 'd',\n    'yellow': 'e',\n    'white': 'f'\n}\n```\n\n### stringCodes\n\n```javascript\n{\n    '0': 'black',\n    '1': 'dark_blue',\n    '2': 'dark_green',\n    '3': 'dark_cyan',\n    '4': 'dark_red',\n    '5': 'dark_purple',\n    '6': 'gold',\n    '7': 'gray',\n    '8': 'dark_gray',\n    '9': 'blue',\n    'a': 'green',\n    'b': 'aqua',\n    'c': 'red',\n    'd': 'light_purple',\n    'e': 'yellow',\n    'f': 'white',\n    'k': 'obfuscated',\n    'l': 'bold',\n    'm': 'strikethrough',\n    'n': 'underlined',\n    'o': 'italic',\n    'r': 'reset',\n    '\u0026': '\u0026',\n    '§': '\u0026'\n}\n```\n\n[More examples.](https://github.com/GroobleDierne/minecraft-protocol-chat-parser/blob/master/example.js)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroobledierne%2Fminecraft-protocol-chat-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroobledierne%2Fminecraft-protocol-chat-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroobledierne%2Fminecraft-protocol-chat-parser/lists"}