fabiospampinato

fabiospampinato/fast-string-truncat...

A fast function for calculating where a string should be truncated, given an optional width limit and an ellipsis string.

JavaScript
19
3
MIT License

This library provides a fast function to calculate where a string should be truncated based on a visual width limit and optional ellipsis, making it ideal for terminal output formatting. It's designed for developers working on CLI tools or terminal-based applications who need efficient string truncation without repeatedly processing the same string. The package offers configurable character widths and handles ANSI escape sequences, making it suitable for colored or styled terminal text.

Total donated
Undistributed
Share with your subscribers:

Recipients

How the donated funds are distributed

Support the dependencies of fabiospampinato/fast-string-truncated-width

Account's avatar
Simple benchmarking library with a pretty output.
Account's avatar
A wannabe tiny largely-drop-in replacement for ava that works in the browser too.
Account's avatar
A little CLI for making TypeScript packages, cleanly and effortlessly.
Account's avatar
TypeScript is a language for application scale JavaScript development

Support the repos that depend on this repository

Top contributors

fabiospampinato's profile
fabiospampinato
30 contributions
43081j's profile
43081j
1 contributions

Recent events

Kivach works on the Obyte network, and therefore you can track all donations.

No events yet