{ "_id": "widest-line", "_rev": "6-98d4009a5ac4b4eb6b0a512831d28a61", "name": "widest-line", "description": "Get the visual width of the widest line in a string - the number of columns required to display it", "dist-tags": { "latest": "3.1.0" }, "versions": { "1.0.0": { "name": "widest-line", "version": "1.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": "https://github.com/sindresorhus/widest-line" }, "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": { "string-width": "^1.0.1" }, "devDependencies": { "ava": "*", "xo": "*" }, "gitHead": "8193ed602f6c06939099e574b92828edb896bb8e", "bugs": { "url": "https://github.com/sindresorhus/widest-line/issues" }, "homepage": "https://github.com/sindresorhus/widest-line", "_id": "widest-line@1.0.0", "_shasum": "0c09c85c2a94683d0d7eaf8ee097d564bf0e105c", "_from": ".", "_npmVersion": "2.14.7", "_nodeVersion": "4.2.1", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "shasum": "0c09c85c2a94683d0d7eaf8ee097d564bf0e105c", "tarball": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {} }, "2.0.0": { "name": "widest-line", "version": "2.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" }, "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": { "string-width": "^2.1.1" }, "devDependencies": { "ava": "*", "xo": "*" }, "gitHead": "af57e1e5eb6b7d8542eac408c64b7c34207d0d7e", "bugs": { "url": "https://github.com/sindresorhus/widest-line/issues" }, "homepage": "https://github.com/sindresorhus/widest-line#readme", "_id": "widest-line@2.0.0", "_shasum": "0142a4e8a243f8882c0233aa0e0281aa76152273", "_from": ".", "_npmVersion": "2.15.11", "_nodeVersion": "4.8.4", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "shasum": "0142a4e8a243f8882c0233aa0e0281aa76152273", "tarball": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/widest-line-2.0.0.tgz_1512075148854_0.25011543300934136" }, "directories": {} }, "2.0.1": { "name": "widest-line", "version": "2.0.1", "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" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=4" }, "scripts": { "test": "xo && ava" }, "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": { "string-width": "^2.1.1" }, "devDependencies": { "ava": "*", "xo": "*" }, "gitHead": "11fc92452ad77233a53cec179202a6c68e2b8ad3", "bugs": { "url": "https://github.com/sindresorhus/widest-line/issues" }, "homepage": "https://github.com/sindresorhus/widest-line#readme", "_id": "widest-line@2.0.1", "_npmVersion": "6.4.1", "_nodeVersion": "10.12.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", "shasum": "7438764730ec7ef4381ce4df82fb98a53142a3fc", "tarball": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", "fileCount": 4, "unpackedSize": 3159, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxiolCRA9TVsSAnZWagAAjAMQAJ6ujsqqctO6++0dwIuK\niSlfJEQIxGW+JsGdYRvdeKEjgz3/tZcv6dgvoBTa0jH8Ujq+oUdtg6gFVMUS\noIVe8tyX/c8QHhWrVhO4Q6eYKkGul3ssftEIT4cC+CkD1DlJXVyB47qV4FoJ\nyslyyOquu8Z/bo1dXnI/qm1DkAMEK/QG4nuwAdPR7qRMlF6HDQmmMxIllPn4\nFaxGtuJbQTXCCa9en++llzZ7iB1OX5Q6yJq6ETwQy7vZpWP9EiozHEhxq9O/\n0uB0quHwtkU5oaN3Z9eqzlpL+mtSj4n1iQlTYgdG3YoykszLqIh6cSFKNZ6U\nA/3rnM4phTLalLCgFIixmZVIFwlnLdpQQtexB67pbL6UaWa+CFfSi2dImeOf\no/PO9nlJ2DS0IMlifyVYlMGTp+PjIPujxCdL5NpGtFjvNSQ8u+6G+pI722bp\nBPVGJ9QI4JtxCxeDjeX3K7t7dXL2N98t3H5opb+boFWapwWuY5tD7c9tKoNT\npNKXOxwm2kgHhAsieKkPUQZ2Pmv+ABIy0cUwVpDazUNQ/gbcAc+4SzDdY9hF\nuOcc/VS4bi0lNYlY7PedaXey+RJDvXokxNZZ0CEX1NHe93oAW+c/SPqxLWzJ\n46vMD1onggq6e9qv8MHq5ArAivLCyH6Coa5QvPD5c5yAtCOr8fb9u6eC37Ja\nJEGO\r\n=oEsx\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/widest-line_2.0.1_1539713572686_0.18572373483175264" }, "_hasShrinkwrap": false }, "3.0.0": { "name": "widest-line", "version": "3.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" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=8" }, "scripts": { "test": "xo && ava && tsd-check" }, "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": "^4.0.0" }, "devDependencies": { "ava": "^1.3.1", "tsd-check": "^0.5.0", "xo": "^0.24.0" }, "gitHead": "7d5a88fc022524bd4593d8a4b143e16823125219", "bugs": { "url": "https://github.com/sindresorhus/widest-line/issues" }, "homepage": "https://github.com/sindresorhus/widest-line#readme", "_id": "widest-line@3.0.0", "_nodeVersion": "8.15.0", "_npmVersion": "6.9.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-Nnp08mP0T9qYxi6YZ9EqX5mhfQWGVO0q525bP8P2gtSmuDyfkfECfkH9J4LPK4w0F2IROlcMrFgYYcA8ckxltQ==", "shasum": "3cc9ab65c4d0382cf05909900f9aa50328eba947", "tarball": "https://registry.npmjs.org/widest-line/-/widest-line-3.0.0.tgz", "fileCount": 5, "unpackedSize": 3475, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcj1hFCRA9TVsSAnZWagAAmawP/19Znkw2yr07zJsDIOQA\n4C/ihlDw51F6Pu+8wyK2AEi/mLJKt8LxKRiUVM4jn6rKT+FmV9ythHghR+/s\nT3KIZfzhAs45w1NKdFeHQMh5glge07CJiuEopo01s7w8n+iMX55lsx84a5Pf\nio3tpwG3K4CpPipa4IaiDjQ2QxLdOBv4kmGFrLesjMbrBx9zy2bUQ0abzaiC\nQwGRnQAotUwiRqysvRqRRtJhc7PRZwIw+RBnu+NOrODE2bGylfL9a6kkZlgk\nlcuaBIMLtC6Tx79Y6XWG5gWDOGKbOyS391PN5mtGmXyoUVc1tcAxVWXe2yLS\nIOAzMqoC4hPF/D6Qy1JHBwqjQpNQkpjIIk5rpmooJKdrJP+D6/6lGAbQ8sGN\nqwyHz0PFgAAiRXm46QnOAQ8Ez7qXLN53m43qzNWXvkSZRxCfyYU04dAM0vNq\nhyC/cDmrZ1glpHbgvV2wCG21nrC4OYTZRwlh0vZ128YB+yJKYrsz92PGhMTe\nqopYJoMKTc6WinYNZ2z6fIxeOnvfNkKR4a49/sWGFNQZf1ANN05SLe7aYagv\n/GBLo5LE+1vjBkpWASdKSbPUTXflqh8/AhHdKZYd4VATvMIMcdb9GmwEuejU\nj1Z2rfsvbDxmQsSPneUxldO2ybV98IMzcY/g1ntGxGVuyTa8ZfNSLdeZGvuk\nJG8O\r\n=riN3\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/widest-line_3.0.0_1552898116695_0.8710302790281419" }, "_hasShrinkwrap": false }, "3.1.0": { "name": "widest-line", "version": "3.1.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" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=8" }, "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": "^4.0.0" }, "devDependencies": { "ava": "^1.4.1", "tsd": "^0.7.1", "xo": "^0.24.0" }, "gitHead": "694ebd1a633abfc4048a250b57e6c17d8531350b", "bugs": { "url": "https://github.com/sindresorhus/widest-line/issues" }, "homepage": "https://github.com/sindresorhus/widest-line#readme", "_id": "widest-line@3.1.0", "_nodeVersion": "8.15.0", "_npmVersion": "6.9.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "shasum": "8292333bbf66cb45ff0de1603b136b7ae1496eca", "tarball": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", "fileCount": 5, "unpackedSize": 3729, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoK9pCRA9TVsSAnZWagAAT0AQAJDd4hf1OkntfvRygxZN\nda46iI5FmgjWixDDxpSIf7hZ8khUHJOKreDs/dVwZIbQpieAwHpE4CQNHn+2\ntsN22pxwSYnqQ9k8LjlCYDbwV0HD8GBXWmwfIW7B5jl4tG5dhVs03yix5bGy\ns3prSi3qVEvGg74uyILi4k1rKyh4jofFDRVmd+QZhsDvVmlgllJyDMWS2n+g\npcXSEIEkyRrZEKOg3b1IvpE3DNJlN6DFKOTbaes9eU7pI35FQHgNdV8qxFRd\n5f/Q6gTYXezOojNCTHKFDq2YmNl3RJZ4N5UQBguWehD1zdkBZiOMImfckyXv\nGjxLdqmzWYeloXqylZ8VcvqR6n4Fjj04vyI5irXjOC4oXwRlyrg2eksWBwNz\nsUuVEnZ09iidAoII8PVo+NLhp1oIuzpgpNvnXwpQvWRiS+W+tTyi9x3VDiZy\n3oNW5IvqknO211gLA9gENHMeSOuGIK1+xgnH32xNvOcwScOh1eeK/0pZSagW\nJP+zi3nbgh/ikqze6dnea1fpPJMdqPaIPCP2Yt157KkombG8JbK9xXibDiLy\nPoXHqVP96DcUWVMpuD0ET/bjA2Qky2ljvUhHEQnr4yv3wvbS33Fl0oZTi50X\nrRSwdnEmIyvMDjSkvRPWArF7Kfl82lkpRwPkQKQF+m0mde518ab4ltS8k4Q9\nIutZ\r\n=q3JH\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/widest-line_3.1.0_1554034536536_0.28938338585391277" }, "_hasShrinkwrap": false } }, "readme": "# widest-line [![Build Status](https://travis-ci.org/sindresorhus/widest-line.svg?branch=master)](https://travis-ci.org/sindresorhus/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\n## Install\n\n```\n$ npm install widest-line\n```\n\n\n## Usage\n\n```js\nconst widestLine = require('widest-line');\n\nwidestLine('古\\n\\u001B[1m@\\u001B[22m');\n//=> 2\n```\n\n\n## Related\n\n- [string-width](https://github.com/sindresorhus/string-width) - Get the visual width of a string\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n", "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "time": { "modified": "2019-03-31T12:15:39.474Z", "created": "2015-11-04T11:31:15.944Z", "1.0.0": "2015-11-04T11:31:15.944Z", "2.0.0": "2017-11-30T20:52:29.986Z", "2.0.1": "2018-10-16T18:12:52.795Z", "3.0.0": "2019-03-18T08:35:16.856Z", "3.1.0": "2019-03-31T12:15:36.826Z" }, "homepage": "https://github.com/sindresorhus/widest-line#readme", "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" ], "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/widest-line.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/widest-line/issues" }, "license": "MIT", "readmeFilename": "readme.md", "users": { "scottfreecode": true } }