Text Parsing and Formatting
Parse and format the strings frontends handle every day: slugs, query strings, cookies, durations, CSV and version ranges.
- 01
Shorten Text at a Word Boundary
- easy
- Code
- 02
Convert Hex Colours to RGB and Back
- easy
- Code
- 03
Turn a Title into a URL Slug
- easy
- Code
- 04
Join Class Names Conditionally
- easy
- Code
- 05
Format File Sizes
- easy
- Code
- 06
Format Numbers with Thousands Separators
- medium
- Code
- 07
Convert Between Naming Cases
- medium
- Code
- 08
Parse and Format Durations
- medium
- Code
- 09
Wrap Text to a Line Width
- medium
- Code
- 10
Parse and Build Query Strings
- medium
- Code
- 11
Render a Mustache-Style Template
- medium
- Code
- Pro
- 12
Format Relative Times
- medium
- Code
- 13
Parse and Set Cookies
- medium
- Code
- 14
Translate Messages with Plural Forms
- medium
- Code
- 15
Match URL Paths to Routes
- medium
- Code
- 16
Parse CSV with Quoted Fields
- hard
- Code
- Pro
- 17
Compare Versions and Match Semver Ranges
- hard
- Code
- Pro
- 18
Diff Two Texts Line by Line
- hard
- Code
- 19
Write Your Own JSON.stringify
- hard
- Code
- Pro