{"_id":"slice-ansi","_rev":"4312385","name":"slice-ansi","description":"Slice a string with ANSI escape codes","dist-tags":{"latest":"9.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2026-04-07T21:55:56.000Z","created":"2015-09-26T04:25:26.276Z","9.0.0":"2026-04-04T13:19:33.198Z","8.0.0":"2026-02-10T16:25:49.022Z","7.1.2":"2025-09-08T15:11:55.899Z","7.1.0":"2023-10-29T19:45:58.384Z","7.0.0":"2023-10-28T16:29:11.606Z","6.0.0":"2023-03-24T12:53:46.115Z","5.0.0":"2021-04-16T06:35:25.429Z","4.0.0":"2020-02-16T17:06:07.255Z","3.0.0":"2019-09-17T17:50:39.941Z","2.1.0":"2019-01-25T21:16:33.098Z","2.0.0":"2018-10-16T18:48:01.149Z","1.0.0":"2017-07-10T10:18:53.559Z","0.1.0":"2017-06-21T22:51:30.760Z","0.0.4":"2015-09-26T07:53:28.041Z","0.0.3":"2015-09-26T04:49:56.857Z","0.0.2":"2015-09-26T04:25:26.276Z"},"users":{"scottfreecode":true},"repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"versions":{"9.0.0":{"name":"slice-ansi","version":"9.0.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"funding":"https://github.com/chalk/slice-ansi?sponsor=1","type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=22"},"scripts":{"test":"xo && ava && tsc --lib esnext index.d.ts"},"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":"^6.2.3","is-fullwidth-code-point":"^5.1.0"},"devDependencies":{"ava":"^7.0.0","chalk":"^5.6.2","random-item":"^4.0.1","strip-ansi":"^7.2.0","xo":"^2.0.2"},"gitHead":"50fc7781f5dd4d1421dbe061822d815708831af4","types":"./index.d.ts","_id":"slice-ansi@9.0.0","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_nodeVersion":"25.8.0","_npmVersion":"11.12.0","dist":{"shasum":"8ed38fdc31f16b607a56cf86c3160d2684f1b61b","size":7503,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-9.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-9.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/slice-ansi_9.0.0_1775308773066_0.9523275159913951"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-04-04T13:19:33.198Z","publish_time":1775308773198,"_source_registry_name":"default","_cnpm_publish_time":1775308773198},"8.0.0":{"name":"slice-ansi","version":"8.0.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"funding":"https://github.com/chalk/slice-ansi?sponsor=1","type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsc --lib esnext index.d.ts"},"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":"^6.2.3","is-fullwidth-code-point":"^5.1.0"},"devDependencies":{"ava":"^6.4.1","chalk":"^5.6.2","random-item":"^4.0.1","strip-ansi":"^7.1.2","xo":"^1.2.3"},"gitHead":"2ea51ac0596c4c4f240826cef211551fd812adb9","types":"./index.d.ts","_id":"slice-ansi@8.0.0","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_nodeVersion":"25.6.0","_npmVersion":"11.8.0","dist":{"shasum":"22d0b66d18bc5c57f488bfcf36cbde3bef731537","size":7016,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-8.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-8.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/slice-ansi_8.0.0_1770740748873_0.3406857856325636"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-10T16:25:49.022Z","publish_time":1770740749022,"_source_registry_name":"default","_cnpm_publish_time":1770740749022},"7.1.2":{"name":"slice-ansi","version":"7.1.2","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"funding":"https://github.com/chalk/slice-ansi?sponsor=1","type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts"},"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":"^6.2.1","is-fullwidth-code-point":"^5.0.0"},"devDependencies":{"ava":"^5.3.1","chalk":"^5.3.0","random-item":"^4.0.1","strip-ansi":"^7.1.0","xo":"^0.56.0"},"_id":"slice-ansi@7.1.2","gitHead":"70f0071c9fe137a62505e3290226f904073aed6e","types":"./index.d.ts","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_nodeVersion":"22.12.0","_npmVersion":"10.9.2","dist":{"shasum":"adf7be70aa6d72162d907cd0e6d5c11f507b5403","size":3180,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-7.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-7.1.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/slice-ansi_7.1.2_1757344315700_0.5415780084018533"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-08T15:11:55.899Z","publish_time":1757344315899,"_source_registry_name":"default","_cnpm_publish_time":1757344315899},"7.1.0":{"name":"slice-ansi","version":"7.1.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"funding":"https://github.com/chalk/slice-ansi?sponsor=1","type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts"},"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":"^6.2.1","is-fullwidth-code-point":"^5.0.0"},"devDependencies":{"ava":"^5.3.1","chalk":"^5.3.0","random-item":"^4.0.1","strip-ansi":"^7.1.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"a083b9586b576cf098b8895239a9b4a11f23aba9","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@7.1.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"shasum":"cd6b4655e298a8d1bdeb04250a433094b347b9a9","size":3117,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-7.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-7.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi_7.1.0_1698608758162_0.5989395233017025"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-29T19:45:58.384Z","publish_time":1698608758384,"_source_registry_name":"default","_cnpm_publish_time":1698608758384},"7.0.0":{"name":"slice-ansi","version":"7.0.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"funding":"https://github.com/chalk/slice-ansi?sponsor=1","type":"module","exports":"./index.js","engines":{"node":">=14.16"},"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":"^6.2.1","is-fullwidth-code-point":"^5.0.0"},"devDependencies":{"ava":"^5.3.1","chalk":"^5.3.0","random-item":"^4.0.1","strip-ansi":"^7.1.0","xo":"^0.56.0"},"gitHead":"8c0653649528ffb2a2a1e5467005289186d8076b","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@7.0.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"shasum":"ab9f083694ed8039b845f5f79a05938ca1ddc331","size":2996,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-7.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-7.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi_7.0.0_1698510551390_0.8108065326577072"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-28T16:29:11.606Z","publish_time":1698510551606,"_source_registry_name":"default","_cnpm_publish_time":1698510551606},"6.0.0":{"name":"slice-ansi","version":"6.0.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"funding":"https://github.com/chalk/slice-ansi?sponsor=1","type":"module","exports":"./index.js","engines":{"node":">=14.16"},"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":"^6.2.1","is-fullwidth-code-point":"^4.0.0"},"devDependencies":{"ava":"^5.2.0","chalk":"^5.2.0","random-item":"^4.0.1","strip-ansi":"^7.0.1","xo":"^0.53.1"},"gitHead":"d0e08a8f80ba9bbcccd60a3f879e95904a6e2d5b","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@6.0.0","_nodeVersion":"14.21.3","_npmVersion":"9.2.0","dist":{"shasum":"f08a1e6703e3598256b667f015ccef9f12c59f7c","size":2993,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-6.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi_6.0.0_1679662425973_0.9211529923591657"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-03-24T12:53:46.115Z","publish_time":1679662426115,"_cnpm_publish_time":1679662426115},"5.0.0":{"name":"slice-ansi","version":"5.0.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"funding":"https://github.com/chalk/slice-ansi?sponsor=1","type":"module","exports":"./index.js","engines":{"node":">=12"},"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":"^6.0.0","is-fullwidth-code-point":"^4.0.0"},"devDependencies":{"ava":"^3.15.0","chalk":"^4.1.0","random-item":"^4.0.0","strip-ansi":"^7.0.0","xo":"^0.38.2"},"gitHead":"d9f402cdbbccc399e6380f39fe7e6d800e9da1f3","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@5.0.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"b73063c57aa96f9cd881654b15294d95d285c42a","size":3013,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-5.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi_5.0.0_1618554925317_0.6554479181002966"},"_hasShrinkwrap":false,"publish_time":1618554925429,"_cnpm_publish_time":1618554925429},"4.0.0":{"name":"slice-ansi","version":"4.0.0","description":"Slice a string with ANSI escape codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/slice-ansi.git"},"funding":"https://github.com/chalk/slice-ansi?sponsor=1","engines":{"node":">=10"},"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":"^3.0.0","random-item":"^3.0.0","strip-ansi":"^6.0.0","xo":"^0.26.1"},"gitHead":"6e1176c06fc3a2b22d35584b788f18c710adb2e8","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@4.0.0","_nodeVersion":"13.1.0","_npmVersion":"6.12.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"500e8dd0fd55b05815086255b3195adf2a45fe6b","size":2979,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi_4.0.0_1581872767116_0.100639054554162"},"_hasShrinkwrap":false,"publish_time":1581872767255,"_cnpm_publish_time":1581872767255},"3.0.0":{"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":{"shasum":"31ddc10930a1b7e0b67b08c96c2f49b77a789787","size":2915,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi_3.0.0_1568742639842_0.1062825822566047"},"_hasShrinkwrap":false,"publish_time":1568742639941,"_cnpm_publish_time":1568742639941},"2.1.0":{"name":"slice-ansi","version":"2.1.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":">=6"},"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":"^3.2.0","astral-regex":"^1.0.0","is-fullwidth-code-point":"^2.0.0"},"devDependencies":{"ava":"^1.1.0","chalk":"^2.4.2","random-item":"^1.0.0","strip-ansi":"^5.0.0","xo":"^0.24.0"},"gitHead":"bfb33a3eb13f2d3b8023f37ddb421eff3ea7a3ae","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@2.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"cacd7693461a637a5788d92a7dd4fba068e81636","size":2363,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi_2.1.0_1548450992729_0.12519637188357136"},"_hasShrinkwrap":false,"publish_time":1548450993098,"_cnpm_publish_time":1548450993098},"2.0.0":{"name":"slice-ansi","version":"2.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":">=6"},"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":"^3.2.0","astral-regex":"^1.0.0","is-fullwidth-code-point":"^2.0.0"},"devDependencies":{"ava":"^0.25.0","chalk":"^2.0.1","random-item":"^1.0.0","strip-ansi":"^5.0.0","xo":"^0.23.0"},"gitHead":"a18333d0409bdc614e372c5616bf50364136074b","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"homepage":"https://github.com/chalk/slice-ansi#readme","_id":"slice-ansi@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5373bdb8559b45676e8541c66916cdd6251612e7","size":2362,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi_2.0.0_1539715681052_0.05732325438423058"},"_hasShrinkwrap":false,"publish_time":1539715681149,"_cnpm_publish_time":1539715681149},"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":{"shasum":"044f1a49d8842ff307aad6b505ed178bd950134d","size":2527,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi-1.0.0.tgz_1499681932678_0.883340407628566"},"directories":{},"publish_time":1499681933559,"_cnpm_publish_time":1499681933559,"_hasShrinkwrap":false},"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","size":2372,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-0.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slice-ansi-0.1.0.tgz_1498085489784_0.24906234815716743"},"directories":{},"publish_time":1498085490760,"_cnpm_publish_time":1498085490760,"_hasShrinkwrap":false},"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":"sindresorhus","email":""}],"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","size":2436,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-0.0.4.tgz"},"directories":{},"publish_time":1443254008041,"_cnpm_publish_time":1443254008041,"_hasShrinkwrap":false},"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":"sindresorhus","email":""}],"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","size":2465,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-0.0.3.tgz"},"directories":{},"publish_time":1443242996857,"_cnpm_publish_time":1443242996857,"_hasShrinkwrap":false},"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":"sindresorhus","email":""}],"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","size":2428,"noattachment":false,"key":"/slice-ansi/-/slice-ansi-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/slice-ansi/download/slice-ansi-0.0.2.tgz"},"directories":{},"publish_time":1443241526276,"_cnpm_publish_time":1443241526276,"_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 visible-column index at which to start the slice. Grapheme clusters (for example, emoji sequences and combining marks) are kept intact.\n\n#### endSlice\n\nType: `number`\n\nZero-based visible-column index at which to end the slice.\nIf a full grapheme cluster would cross `endSlice`, it is excluded.\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","_attachments":{},"homepage":"https://github.com/chalk/slice-ansi#readme","bugs":{"url":"https://github.com/chalk/slice-ansi/issues"},"license":"MIT"}