{"name":"widest-line","version":"5.0.0","description":"Get the visual width of the widest line in a string - the number of columns required to display it","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/widest-line.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"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"],"dependencies":{"string-width":"^7.0.0"},"devDependencies":{"ava":"^5.3.1","tsd":"^0.29.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"7561d2ccece1e5d880120a93cfdfb1b7fa63eeab","bugs":{"url":"https://github.com/sindresorhus/widest-line/issues"},"homepage":"https://github.com/sindresorhus/widest-line#readme","_id":"widest-line@5.0.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==","shasum":"b74826a1e480783345f0cd9061b49753c9da70d0","tarball":"http://registry-npm.ywwl.com/widest-line/download/widest-line-5.0.0.tgz","fileCount":5,"unpackedSize":3378,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAyA0mnLg0mBVQg6XRenLQzf6HqMe9VmQB0zYQgD7HqOAiEAlhfJ6tVVtmcE9qtY7TuqOkv8Qf91tMgReeSayhfx7f0="}],"size":1770,"noattachment":false,"key":"/widest-line/-/widest-line-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/widest-line_5.0.0_1698513592104_0.7027349395439526"},"_hasShrinkwrap":false,"readme":"# widest-line\n\n> Get the visual width of the widest line in 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](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.\n\nUseful to be able to know the maximum width a string will take up in the terminal.\n\n## Install\n\n```sh\nnpm install widest-line\n```\n\n## Usage\n\n```js\nimport widestLine from 'widest-line';\n\nwidestLine('古\\n\\u001B[1m@\\u001B[22m');\n//=> 2\n```\n\n## Related\n\n- [string-width](https://github.com/sindresorhus/string-width) - Get the visual width of a string\n","publish_time":1698513592392,"_cnpm_publish_time":1698513592392,"dist-tags":{"latest":"6.0.0"}}