{"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://registry-npm.ywwl.com/slice-ansi/download/slice-ansi-0.0.3.tgz","integrity":"sha512-8q+gPhoVlJuk9LLLtQMckb+mu6/HFxjsLIUf4AzuKQ2zLL3DC0COL/jYViY+WFGZq/TshfLZbr4xlG1rnWLkLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDvwadGQ5sevSC+p7zlneMpBtnRFGHT2k8tR8zusYDKAIhAJI3QbLGrcqernIl10XPxqA6gsgdmjWZ1LFKU0eDauMh"}],"size":2465,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-0.0.3.tgz"},"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":1443242996857,"_cnpm_publish_time":1443242996857,"dist-tags":{"latest":"10.0.0"}}