{"maintainers":[{"email":"i.am.qix@gmail.com","name":"qix"},{"email":"ben@npmjs.com","name":"bcoe"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"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"],"dist-tags":{"latest":"3.0.1","next":"2.1.0-candidate"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"description":"Wordwrap a string with ANSI escape codes","readme":"# wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master)\n\n> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles)\n\n\n## Install\n\n```\n$ npm install wrap-ansi\n```\n\n\n## Usage\n\n```js\nconst chalk = require('chalk');\nconst wrapAnsi = require('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\n## API\n\n### wrapAnsi(input, columns, [options])\n\nWrap words to the specified column width.\n\n#### input\n\nType: `string`\n\nString with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk).\n\n#### columns\n\nType: `number`\n\nNumber of columns to wrap the text to.\n\n#### options\n\nType: `Object`\n\n##### hard\n\nType: `boolean`<br>\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`<br>\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`<br>\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\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\n\n## Maintainers\n\n- [Sindre Sorhus](https://github.com/sindresorhus)\n- [Josh Junon](https://github.com/qix-)\n- [Benjamin Coe](https://github.com/bcoe)\n\n\n## License\n\nMIT\n","repository":{"type":"git","url":"git+https://github.com/chalk/wrap-ansi.git"},"users":{"scottfreecode":true,"penglu":true,"michaelyurin":true},"bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"license":"MIT","versions":{"0.1.0":{"name":"wrap-ansi","version":"0.1.0","description":"Wordwrap a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"https://github.com/chalk/wrap-ansi"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"maintainers":[{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},{"name":"Joshua Appelman","email":"jappelman@xebia.com","url":"jbnicolai.com"},{"name":"JD Ballard","email":"i.am.qix@gmail.com","url":"github.com/qix-"}],"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && node test.js"},"files":["index.js"],"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":{"splice-string":"^1.0.0"},"devDependencies":{"ava":"0.0.4","chalk":"^1.1.0","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"52d7c57e230b90797129efa0bdf939a942ca1747","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi","_id":"wrap-ansi@0.1.0","_shasum":"8eefd8f9cd51946fdd8167db4287def2b6450edd","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8eefd8f9cd51946fdd8167db4287def2b6450edd","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/wrap-ansi/-/wrap-ansi-0.1.0.tgz"},"directories":{}},"0.2.0":{"name":"wrap-ansi","version":"0.2.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"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"},{"name":"jbnicolai","email":"jappelman@xebia.com"}],"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && node test.js"},"files":["index.js"],"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":{"splice-string":"^1.0.0"},"devDependencies":{"ava":"0.0.4","chalk":"^1.1.0","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"4ce39165471dda82264cf1b125a3473eafb256dc","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi#readme","_id":"wrap-ansi@0.2.0","_shasum":"d479162c9f93cc95eb09c5bd6256a305d4194c50","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d479162c9f93cc95eb09c5bd6256a305d4194c50","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/wrap-ansi/-/wrap-ansi-0.2.0.tgz"},"directories":{}},"0.3.0":{"name":"wrap-ansi","version":"0.3.0","description":"Wordwrap a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"https://github.com/chalk/wrap-ansi"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"},{"name":"jbnicolai","email":"jappelman@xebia.com"}],"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc node test.js","coverage":"nyc --reporter=text-lcov node test.js | coveralls"},"files":["index.js"],"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":{"string-width":"^1.0.1"},"devDependencies":{"ava":"0.0.4","chalk":"^1.1.0","coveralls":"^2.11.4","nyc":"^3.2.2","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"c2c16800cd58b603f98a00fd1958b3c88b837ec0","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi","_id":"wrap-ansi@0.3.0","_shasum":"8b6f065943dac7aae11640f7b65e2b4f3bc6375a","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8b6f065943dac7aae11640f7b65e2b4f3bc6375a","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/wrap-ansi/-/wrap-ansi-0.3.0.tgz"},"directories":{}},"1.0.0":{"name":"wrap-ansi","version":"1.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"},"maintainers":[{"name":"bcoe","email":"ben@npmjs.com"},{"name":"jbnicolai","email":"jappelman@xebia.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc node test.js","coverage":"nyc --reporter=text-lcov node test.js | coveralls"},"files":["index.js"],"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":{"string-width":"^1.0.1"},"devDependencies":{"ava":"0.0.4","chalk":"^1.1.0","coveralls":"^2.11.4","has-ansi":"^2.0.0","nyc":"^3.2.2","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"c890e95ea671779012fa73fd77b74198e8c5d09b","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi#readme","_id":"wrap-ansi@1.0.0","_shasum":"f573bb9ee23cf43891f3362f5f359a1dfa38fc34","_from":".","_npmVersion":"3.3.6","_nodeVersion":"1.1.0","_npmUser":{"name":"bcoe","email":"bencoe@gmail.com"},"dist":{"shasum":"f573bb9ee23cf43891f3362f5f359a1dfa38fc34","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/wrap-ansi/-/wrap-ansi-1.0.0.tgz"},"directories":{}},"2.0.0":{"name":"wrap-ansi","version":"2.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"},"maintainers":[{"name":"bcoe","email":"ben@npmjs.com"},{"name":"dthree","email":"threedeecee@gmail.com"},{"name":"jbnicolai","email":"jappelman@xebia.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc node test.js","coverage":"nyc --reporter=text-lcov node test.js | coveralls"},"files":["index.js"],"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":{"string-width":"^1.0.1"},"devDependencies":{"ava":"0.0.4","chalk":"^1.1.0","coveralls":"^2.11.4","has-ansi":"^2.0.0","nyc":"^3.2.2","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"89e220072d4768ecd8c5d176ff50944d66ddcc2f","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi#readme","_id":"wrap-ansi@2.0.0","_shasum":"7d30f8f873f9a5bbc3a64dabc8d177e071ae426f","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.2.0","_npmUser":{"name":"dthree","email":"threedeecee@gmail.com"},"dist":{"shasum":"7d30f8f873f9a5bbc3a64dabc8d177e071ae426f","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/wrap-ansi/-/wrap-ansi-2.0.0.tgz"},"directories":{}},"2.1.0-candidate":{"name":"wrap-ansi","version":"2.1.0-candidate","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"},"maintainers":[{"name":"bcoe","email":"ben@npmjs.com"},{"name":"dthree","email":"threedeecee@gmail.com"},{"name":"qix","email":"i.am.qix@gmail.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc ava","coveralls":"nyc report --reporter=text-lcov | coveralls"},"files":["index.js"],"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":{"string-width":"^1.0.1","strip-ansi":"^3.0.1"},"devDependencies":{"ava":"*","chalk":"^1.1.0","coveralls":"^2.11.4","has-ansi":"^2.0.0","nyc":"^6.2.1","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"ff0335d8123106efa3d6f6da5637c8a6c763ebe0","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi#readme","_id":"wrap-ansi@2.1.0-candidate","_shasum":"774ecb66c894d931899a8204d22ae990d098c3e8","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"bcoe","email":"ben@npmjs.com"},"dist":{"shasum":"774ecb66c894d931899a8204d22ae990d098c3e8","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/wrap-ansi/-/wrap-ansi-2.1.0-candidate.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/wrap-ansi-2.1.0-candidate.tgz_1478241256104_0.632478907937184"},"directories":{}},"2.1.0":{"name":"wrap-ansi","version":"2.1.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"},"maintainers":[{"name":"bcoe","email":"ben@npmjs.com"},{"name":"dthree","email":"threedeecee@gmail.com"},{"name":"qix","email":"i.am.qix@gmail.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc ava","coveralls":"nyc report --reporter=text-lcov | coveralls"},"files":["index.js"],"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":{"string-width":"^1.0.1","strip-ansi":"^3.0.1"},"devDependencies":{"ava":"^0.16.0","chalk":"^1.1.0","coveralls":"^2.11.4","has-ansi":"^2.0.0","nyc":"^6.2.1","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"a731af5a3461d92f2af302e81e05ea698a3c8c1a","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi#readme","_id":"wrap-ansi@2.1.0","_shasum":"d8fc3d284dd05794fe84973caecdd1cf824fdd85","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d8fc3d284dd05794fe84973caecdd1cf824fdd85","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/wrap-ansi/-/wrap-ansi-2.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/wrap-ansi-2.1.0.tgz_1480440082575_0.23112521297298372"},"directories":{}},"3.0.0":{"name":"wrap-ansi","version":"3.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":">=4"},"scripts":{"test":"xo && nyc ava","coveralls":"nyc report --reporter=text-lcov | coveralls"},"files":["index.js"],"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":{"string-width":"^2.1.1","strip-ansi":"^4.0.0"},"devDependencies":{"ava":"^0.21.0","chalk":"^2.0.1","coveralls":"^2.11.4","has-ansi":"^3.0.0","nyc":"^11.0.3","strip-ansi":"^4.0.0","xo":"^0.18.2"},"gitHead":"c0b4bfd24b6cc852b343cc712a3e5607c61fb511","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi#readme","_id":"wrap-ansi@3.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-+l/sP6sHBT8XklwVWSF0//49Nrz5ZuM5R7TTHpXQr2AY3Zjbm5Y+7Gr2ErB/2zxcqVhXG3C8vC9nLLSHRDoLKA==","shasum":"d357270e4a7278cf5335133b9a3cd5bb46c0ea7d","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/wrap-ansi/-/wrap-ansi-3.0.0.tgz"},"maintainers":[{"email":"i.am.qix@gmail.com","name":"qix"},{"email":"ben@npmjs.com","name":"bcoe"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wrap-ansi-3.0.0.tgz_1500809267145_0.8778855202253908"},"directories":{}},"3.0.1":{"name":"wrap-ansi","version":"3.0.1","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":">=4"},"scripts":{"test":"xo && nyc ava","coveralls":"nyc report --reporter=text-lcov | coveralls"},"files":["index.js"],"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":{"string-width":"^2.1.1","strip-ansi":"^4.0.0"},"devDependencies":{"ava":"^0.21.0","chalk":"^2.0.1","coveralls":"^2.11.4","has-ansi":"^3.0.0","nyc":"^11.0.3","strip-ansi":"^4.0.0","xo":"^0.18.2"},"gitHead":"165504b9d6a88f5b1295df6afccc16592ed6fb80","bugs":{"url":"https://github.com/chalk/wrap-ansi/issues"},"homepage":"https://github.com/chalk/wrap-ansi#readme","_id":"wrap-ansi@3.0.1","_shasum":"288a04d87eda5c286e060dfe8f135ce8d007f8ba","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"288a04d87eda5c286e060dfe8f135ce8d007f8ba","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/wrap-ansi/-/wrap-ansi-3.0.1.tgz"},"maintainers":[{"email":"i.am.qix@gmail.com","name":"qix"},{"email":"ben@npmjs.com","name":"bcoe"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wrap-ansi-3.0.1.tgz_1500839932578_0.0051989073399454355"},"directories":{}}},"name":"wrap-ansi","time":{"modified":"2017-07-23T19:58:53.494Z","created":"2015-08-19T18:56:22.141Z","0.1.0":"2015-08-19T18:56:22.141Z","0.2.0":"2015-08-28T07:07:49.929Z","0.3.0":"2015-10-10T14:31:14.973Z","1.0.0":"2015-10-13T05:08:13.341Z","2.0.0":"2015-12-01T17:27:23.410Z","2.1.0-candidate":"2016-11-04T06:34:16.631Z","2.1.0":"2016-11-29T17:21:24.416Z","3.0.0":"2017-07-23T11:27:48.128Z","3.0.1":"2017-07-23T19:58:53.494Z"},"readmeFilename":"readme.md","homepage":"https://github.com/chalk/wrap-ansi#readme"}