{"name":"slice-ansi","version":"3.0.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["slice","string","ansi","styles","color","colour","colors","terminal","console","cli","tty","escape","formatting","rgb","256","shell","xterm","log","logging","command-line","text"],"dependencies":{"ansi-styles":"^4.0.0","astral-regex":"^2.0.0","is-fullwidth-code-point":"^3.0.0"},"devDependencies":{"ava":"^2.1.0","chalk":"^2.4.2","random-item":"^3.0.0","strip-ansi":"^5.0.0","xo":"^0.24.0"},"gitHead":"adc843879c765ccd06df78297eefe628bc3392da","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@3.0.0","_nodeVersion":"8.16.1","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==","shasum":"31ddc10930a1b7e0b67b08c96c2f49b77a789787","tarball":"http://registry-npm.ywwl.com/slice-ansi/download/slice-ansi-3.0.0.tgz","fileCount":4,"unpackedSize":6204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgRzwCRA9TVsSAnZWagAAbqkQAJydCZag8YudZ8B7sSDJ\nFsX+LF6ingMlK9YcVhLke8ilx9ZdNcCMKMq7n0yGpupT6JXKZw/a61hIhfi1\njaPYHoNvSkymFyDcNaLjIgG/yJRTLi05uX6F1tBTycuSZkFfQ+gXaWVf3eBZ\nFMEtbXKQwcQcI0M3SIuEd752/VW1IGhM81jDkEfVjqnX64h4zz9DkFG611HD\nH22nidcSeWhJkHg50L/Nat6DWVPSlTwZneDMBkowaTuSodLEZb41td42w/j8\nLgh04LxrciXUBSYXZWAT9hNJJHDGoUBEThKSYjaOBcWzhxQbglBRxdNCY+RB\nRSR3QwCmmXzk8SiM9ZpbuqYSjM29Fsf4HYBt5AW9U9VuXY2yOhvqjqaqUifD\n8QUIP8rJciGX8jS6WsbaTTVLx/5Y8tkvOFlXdN4r+HheWtv8RBdKnNp+VVZl\npXw/qXROFkzI0pMg8Jun/RLhlJBZNJYwNUwG2LPIxt9Y6d7BO84ncY6qw6hq\nZxp/RZKIiXOQcKUB7nAfd2srZes+DONjZ8RqIHDv2G1MSUaA9NLRtJRfm8Kz\neblkMBT6yokynw45dpLrWpqSRjqbq16WpfRtU46dWFHLWDAHx+CcyqxmAfef\nw0WbPi/otUf1IuVhVK9RKA7XZjdaSZ+BZp2ipDb6EqYu7N1RcacMhE2eWT2x\n/5qa\r\n=0Rgk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXmQ0+ivk4+1++I++ZvRnv+CU85hePVR3h0QD+tTXPVQIhAJnZM0Tip9tOQMs9CT76yxu0gOe9aQoIryVC4s5g7jcz"}],"size":2915,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-3.0.0.tgz"},"maintainers":[{"email":"i.am.qix@gmail.com","name":"qix"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi_3.0.0_1568742639842_0.1062825822566047"},"_hasShrinkwrap":false,"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":1568742639941,"_cnpm_publish_time":1568742639941,"dist-tags":{"latest":"10.0.0"}}