{"id":29429602,"url":"https://github.com/show-docs/markdown-code-block-meta","last_synced_at":"2025-08-12T02:36:05.994Z","repository":{"id":57747535,"uuid":"522833950","full_name":"show-docs/markdown-code-block-meta","owner":"show-docs","description":"A library to parse/stringify metadata of markdown code block","archived":false,"fork":false,"pushed_at":"2023-10-17T04:05:48.000Z","size":158,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T16:22:42.535Z","etag":null,"topics":["code-block","key-value","markdown","meta","metadata","pair","remark"],"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/show-docs.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}},"created_at":"2022-08-09T06:43:36.000Z","updated_at":"2023-12-05T03:02:15.000Z","dependencies_parsed_at":"2023-12-17T14:21:57.571Z","dependency_job_id":"3af211e2-c7e8-47f9-be96-20fc5ad42b51","html_url":"https://github.com/show-docs/markdown-code-block-meta","commit_stats":null,"previous_names":["nice-move/markdown-code-block-meta"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/show-docs/markdown-code-block-meta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/show-docs%2Fmarkdown-code-block-meta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/show-docs%2Fmarkdown-code-block-meta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/show-docs%2Fmarkdown-code-block-meta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/show-docs%2Fmarkdown-code-block-meta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/show-docs","download_url":"https://codeload.github.com/show-docs/markdown-code-block-meta/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/show-docs%2Fmarkdown-code-block-meta/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269990283,"owners_count":24508829,"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-08-12T02:00:09.011Z","response_time":80,"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":["code-block","key-value","markdown","meta","metadata","pair","remark"],"created_at":"2025-07-12T16:11:33.285Z","updated_at":"2025-08-12T02:36:05.969Z","avatar_url":"https://github.com/show-docs.png","language":"JavaScript","readme":"# markdown-code-block-meta\n\nA library to parse/stringify metadata of markdown code block.\n\n[![npm][npm-badge]][npm-url]\n[![github][github-badge]][github-url]\n![node][node-badge]\n\n[npm-url]: https://www.npmjs.com/package/markdown-code-block-meta\n[npm-badge]: https://img.shields.io/npm/v/markdown-code-block-meta.svg?style=flat-square\u0026logo=npm\n[github-url]: https://github.com/nice-move/markdown-code-block-meta\n[github-badge]: https://img.shields.io/npm/l/markdown-code-block-meta.svg?style=flat-square\u0026colorB=blue\u0026logo=github\n[node-badge]: https://img.shields.io/node/v/markdown-code-block-meta.svg?style=flat-square\u0026colorB=green\u0026logo=node.js\n\n## Installation\n\n```bash\nnpm install markdown-code-block-meta --save\n```\n\n## Usage\n\nParsing markdown with [remark](https://remark.js.org).\n\n````markdown\n```js title=\"Here is an example\"\n\n```\n````\n\nA Code block will turn into:\n\n```json\n{\n  \"lang\": \"js\",\n  \"meta\": \"title=\\\"Here is an example\\\"\"\n}\n```\n\nParsing metadata like this:\n\n```js\nimport { getValue, parse, stringify } from 'markdown-code-block-meta';\n\nconst input =\n  '-8=。是 ==0 ===f=5 =9 dd k=dsds op=\"s 7\" d-p=\"\" sss=`7 u-` rj= lp=\\' ds ds\\' t=\"`\"';\n\nconst result = parse(input);\n/* result = Map {\n  '-8' =\u003e '。是',\n  '==0' =\u003e undefined,\n  '===f=5' =\u003e undefined,\n  '=9' =\u003e undefined,\n  'dd' =\u003e undefined,\n  'k' =\u003e 'dsds',\n  'op' =\u003e '\"s 7\"',\n  'd-p' =\u003e '\"\"',\n  'sss' =\u003e '`7 u-`',\n  'rj=' =\u003e undefined,\n  'lp' =\u003e '\\' ds ds\\'',\n  't' =\u003e '\"`\"'\n} */\n\nstringify(result); // same as input\n\ngetValue('\"abc\"'); // abc\ngetValue('`abc`'); // abc\ngetValue(\"'abc'\"); // abc\n```\n\n## Related\n\n- [remark-code-example](https://github.com/nice-move/remark-code-example)\n- [remark-kroki](https://github.com/nice-move/remark-kroki)\n- [remark-docusaurus](https://github.com/nice-move/remark-docusaurus)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshow-docs%2Fmarkdown-code-block-meta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshow-docs%2Fmarkdown-code-block-meta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshow-docs%2Fmarkdown-code-block-meta/lists"}