{"id":16302854,"url":"https://github.com/himenon/message-command-parser","last_synced_at":"2025-08-11T19:20:54.549Z","repository":{"id":38368866,"uuid":"500314495","full_name":"Himenon/message-command-parser","owner":"Himenon","description":"Parse space- and colon-separated messages into parameters","archived":false,"fork":false,"pushed_at":"2024-02-04T13:24:36.000Z","size":167,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-08T17:27:19.729Z","etag":null,"topics":["command-parser","message-parser","parser"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@himenon/message-command-parser","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/Himenon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-06-06T06:17:49.000Z","updated_at":"2024-02-04T12:29:33.000Z","dependencies_parsed_at":"2024-11-05T22:44:31.881Z","dependency_job_id":"b03d04b3-ab1b-46e8-9d4e-a9862e1677fa","html_url":"https://github.com/Himenon/message-command-parser","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":"Himenon/template-esm-js","purl":"pkg:github/Himenon/message-command-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Himenon%2Fmessage-command-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Himenon%2Fmessage-command-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Himenon%2Fmessage-command-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Himenon%2Fmessage-command-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Himenon","download_url":"https://codeload.github.com/Himenon/message-command-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Himenon%2Fmessage-command-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269941215,"owners_count":24500654,"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-11T02:00:10.019Z","response_time":75,"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":["command-parser","message-parser","parser"],"created_at":"2024-10-10T20:59:07.267Z","updated_at":"2025-08-11T19:20:54.504Z","avatar_url":"https://github.com/Himenon.png","language":"TypeScript","readme":"# @himenon/message-command-parser\n\n## Install\n\n```bash\n# One of:\nnpm  i   @himenon/message-command-parser\nyarn add @himenon/message-command-parser\npnpm add @himenon/message-command-parser\n```\n\n## Usage\n\n[Sample Code](./example/sample.ts) (`pnpm run test:sample`)\n\n```ts\nimport { Parser } from \"@himenon/message-command-parser\";\n\nconst messageParser = new Parser({\n  messageItems: [\n    {\n      command: \"ping\",\n      description: \"ping\",\n    },\n    {\n      command: \"get release tags:string[]\",\n      description: \"Get Release By Tags\",\n    },\n  ],\n});\n\nconst showParsedValue = (message: string) =\u003e {\n  const parsedValue = messageParser.parse(message);\n\n  if (parsedValue.kind === \"plain\") {\n    console.log({\n      message: parsedValue.message,\n    });\n  } else if (parsedValue.kind === \"command\") {\n    console.log({\n      action: parsedValue.action,\n      actionTargets: parsedValue.actionTargets,\n      parameters: parsedValue.parameters || {},\n    });\n  }\n};\n\nshowParsedValue(\"get release tags:v1.0.0,v1.1.0\");\n// {\n//   action: 'get',\n//   actionTargets: [ 'release' ],\n//   parameters: { tags: [ 'v1.0.0', 'v1.1.0' ] }\n// }\n\nshowParsedValue(\"ping\");\n// { action: 'ping', actionTargets: [], parameters: {} }\n\nshowParsedValue(\"unregistered command\");\n// { message: 'unregistered command' }\n```\n\n## Release\n\n- Automatic version updates are performed when merged into the `main` branch.\n\n## LICENCE\n\n[@Himenon/message-command-parser ](https://github.com/Himenon/message-command-parser)・MIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimenon%2Fmessage-command-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhimenon%2Fmessage-command-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimenon%2Fmessage-command-parser/lists"}