{"id":17242775,"url":"https://github.com/imcuttle/split-word","last_synced_at":"2025-04-14T03:25:44.466Z","repository":{"id":35206125,"uuid":"215485963","full_name":"imcuttle/split-word","owner":"imcuttle","description":"Splits words like Microsoft word with state machine","archived":false,"fork":false,"pushed_at":"2023-01-05T23:25:48.000Z","size":382,"stargazers_count":7,"open_issues_count":13,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T17:22:54.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/imcuttle.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}},"created_at":"2019-10-16T07:34:17.000Z","updated_at":"2023-10-12T15:12:36.000Z","dependencies_parsed_at":"2023-01-15T16:08:41.701Z","dependency_job_id":null,"html_url":"https://github.com/imcuttle/split-word","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/imcuttle%2Fsplit-word","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fsplit-word/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fsplit-word/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fsplit-word/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imcuttle","download_url":"https://codeload.github.com/imcuttle/split-word/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248814685,"owners_count":21165802,"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":[],"created_at":"2024-10-15T06:14:02.137Z","updated_at":"2025-04-14T03:25:44.446Z","avatar_url":"https://github.com/imcuttle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# split-word\n\n[![Build status](https://img.shields.io/travis/imcuttle/split-word/master.svg?style=flat-square)](https://travis-ci.org/imcuttle/split-word)\n[![Test coverage](https://img.shields.io/codecov/c/github/imcuttle/split-word.svg?style=flat-square)](https://codecov.io/github/imcuttle/split-word?branch=master)\n[![NPM version](https://img.shields.io/npm/v/split-word.svg?style=flat-square)](https://www.npmjs.com/package/split-word)\n[![NPM Downloads](https://img.shields.io/npm/dm/split-word.svg?style=flat-square\u0026maxAge=43200)](https://www.npmjs.com/package/split-word)\n[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://prettier.io/)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)\n\n\u003e Splits words like Microsoft word with state machine\n\n![](./split-word.svg)\n\n## Installation\n\n```bash\nnpm install split-word\n# or use yarn\nyarn add split-word\n```\n\n## Usage\n\n```javascript\nconst { wordChunks, wordCount, wordSlice } = require('split-word')\n\nwordCount('你好 hello world') // =\u003e 4\nwordChunks('你好 hello world') // =\u003e ['你', '好 ', 'hello ', 'world']\nwordSlice('你好 hello world', 0, 2) // =\u003e '你好 '\n```\n\n## Contributing\n\n- Fork it!\n- Create your new branch:  \n  `git checkout -b feature-new` or `git checkout -b fix-which-bug`\n- Start your magic work now\n- Make sure npm test passes\n- Commit your changes:  \n  `git commit -am 'feat: some description (close #123)'` or `git commit -am 'fix: some description (fix #123)'`\n- Push to the branch: `git push`\n- Submit a pull request :)\n\n## Authors\n\nThis library is written and maintained by imcuttle, \u003ca href=\"mailto:moyuyc95@gmail.com\"\u003emoyuyc95@gmail.com\u003c/a\u003e.\n\n## License\n\nMIT - [imcuttle](https://github.com/imcuttle) 🐟\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcuttle%2Fsplit-word","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimcuttle%2Fsplit-word","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcuttle%2Fsplit-word/lists"}