{"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"keywords":["string","str","character","char","unicode","width","visual","column","columns","fullwidth","full-width","full","ansi","escape","codes","cli","command-line","terminal","console","cjk","chinese","japanese","korean","fixed-width"],"dist-tags":{"latest":"2.1.1"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"description":"Get the visual width of a string - the number of columns required to display it","readme":"# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/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('古');\n//=> 2\n\nstringWidth('\\u001b[1m古\\u001b[22m');\n//=> 2\n\nstringWidth('a');\n//=> 1\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## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","repository":{"type":"git","url":"git+https://github.com/sindresorhus/string-width.git"},"users":{"vsemozhetbyt":true,"scottfreecode":true,"shrimpseaweed":true},"bugs":{"url":"https://github.com/sindresorhus/string-width/issues"},"license":"MIT","versions":{"1.0.0":{"name":"string-width","version":"1.0.0","description":"Get the visual width of a string - the number of columns required to display it","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/string-width"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["string","str","character","char","unicode","width","visual","column","columns","fullwidth","full-width","full","ansi","escape","codes","cli","command-line","terminal","console","cjk","chinese","japanese","korean","fixed-width"],"dependencies":{"code-point-at":"^1.0.0","is-fullwidth-code-point":"^1.0.0","strip-ansi":"^3.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"4bbfa2814ce7411a12f2dea7395316606b9d2c39","bugs":{"url":"https://github.com/sindresorhus/string-width/issues"},"homepage":"https://github.com/sindresorhus/string-width","_id":"string-width@1.0.0","_shasum":"facc17cd1dc81311b6ef9014eb7ffa4e89858f3b","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"facc17cd1dc81311b6ef9014eb7ffa4e89858f3b","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/string-width/-/string-width-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.0.1":{"name":"string-width","version":"1.0.1","description":"Get the visual width of a string - the number of columns required to display it","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/string-width"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["string","str","character","char","unicode","width","visual","column","columns","fullwidth","full-width","full","ansi","escape","codes","cli","command-line","terminal","console","cjk","chinese","japanese","korean","fixed-width"],"dependencies":{"code-point-at":"^1.0.0","is-fullwidth-code-point":"^1.0.0","strip-ansi":"^3.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"f279cfd14835f0a3c8df69ba18e9a3960156e135","bugs":{"url":"https://github.com/sindresorhus/string-width/issues"},"homepage":"https://github.com/sindresorhus/string-width","_id":"string-width@1.0.1","_shasum":"c92129b6f1d7f52acf9af424a26e3864a05ceb0a","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c92129b6f1d7f52acf9af424a26e3864a05ceb0a","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/string-width/-/string-width-1.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.0.2":{"name":"string-width","version":"1.0.2","description":"Get the visual width of a string - the number of columns required to display it","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/string-width.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["string","str","character","char","unicode","width","visual","column","columns","fullwidth","full-width","full","ansi","escape","codes","cli","command-line","terminal","console","cjk","chinese","japanese","korean","fixed-width"],"dependencies":{"code-point-at":"^1.0.0","is-fullwidth-code-point":"^1.0.0","strip-ansi":"^3.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"282cf3d53918a92cc3ee0778dcf938039bcbc47b","bugs":{"url":"https://github.com/sindresorhus/string-width/issues"},"homepage":"https://github.com/sindresorhus/string-width#readme","_id":"string-width@1.0.2","_shasum":"118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/string-width/-/string-width-1.0.2.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/string-width-1.0.2.tgz_1471188233009_0.6573935742489994"},"directories":{}},"2.0.0":{"name":"string-width","version":"2.0.0","description":"Get the visual width of a string - the number of columns required to display it","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/string-width.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["string","str","character","char","unicode","width","visual","column","columns","fullwidth","full-width","full","ansi","escape","codes","cli","command-line","terminal","console","cjk","chinese","japanese","korean","fixed-width"],"dependencies":{"is-fullwidth-code-point":"^2.0.0","strip-ansi":"^3.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"523d7ba4dbb24d40cde88d2c36bb1c7124ab6f82","bugs":{"url":"https://github.com/sindresorhus/string-width/issues"},"homepage":"https://github.com/sindresorhus/string-width#readme","_id":"string-width@2.0.0","_shasum":"635c5436cc72a6e0c387ceca278d4e2eec52687e","_from":".","_npmVersion":"3.10.7","_nodeVersion":"4.5.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"635c5436cc72a6e0c387ceca278d4e2eec52687e","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/string-width/-/string-width-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/string-width-2.0.0.tgz_1474527284011_0.7386264291126281"},"directories":{}},"2.1.0":{"name":"string-width","version":"2.1.0","description":"Get the visual width of a string - the number of columns required to display it","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/string-width.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["string","str","character","char","unicode","width","visual","column","columns","fullwidth","full-width","full","ansi","escape","codes","cli","command-line","terminal","console","cjk","chinese","japanese","korean","fixed-width"],"dependencies":{"is-fullwidth-code-point":"^2.0.0","strip-ansi":"^4.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"175b26f4cd503d6236b5ea2a1664263b56f1e352","bugs":{"url":"https://github.com/sindresorhus/string-width/issues"},"homepage":"https://github.com/sindresorhus/string-width#readme","_id":"string-width@2.1.0","_shasum":"030664561fc146c9423ec7d978fe2457437fe6d0","_from":".","_npmVersion":"4.6.1","_nodeVersion":"8.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"030664561fc146c9423ec7d978fe2457437fe6d0","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/string-width/-/string-width-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-width-2.1.0.tgz_1498493708563_0.051171303959563375"},"directories":{}},"2.1.1":{"name":"string-width","version":"2.1.1","description":"Get the visual width of a string - the number of columns required to display it","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/string-width.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["string","str","character","char","unicode","width","visual","column","columns","fullwidth","full-width","full","ansi","escape","codes","cli","command-line","terminal","console","cjk","chinese","japanese","korean","fixed-width"],"dependencies":{"is-fullwidth-code-point":"^2.0.0","strip-ansi":"^4.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"74d8d552b465692790c41169b123409669d41079","bugs":{"url":"https://github.com/sindresorhus/string-width/issues"},"homepage":"https://github.com/sindresorhus/string-width#readme","_id":"string-width@2.1.1","_npmVersion":"5.0.0","_nodeVersion":"8.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==","shasum":"ab93f27a8dc13d28cac815c462143a6d9012ae9e","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/string-width/-/string-width-2.1.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-width-2.1.1.tgz_1500376154382_0.7171604454051703"},"directories":{}}},"name":"string-width","time":{"modified":"2017-07-18T11:09:15.295Z","created":"2015-07-16T22:08:17.757Z","1.0.0":"2015-07-16T22:08:17.757Z","1.0.1":"2015-07-20T01:31:09.758Z","1.0.2":"2016-08-14T15:23:54.869Z","2.0.0":"2016-09-22T06:54:45.828Z","2.1.0":"2017-06-26T16:15:09.531Z","2.1.1":"2017-07-18T11:09:15.295Z"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/string-width#readme"}