{"id":22305596,"url":"https://github.com/keenwon/string-break","last_synced_at":"2025-07-29T04:32:19.228Z","repository":{"id":22838799,"uuid":"97470175","full_name":"keenwon/string-break","owner":"keenwon","description":"Break string into lines according to visual width.","archived":false,"fork":false,"pushed_at":"2025-02-20T02:22:39.000Z","size":3123,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T08:09:51.835Z","etag":null,"topics":["break","chinese","cli","console","fixed-width","fullwidth","string","terminal"],"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/keenwon.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":"2017-07-17T11:45:26.000Z","updated_at":"2024-06-17T03:38:48.000Z","dependencies_parsed_at":"2023-01-13T22:18:51.209Z","dependency_job_id":null,"html_url":"https://github.com/keenwon/string-break","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/keenwon/string-break","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenwon%2Fstring-break","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenwon%2Fstring-break/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenwon%2Fstring-break/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenwon%2Fstring-break/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keenwon","download_url":"https://codeload.github.com/keenwon/string-break/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenwon%2Fstring-break/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267629244,"owners_count":24118179,"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-07-29T02:00:12.549Z","response_time":2574,"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":["break","chinese","cli","console","fixed-width","fullwidth","string","terminal"],"created_at":"2024-12-03T19:12:21.182Z","updated_at":"2025-07-29T04:32:18.926Z","avatar_url":"https://github.com/keenwon.png","language":"JavaScript","readme":"# String-Break\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][build-status-image]][build-status-url]\n[![npm download][download-image]][download-url]\n[![Coverage status][codecov-image]][codecov-url]\n\n![](./example/screenshot.gif)\n\nString-Break 是命令行字符串格式化工具，可以方便的将长字符串按照宽度分段。\n  \n特点:\n\n  - 支持中文，英文，中英文混排\n  - 英文不会被截断\n  - 标点不会出现在行首\n\n## Install\n\n```shell\nnpm install string-break --save\n```\n\n## Usage\n\n```js\nconst stringBreak = require('string-break');\nconst str = '远处海港传来阵阵船笛 我一直飘零到被你拣起 如今望著反映窗户玻璃 有个我陌生又熟悉';\n\nlet lines = stringBreak(str, 30);\n/**\n * lines: [ \n *   '远处海港传来阵阵船笛 我一直飘',\n *   '零到被你拣起 如今望著反映窗户',\n *   '玻璃 有个我陌生又熟悉'\n * ]\n */\n```\n\n## License\n\nMIT.\n\n[npm-image]: https://img.shields.io/npm/v/string-break.svg?maxAge=3600\n[npm-url]: https://www.npmjs.com/package/string-break\n[build-status-image]: https://github.com/keenwon/string-break/workflows/unittest/badge.svg\n[build-status-url]: https://github.com/keenwon/string-break/actions\n[download-image]: https://img.shields.io/npm/dm/string-break.svg?maxAge=3600\n[download-url]: https://npmjs.org/package/string-break\n[codecov-image]: https://img.shields.io/codecov/c/github/keenwon/string-break.svg?maxAge=3600\n[codecov-url]: https://codecov.io/gh/keenwon/string-break\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeenwon%2Fstring-break","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeenwon%2Fstring-break","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeenwon%2Fstring-break/lists"}