{"id":16231501,"url":"https://github.com/hustcc/xmorse","last_synced_at":"2025-04-05T08:06:31.153Z","repository":{"id":15990891,"uuid":"79093663","full_name":"hustcc/xmorse","owner":"hustcc","description":":sun_with_face: ~1.5Kb morse code library for all. 一个支持 Unicode 中文摩斯密码编码的 Javascript 库。","archived":false,"fork":false,"pushed_at":"2022-06-05T06:45:27.000Z","size":27,"stargazers_count":323,"open_issues_count":2,"forks_count":63,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-29T07:05:58.077Z","etag":null,"topics":["chinese","decoding","encoding","javascript","morse","morse-code","unicode"],"latest_commit_sha":null,"homepage":"https://atool.vip/morse","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/hustcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://hust.cc","https://paypal.me/hustcc","https://atool.vip"]}},"created_at":"2017-01-16T07:27:51.000Z","updated_at":"2025-03-19T08:55:35.000Z","dependencies_parsed_at":"2022-09-15T18:40:40.557Z","dependency_job_id":null,"html_url":"https://github.com/hustcc/xmorse","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fxmorse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fxmorse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fxmorse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fxmorse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hustcc","download_url":"https://codeload.github.com/hustcc/xmorse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305933,"owners_count":20917208,"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":["chinese","decoding","encoding","javascript","morse","morse-code","unicode"],"created_at":"2024-10-10T13:05:47.155Z","updated_at":"2025-04-05T08:06:31.130Z","avatar_url":"https://github.com/hustcc.png","language":"TypeScript","readme":"# Xmorse\n\n\u003e **Xmorse** is a pure javascript(~1.5kb) library for encoding / decoding morse code messages, **unicode supported**.\n\n[中文说明文档](README_ZH.md) | [Online DEMO 地址](https://atool.vip/morse) \n\n[![Build Status](https://github.com/hustcc/xmorse/workflows/build/badge.svg)](https://github.com/hustcc/xmorse/actions)\n[![Coverage Status](https://coveralls.io/repos/github/hustcc/xmorse/badge.svg?branch=master)](https://coveralls.io/github/hustcc/xmorse?branch=master)\n[![npm](https://img.shields.io/npm/v/xmorse.svg)](https://www.npmjs.com/package/xmorse)\n[![npm](https://img.shields.io/npm/dm/xmorse.svg)](https://www.npmjs.com/package/xmorse)\n[![npm](https://img.shields.io/npm/l/xmorse.svg)](https://www.npmjs.com/package/xmorse)\n\n\n# 1. Install\n\n\u003e **npm install xmorse**\n\nOr download `dist/xmorse.min.js` source file。\n\n# 2. Import It\n\n - `Script` tag.\n\n```html\n\u003cscript type=\"text/javascript\" src=\"dist/xmorse.min.js\"\u003e\u003c/script\u003e\n```\n\n - `ES6` style.\n\n```ts\nimport { decode, encode } from 'xmorse';\n```\n\n\n# 3. Usage \u0026 API\n\nThere is only 2 API named `encode`, `decode`. For `encode(msg, [option])`, example:\n\n```ts\nimport { decode, encode } from 'xmorse';\n// standart morse\nencode('Hello, Xmorse!');\n  \n// unicode\nencode('コンニチハ, セカイ!');\nencode('越过长城，走向世界');\n\n// option\nconst option = {\n  space: ' ',\n  long: '-',\n  short: '*'\n};\nencode('越过长城，走向世界', option);\n```\n\nFor `decode(morse, [option])`, example:\n\n```ts\nimport { decode, encode } from 'xmorse';\ndecode('../.-../---/...-/./-.--/---/..-/-/---/---/--...-....-...-/-..---..-.-----/---..-...--...-/-..----.--.....');\n\n// option\nconst option = {\n  space: ' ',\n  long: '-',\n  short: '*'\n};\ndecode('*-** --- ***- *', option);\n```\n\n\n# 4. Test\n\n```bash\n$npm install\n\n$npm test\n```\n\n\n# 5. LICENSE\n\nMIT@[hustcc](https://github.com/hustcc)\n","funding_links":["https://hust.cc","https://paypal.me/hustcc","https://atool.vip"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Fxmorse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhustcc%2Fxmorse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Fxmorse/lists"}