{"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://registry-npm.ywwl.com/slice-ansi/download/slice-ansi-0.1.0.tgz","integrity":"sha512-KtkyiamcaIwEPAyA0LS+pU7CE9qzpwpEFWTHq/Xtsr3/NHG4pzjAhEFw4kzZyPczdQS3vE0//E9dcY2ud/Xi6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP2CLBw2Dx6mT2rbIJYK3iCY56S+3f3HVA4ALetW61YQIgOvnYFSnmCDiiLq74XkhBQ7fAkDU+XEFAbQZnxdxKOu0="}],"size":2372,"noattachment":false,"key":"/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":{},"readme":"# slice-ansi [![XO: Linted](https://img.shields.io/badge/xo-linted-blue.svg)](https://github.com/xojs/xo)\n\n> Slice 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 slice-ansi\n```\n\n## Usage\n\n```js\nimport chalk from 'chalk';\nimport sliceAnsi from 'slice-ansi';\n\nconst string = '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(string, 20, 30));\n```\n\n## API\n\n### sliceAnsi(string, startSlice, endSlice?)\n\n#### string\n\nType: `string`\n\nString with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk).\n\n#### startSlice\n\nType: `number`\n\nZero-based index at which to start the slice.\n\n#### endSlice\n\nType: `number`\n\nZero-based index at which to end the slice.\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## Maintainers\n\n- [Sindre Sorhus](https://github.com/sindresorhus)\n- [Josh Junon](https://github.com/qix-)\n","publish_time":1498085490760,"_cnpm_publish_time":1498085490760,"dist-tags":{"latest":"10.0.0"}}