{"name":"tiny-truncate","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-truncate.git"},"description":"A tiny function for truncating a string which may containg ANSI escapes, with automatic terminal width detection.","license":"MIT","version":"1.0.5","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":"node test/index.js","prepublishOnly":"npm run clean && npm run compile && npm run test"},"keywords":["tiny","truncate"],"dependencies":{"ansi-truncate":"^1.4.0"},"devDependencies":{"fava":"^0.3.4","tiny-colors":"^2.2.2","tsex":"^4.0.2","typescript":"^5.7.3"},"_id":"tiny-truncate@1.0.5","gitHead":"4f6ef425007ba4ed0d0eb45fad43f3c09a28e40a","bugs":{"url":"https://github.com/fabiospampinato/tiny-truncate/issues"},"homepage":"https://github.com/fabiospampinato/tiny-truncate#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-v69A1bjP624gxzBEvvshTMcwU2tkMcuAOIXAjJj0AG7aR+/YFmBYSw3rEKo0Ma2SCX7coeq9MNnUHQo1wZmMHw==","shasum":"2b44516a327c6f021303fda79ce3126f38e927cc","tarball":"http://registry-npm.ywwl.com/tiny-truncate/download/tiny-truncate-1.0.5.tgz","fileCount":5,"unpackedSize":2819,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDmfl7PfX9Mpb2VG6ZsSJy0dhE9poZDI9A2dJV4owTNcAiBQCnsTFiUfdkEFW3Zu2ajYaAV7M3Vv669jdzBkvQASiA=="}],"size":1644,"noattachment":false,"key":"/tiny-truncate/-/tiny-truncate-1.0.5.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/tiny-truncate_1.0.5_1755876776199_0.5574245145095689"},"_hasShrinkwrap":false,"readme":"# Tiny Truncate\n\nA tiny function for truncating a string which may containg ANSI escapes, with automatic terminal width detection.\n\n## Install\n\n```sh\nnpm install tiny-truncate\n```\n\n## Usage\n\n```ts\nimport colors from 'tiny-colors';\nimport truncate from 'tiny-truncate';\n\n// Let's truncate a string, spanning at most the entire width of the terminal\n\ntruncate ( colors.red ( '---'.repeat ( 1000 ) ) ); // Some red dashes that don't overflow the width of the terminal\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1755876776424,"_cnpm_publish_time":1755876776424,"dist-tags":{"latest":"1.0.5"}}