#string Clear
Tags #utils #browser #performance #array #async #dom #objects #pattern #events #format #concurrency #http #ui #advanced #fetch #url #string #functional #cache #files #crypto #promise #intl #observer
JavaScript Slugify String
Converts any string into a URL-safe slug: lowercases it, replaces accented characters with ASCII equivalents, strips all non-alphanumeric characters (except hyphens), and collapses multiple hyphens into one. Ideal for generating URL slugs from blog titles, product names, or user input.
JavaScript Truncate String
Truncates a string to a maximum character length and appends an ellipsis (or custom suffix). The smart version breaks at the last word boundary to avoid cutting in the middle of a word, making truncated text look natural in card previews, notifications, and list views.
JavaScript Capitalize Words (Title Case)
Converts a string to title case by capitalising the first letter of each word. Handles multiple spaces and mixed-case input. Optionally skips common English stopwords (a, an, the, of, in, …) so article/preposition words are not capitalised in the middle of a title — matching standard editorial style guides.