{"_id":"tiny-truncate","_rev":"3757992","name":"tiny-truncate","description":"A tiny function for truncating a string which may containg ANSI escapes, with automatic terminal width detection.","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"time":{"modified":"2025-03-18T07:12:48.000Z","created":"2022-05-06T13:24:37.192Z","1.0.3":"2025-01-12T00:15:18.387Z","1.0.2":"2022-05-06T15:49:43.498Z","1.0.1":"2022-05-06T15:38:10.616Z","1.0.0":"2022-05-06T13:24:37.192Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-truncate.git"},"versions":{"1.0.3":{"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.3","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.2.0"},"devDependencies":{"fava":"^0.3.4","tiny-colors":"^2.2.2","tsex":"^4.0.2","typescript":"^5.7.3"},"_id":"tiny-truncate@1.0.3","gitHead":"8fe75f6d802fa1387abc8abcdd2939d55c1eb2db","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":{"shasum":"f2d6892c5b2d60795d8155ef5adb25467da0b8fd","size":1643,"noattachment":false,"key":"/tiny-truncate/-/tiny-truncate-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/tiny-truncate/download/tiny-truncate-1.0.3.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.3_1736640918208_0.14479893356561924"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-12T00:15:18.387Z","publish_time":1736640918387,"_source_registry_name":"default","_cnpm_publish_time":1736640918387},"1.0.2":{"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.","version":"1.0.2","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":"npm run clean && npm run compile && npm run test"},"keywords":["tiny","truncate"],"dependencies":{"ansi-truncate":"^1.0.1"},"devDependencies":{"fava":"^0.0.6","tiny-colors":"^2.0.1","tsex":"^1.1.2","typescript":"^4.6.4"},"gitHead":"91a6d685b155c8d880006380e28b8dbf5a7d5357","bugs":{"url":"https://github.com/fabiospampinato/tiny-truncate/issues"},"homepage":"https://github.com/fabiospampinato/tiny-truncate#readme","_id":"tiny-truncate@1.0.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"shasum":"5c94b296cca60b16d1f7eb166d661eefcb063905","size":1996,"noattachment":false,"key":"/tiny-truncate/-/tiny-truncate-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/tiny-truncate/download/tiny-truncate-1.0.2.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-truncate_1.0.2_1651852183360_0.6235178026085864"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-06T15:52:38.067Z","publish_time":1651852183498,"_cnpm_publish_time":1651852183498},"1.0.1":{"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.","version":"1.0.1","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":"npm run clean && npm run compile && npm run test"},"keywords":["tiny","truncate"],"dependencies":{"ansi-truncate":"^1.0.1"},"devDependencies":{"fava":"^0.0.6","tiny-colors":"^2.0.1","tsex":"^1.1.2","typescript":"^4.6.4"},"gitHead":"ce73ae8d964bbaefc63b0e47517c285afab9d97e","bugs":{"url":"https://github.com/fabiospampinato/tiny-truncate/issues"},"homepage":"https://github.com/fabiospampinato/tiny-truncate#readme","_id":"tiny-truncate@1.0.1","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"shasum":"7127003eedabb997d296511f13f516d126ced8de","size":1986,"noattachment":false,"key":"/tiny-truncate/-/tiny-truncate-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tiny-truncate/download/tiny-truncate-1.0.1.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-truncate_1.0.1_1651851490440_0.34138837528980237"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-06T15:42:41.289Z","publish_time":1651851490616,"_cnpm_publish_time":1651851490616},"1.0.0":{"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.","version":"1.0.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":"npm run clean && npm run compile && npm run test"},"keywords":["tiny","truncate"],"dependencies":{"ansi-truncate":"^1.0.0"},"devDependencies":{"fava":"^0.0.6","tiny-colors":"^2.0.1","tsex":"^1.1.2","typescript":"^4.6.4"},"gitHead":"508468df9b51f6ac181575c67d4712e250469cd4","bugs":{"url":"https://github.com/fabiospampinato/tiny-truncate/issues"},"homepage":"https://github.com/fabiospampinato/tiny-truncate#readme","_id":"tiny-truncate@1.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"shasum":"a401ecec8b8fd5605cc7703b367eeb17cc86db1e","size":1950,"noattachment":false,"key":"/tiny-truncate/-/tiny-truncate-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tiny-truncate/download/tiny-truncate-1.0.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-truncate_1.0.0_1651843477074_0.27758062181950716"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-06T14:59:21.996Z","publish_time":1651843477192,"_cnpm_publish_time":1651843477192}},"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","_attachments":{},"homepage":"https://github.com/fabiospampinato/tiny-truncate#readme","bugs":{"url":"https://github.com/fabiospampinato/tiny-truncate/issues"},"license":"MIT"}