{"maintainers":[{"email":"i.am.qix@gmail.com","name":"qix"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"keywords":["slice","string","ansi","styles","color","colour","colors","terminal","console","cli","tty","escape","formatting","rgb","256","shell","xterm","log","logging","command-line","text"],"dist-tags":{"latest":"1.0.0"},"author":{"name":"David Caccavella","email":"threedeecee@gmail.com"},"description":"Slice a string with ANSI escape codes","readme":"# slice-ansi [![Build Status](https://travis-ci.org/chalk/slice-ansi.svg?branch=master)](https://travis-ci.org/chalk/slice-ansi) [![XO: Linted](https://img.shields.io/badge/xo-linted-blue.svg)](https://github.com/sindresorhus/xo)\n\n> Slice 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 slice-ansi\n```\n\n\n## Usage\n\n```js\nconst chalk = require('chalk');\nconst sliceAnsi = require('slice-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(sliceAnsi(input, 20, 30));\n```\n\n\n## API\n\n### sliceAnsi(input, beginSlice, [endSlice])\n\n#### input\n\nType: `string`\n\nString with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk).\n\n#### beginSlice\n\nType: `number`\n\nZero-based index at which to begin the slice.\n\n#### endSlice\n\nType: `number`\n\nZero-based index at which to end the slice.\n\n\n## Related\n\n- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap 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\n\n## Maintainers\n\n- [Sindre Sorhus](https://github.com/sindresorhus)\n- [Josh Junon](https://github.com/qix-)\n\n\n## License\n\nMIT\n","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"users":{"scottfreecode":true},"bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"license":"MIT","versions":{"0.0.2":{"name":"slice-ansi","version":"0.0.2","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"author":{"name":"David Caccavella","email":"threedeecee@gmail.com"},"maintainers":[{"name":"David Caccavella","email":"threedeecee@gmail.com","url":"github.com/dthree"},{"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":"node test.js && xo"},"files":["index.js"],"keywords":["slice","string","ansi","styles","color","colour","colors","terminal","console","cli","tty","escape","formatting","rgb","256","shell","xterm","log","logging","command-line","text"],"dependencies":{},"devDependencies":{"ava":"^0.2.0","chalk":"^1.1.1","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"8b9fa7210c722fed80b5330146e4ada1a9c4db6a","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@0.0.2","_shasum":"bf0579e665125dd7a7626bd592d337cbffcfe7b3","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.2.0","_npmUser":{"name":"dthree","email":"threedeecee@gmail.com"},"dist":{"shasum":"bf0579e665125dd7a7626bd592d337cbffcfe7b3","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/slice-ansi/-/slice-ansi-0.0.2.tgz"},"directories":{}},"0.0.3":{"name":"slice-ansi","version":"0.0.3","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"author":{"name":"David Caccavella","email":"threedeecee@gmail.com"},"maintainers":[{"name":"dthree","email":"threedeecee@gmail.com"}],"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js && xo"},"files":["index.js"],"keywords":["slice","string","ansi","styles","color","colour","colors","terminal","console","cli","tty","escape","formatting","rgb","256","shell","xterm","log","logging","command-line","text"],"dependencies":{},"devDependencies":{"ava":"^0.2.0","chalk":"^1.1.1","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"5582973fe42a2df861cdf09907b28a3bb634f5de","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@0.0.3","_shasum":"9ee38472a17a9f0f72e7ebc9ec0c328c39dc4a8b","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.2.0","_npmUser":{"name":"dthree","email":"threedeecee@gmail.com"},"dist":{"shasum":"9ee38472a17a9f0f72e7ebc9ec0c328c39dc4a8b","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/slice-ansi/-/slice-ansi-0.0.3.tgz"},"directories":{}},"0.0.4":{"name":"slice-ansi","version":"0.0.4","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"author":{"name":"David Caccavella","email":"threedeecee@gmail.com"},"maintainers":[{"name":"dthree","email":"threedeecee@gmail.com"}],"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js && xo"},"files":["index.js"],"keywords":["slice","string","ansi","styles","color","colour","colors","terminal","console","cli","tty","escape","formatting","rgb","256","shell","xterm","log","logging","command-line","text"],"dependencies":{},"devDependencies":{"ava":"^0.2.0","chalk":"^1.1.1","strip-ansi":"^3.0.0","xo":"*"},"gitHead":"8670277262281964b13f051d51b2e24bcfda8a66","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@0.0.4","_shasum":"edbf8903f66f7ce2f8eafd6ceed65e264c831b35","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.2.0","_npmUser":{"name":"dthree","email":"threedeecee@gmail.com"},"dist":{"shasum":"edbf8903f66f7ce2f8eafd6ceed65e264c831b35","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/slice-ansi/-/slice-ansi-0.0.4.tgz"},"directories":{}},"0.1.0":{"name":"slice-ansi","version":"0.1.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"author":{"name":"David Caccavella","email":"threedeecee@gmail.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["slice","string","ansi","styles","color","colour","colors","terminal","console","cli","tty","escape","formatting","rgb","256","shell","xterm","log","logging","command-line","text"],"devDependencies":{"ava":"*","chalk":"^1.1.1","random-item":"^1.0.0","strip-ansi":"^4.0.0","xo":"*"},"gitHead":"9ffcf2edf821f3b964375a1eac8482264603936e","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@0.1.0","_shasum":"a884ecf178e98c36ae4f629253778a24d12ed17b","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a884ecf178e98c36ae4f629253778a24d12ed17b","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/slice-ansi/-/slice-ansi-0.1.0.tgz"},"maintainers":[{"email":"i.am.qix@gmail.com","name":"qix"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi-0.1.0.tgz_1498085489784_0.24906234815716743"},"directories":{}},"1.0.0":{"name":"slice-ansi","version":"1.0.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"author":{"name":"David Caccavella","email":"threedeecee@gmail.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["slice","string","ansi","styles","color","colour","colors","terminal","console","cli","tty","escape","formatting","rgb","256","shell","xterm","log","logging","command-line","text"],"dependencies":{"is-fullwidth-code-point":"^2.0.0"},"devDependencies":{"ava":"*","chalk":"^2.0.1","random-item":"^1.0.0","strip-ansi":"^4.0.0","xo":"*"},"gitHead":"c63bf1eb57394c7d958a0c9d6c7db2f1a4cb2e93","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@1.0.0","_npmVersion":"5.0.0","_nodeVersion":"8.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==","shasum":"044f1a49d8842ff307aad6b505ed178bd950134d","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/slice-ansi/-/slice-ansi-1.0.0.tgz"},"maintainers":[{"email":"i.am.qix@gmail.com","name":"qix"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi-1.0.0.tgz_1499681932678_0.883340407628566"},"directories":{}}},"name":"slice-ansi","time":{"modified":"2017-07-10T10:18:53.559Z","created":"2015-09-26T04:25:26.276Z","0.0.2":"2015-09-26T04:25:26.276Z","0.0.3":"2015-09-26T04:49:56.857Z","0.0.4":"2015-09-26T07:53:28.041Z","0.1.0":"2017-06-21T22:51:30.760Z","1.0.0":"2017-07-10T10:18:53.559Z"},"readmeFilename":"readme.md","homepage":"https://github.com/chalk/slice-ansi#readme"}