{"name":"wrap-ansi","version":"6.0.0","description":"Wordwrap a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/wrap-ansi.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && nyc ava"},"keywords":["wrap","break","wordwrap","wordbreak","linewrap","ansi","styles","color","colour","colors","terminal","console","cli","string","tty","escape","formatting","rgb","256","shell","xterm","log","logging","command-line","text"],"dependencies":{"ansi-styles":"^4.0.0","string-width":"^4.1.0","strip-ansi":"^5.0.0"},"devDependencies":{"ava":"^2.1.0","chalk":"^2.4.2","coveralls":"^3.0.3","has-ansi":"^3.0.0","nyc":"^14.1.1","xo":"^0.24.0"},"gitHead":"7bcd854fb5ca90e5e8c4963a1398d46a306a4a66","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi#readme","_id":"wrap-ansi@6.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-8YwLklVkHe4QNpGFrK6Mxm+BaMY7da6C9GlDED3xs3XwThyJHSbVwg9qC4s1N8tBFcnM1S0s8I390RC6SgGe+g==","shasum":"47c7b7329e0b8000f5756b0693a861e357e4043e","tarball":"http://registry-npm.ywwl.com/wrap-ansi/download/wrap-ansi-6.0.0.tgz","fileCount":4,"unpackedSize":9427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/+h7CRA9TVsSAnZWagAAl/kP/Aqy8DXxlN3OZM9Jppbj\nXRHFNXUHANlhzAE+q1RyOADwAsEwFP+3Qyp1vkyLxBBE8AZsbscsb1S26ox5\nf01AjmNZkk14Ylu3jQOl8X+IBEXulRXAgCAnJlmIlzIrevAIN6FmtLXfG2oZ\n2CRFz3V/GEPFI+QU3eUOd+TSjRtuIKL6dUS0W5pYOZzubrRaXgSUMIYrtQV+\nlt/6KBrT8pikRuXPztk+QwbbIyAhFBz2CVE4el12qApohWx9Ox+W80eRCIGN\n6VAJdtwYIxIJ4cU8cbjDj1zKtoxUk8aqV3/+6UXdnpLOxPKmTdN2ocW/E3ZN\nYgT2FNngQ9sR7wxZKVlg85LSU2H1h5OvzTaaoPWIJ19x20MoSGHNR06dBPwd\nMxn54+vt8yDCWtEnsrnDT+7PcLVmQD4+M5AMNPyj06gZVlkkjQKfxc2eWBvH\nHufvAP3QFlTbpmSH0m9IEmik+X/Omuv9FojKrwl535XeGZLGMvLC3/wIROrZ\nH9fUX42GQX2vPR2kLxoP2XEEhzn404+7HoLsfjSoByXbMcHu+xbwBMMwycTw\nZJx8cuzuqOC34Lctt8cfxdMLmngEEyu7zzcwOQPp/CzrRqdoIyDdNieVcTC1\nb9XgNGcLpIjTdxJNzsHZEUXPUvKxRzP1hFuZ6UqWqeK3DUDnpwr0AxmjNu22\nA9kO\r\n=ZvPj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAyLMEYpyAT3mTt6L7BCfypHOZndX9hEQHIxusyMt9uvAiEApiLYvtyLxFjeqej/zeixUBiPIw+ypjKK7ja95+lFWHg="}],"size":3961,"noattachment":false,"key":"/wrap-ansi/-/wrap-ansi-6.0.0.tgz"},"maintainers":[{"email":"ben@npmjs.com","name":"bcoe"},{"email":"i.am.qix@gmail.com","name":"qix"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wrap-ansi_6.0.0_1560275066854_0.46827515320625523"},"_hasShrinkwrap":false,"readme":"# wrap-ansi\n\n> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles)\n\n## Install\n\n```sh\nnpm install wrap-ansi\n```\n\n## Usage\n\n```js\nimport chalk from 'chalk';\nimport wrapAnsi from 'wrap-ansi';\n\nconst input = 'The quick brown ' + chalk.red('fox jumped over ') +\n\t'the lazy ' + chalk.green('dog and then ran away with the unicorn.');\n\nconsole.log(wrapAnsi(input, 20));\n```\n\n<img width=\"331\" src=\"screenshot.png\">\n\n## API\n\n### wrapAnsi(string, columns, options?)\n\nWrap words to the specified column width.\n\n#### string\n\nType: `string`\n\nA string with ANSI escape codes, like one styled by [`chalk`](https://github.com/chalk/chalk).\n\nNewline characters will be normalized to `\\n`.\n\n#### columns\n\nType: `number`\n\nThe number of columns to wrap the text to.\n\n#### options\n\nType: `object`\n\n##### hard\n\nType: `boolean`\\\nDefault: `false`\n\nBy default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width.\n\n##### wordWrap\n\nType: `boolean`\\\nDefault: `true`\n\nBy default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary.\n\n##### trim\n\nType: `boolean`\\\nDefault: `true`\n\nWhitespace on all lines is removed by default. Set this option to `false` if you don't want to trim.\n\n## Related\n\n- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes\n- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal\n- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right\n- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures.\n","publish_time":1560275067001,"_cnpm_publish_time":1560275067001,"dist-tags":{"latest":"10.0.2","next":"2.1.0-candidate"}}