{"name":"ansi-truncate","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/ansi-truncate.git"},"description":"A tiny function for truncating a string that may contain ANSI escape sequences.","license":"MIT","version":"1.4.0","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["ansi","truncate"],"dependencies":{"fast-string-truncated-width":"^3.0.1"},"devDependencies":{"fava":"^0.3.4","tsex":"^4.0.2","typescript":"^5.7.3"},"_id":"ansi-truncate@1.4.0","gitHead":"38cd205c97018e894f8ca073a7b914c7f70dae57","bugs":{"url":"https://github.com/fabiospampinato/ansi-truncate/issues"},"homepage":"https://github.com/fabiospampinato/ansi-truncate#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-p6d2MrNs/mbpdXFT08fGabIg4pbgnUbbhrsoFfxWV5L3zFKw7tUkYUxGY3xCGJUPohENM80Q4sWkl/VDEN3pZg==","shasum":"1de5bcb5e6754f8760de8887a6f2afe29d85c4d7","tarball":"http://registry-npm.ywwl.com/ansi-truncate/download/ansi-truncate-1.4.0.tgz","fileCount":9,"unpackedSize":4316,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAx9WhT+jZYYtxE8rfQxFUVUmWtpl51K9DkfjovqbP9+AiEAn9+wYNlscDolgaL0iELa3nD7ExikFcnKEbX/6fLLocw="}],"size":2137,"noattachment":false,"key":"/ansi-truncate/-/ansi-truncate-1.4.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ansi-truncate_1.4.0_1755876201313_0.6176793552518574"},"_hasShrinkwrap":false,"readme":"# ANSI Truncate\n\nA tiny function for truncating a string that may contain ANSI escape sequences.\n\n## Install\n\n```sh\nnpm install ansi-truncate\n```\n\n## Usage\n\n```ts\nimport colors from 'tiny-colors';\nimport truncate from 'ansi-truncate';\n\n// Let's truncate a string to a visual width of 2\n\ntruncate ( colors.red ( 'foo' ), 2 ); // => Same as: colors.red ( 'f…' );\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1755876201506,"_cnpm_publish_time":1755876201506,"dist-tags":{"latest":"1.4.0"}}