Skip to content

Release v0.4.0 - Add 9 new string utility functions

Choose a tag to compare

@Zheruel Zheruel released this 03 Sep 16:35
· 58 commits to main since this release
9d14478

What's New

Added 9 new powerful string utility functions while maintaining the library's zero-dependency, tree-shakeable design.

🎯 Text Processing

  • excerpt() - Create smart text excerpts with word boundary awareness
  • highlight() - Highlight search terms in text with customizable wrappers

🔍 String Comparison & Fuzzy Matching

  • diff() - Compute simple string diffs showing additions/deletions
  • levenshtein() - Calculate edit distance between strings with early termination
  • levenshteinNormalized() - Normalized similarity score (0-1) for fuzzy matching
  • fuzzyMatch() - Sublime Text-style fuzzy string matching for command palettes

📝 Language Processing

  • pluralize() - Convert singular words to plural with English grammar rules
  • singularize() - Convert plural words to singular with irregular forms support

📦 Bundle Size

  • ESM: 4.88 KB minified + brotlied
  • CJS: 5.22 KB minified + brotlied
  • All functions remain individually tree-shakeable

✅ Quality

  • 801 tests passing with 100% coverage
  • Full TypeScript support with strict mode
  • Optimized for both size and performance

📥 Installation

```bash
npm install [email protected]
```

Full Changelog: v0.3.0...v0.4.0