{"id":26648088,"url":"https://github.com/SlimIO/wcwidth","last_synced_at":"2025-03-25T00:01:48.709Z","repository":{"id":45918190,"uuid":"198777204","full_name":"TopCli/wcwidth","owner":"TopCli","description":"Port of C's wcwidth() and wcswidth()","archived":false,"fork":true,"pushed_at":"2023-07-14T22:05:40.000Z","size":229,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-04T06:01:06.865Z","etag":null,"topics":["cli","stringlength","stringwidth","wcswidth","wcwidth"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"timoxley/wcwidth","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TopCli.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":"SECURITY.md","support":null}},"created_at":"2019-07-25T07:07:30.000Z","updated_at":"2024-08-04T06:01:06.866Z","dependencies_parsed_at":"2023-02-10T00:01:02.071Z","dependency_job_id":null,"html_url":"https://github.com/TopCli/wcwidth","commit_stats":null,"previous_names":["slimio/wcwidth"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TopCli%2Fwcwidth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TopCli%2Fwcwidth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TopCli%2Fwcwidth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TopCli%2Fwcwidth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TopCli","download_url":"https://codeload.github.com/TopCli/wcwidth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245372377,"owners_count":20604491,"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":["cli","stringlength","stringwidth","wcswidth","wcwidth"],"created_at":"2025-03-25T00:01:20.472Z","updated_at":"2025-03-25T00:01:48.624Z","avatar_url":"https://github.com/TopCli.png","language":"JavaScript","readme":"# wcwidth\n![version](https://img.shields.io/badge/dynamic/json.svg?style=for-the-badge\u0026url=https://raw.githubusercontent.com/TopCli/wcwidth/master/package.json\u0026query=$.version\u0026label=Version)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=for-the-badge)](https://github.com/TopCli/wcwidth/commit-activity)\n[![mit](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://github.com/TopCli/wcwidth/blob/master/LICENSE)\n[![OpenSSF\nScorecard](https://api.securityscorecards.dev/projects/github.com/TopCli/wcwidth/badge?style=for-the-badge)](https://api.securityscorecards.dev/projects/github.com/TopCli/wcwidth)\n![build](https://img.shields.io/github/actions/workflow/status/TopCli/wcwidth/node.js.yml?style=for-the-badge)\n\nDetermine columns needed for a fixed-size wide-character string\n\n\u003e wcwidth is a simple JavaScript port of [wcwidth](http://man7.org/linux/man-pages/man3/wcswidth.3.html) implemented in C by Markus Kuhn.\n\u003e\n\u003e JavaScript port [originally](https://github.com/mycoboco/wcwidth.js) written by Woong Jun \u003cwoong.jun@gmail.com\u003e (http://code.woong.org/)\n\n## Why\n\nThis package is a fork of [wcwidth](https://github.com/timoxley/wcwidth#readme).\n\n- Drop old Node.js version support.\n- Drop useless `defaults` package wich introduce an indirect dependencies.\n- Cleanup npm tarball (only ship required files).\n\n## Requirements\n- [Node.js](https://nodejs.org/en/) v14 or higher\n\n## Getting Started\n\nThis package is available in the Node Package Repository and can be easily installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) or [yarn](https://yarnpkg.com).\n\n```bash\n$ npm i @topcli/wcwidth\n# or\n$ yarn add @topcli/wcwidth\n```\n\n## Usage example\n\n```js\nimport wcwidth from \"@topcli/wcwidth\";\n\n'한'.length    // =\u003e 1\nwcwidth('한');   // =\u003e 2\n\n'한글'.length    // =\u003e 2\nwcwidth('한글'); // =\u003e 4\n```\n\n`wcwidth()` and its string version, `wcswidth()` are defined by IEEE Std\n1002.1-2001, a.k.a. POSIX.1-2001, and return the number of columns used\nto represent the given wide character and string.\n\nMarkus's implementation assumes the wide character given to those\nfunctions to be encoded in ISO 10646, which is almost true for\nJavaScript's characters.\n\n[Further explaination here](https://github.com/timoxley/wcwidth/tree/master/docs)\n\n## API\nTBC\n\n## Contributors ✨\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.linkedin.com/in/thomas-gentilhomme/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4438263?v=4?s=100\" width=\"100px;\" alt=\"Gentilhomme\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGentilhomme\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/TopCli/wcwidth/commits?author=fraxken\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/TopCli/wcwidth/commits?author=fraxken\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/TopCli/wcwidth/pulls?q=is%3Apr+reviewed-by%3Afraxken\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"#security-fraxken\" title=\"Security\"\u003e🛡️\u003c/a\u003e \u003ca href=\"https://github.com/TopCli/wcwidth/issues?q=author%3Afraxken\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/PierreDemailly\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/39910767?v=4?s=100\" width=\"100px;\" alt=\"PierreDemailly\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ePierreDemailly\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/TopCli/wcwidth/commits?author=PierreDemailly\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/TopCli/wcwidth/issues?q=author%3APierreDemailly\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## License\nMIT\n","funding_links":[],"categories":["Packages"],"sub_categories":["CLI (TTY etc..)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSlimIO%2Fwcwidth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSlimIO%2Fwcwidth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSlimIO%2Fwcwidth/lists"}