{"name":"string-width","version":"4.2.3","keywords":["string","character","unicode","width","visual","column","columns","fullwidth","full-width","full","ansi","escape","codes","cli","command-line","terminal","console","cjk","chinese","japanese","korean","fixed-width"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"string-width@4.2.3","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/string-width#readme","bugs":{"url":"https://github.com/sindresorhus/string-width/issues"},"dist":{"shasum":"269c7117d27b05ad2e536830a8ec895ef9c6d010","tarball":"https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz","fileCount":5,"integrity":"sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==","signatures":[{"sig":"MEUCIQCdE8iSHW3j8YsH6u/KbZmvj9DtpGTXHmhmmp6oeUG6/AIge8jaI1Qk/Z/GED/SrwJ+yNQAEzkZ28FrbwLFqeAqdSg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5161},"readme":"# string-width\n\n> Get the visual width of a string - the number of columns required to display it\n\nSome Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.\n\nUseful to be able to measure the actual width of command-line output.\n\n\n## Install\n\n```\n$ npm install string-width\n```\n\n\n## Usage\n\n```js\nconst stringWidth = require('string-width');\n\nstringWidth('a');\n//=> 1\n\nstringWidth('古');\n//=> 2\n\nstringWidth('\\u001B[1m古\\u001B[22m');\n//=> 2\n```\n\n\n## Related\n\n- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module\n- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string\n- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string\n\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-string-width?utm_source=npm-string-width&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","engines":{"node":">=8"},"gitHead":"e7a2755c834246c59a4cc5de9471bef2d531a6b1","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/string-width.git","type":"git"},"_npmVersion":"7.5.4","description":"Get the visual width of a string - the number of columns required to display it","directories":{},"_nodeVersion":"16.9.1","dependencies":{"strip-ansi":"^6.0.1","emoji-regex":"^8.0.0","is-fullwidth-code-point":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"xo":"^0.24.0","ava":"^1.4.1","tsd":"^0.7.1"},"_npmOperationalInternal":{"tmp":"tmp/string-width_4.2.3_1632417441184_0.9029691587206747","host":"s3://npm-registry-packages"},"_shasum":"269c7117d27b05ad2e536830a8ec895ef9c6d010","_resolved":"https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz","_from":"string-width@>=4.2.2 <5.0.0"}