Tags: Zheruel/nano-string-utils
Tags
Add Grapheme-Aware Unicode Support to `reverse()` and `truncate()` (#47) * Update bundle sizes and performance benchmarks; enhance Unicode handling in string functions - Updated bundle sizes in `bundle-sizes.json` with new gzip values and generated timestamp. - Revised performance benchmarks in `performance-benchmarks.json`, reflecting updated ops per second and winners for various functions. - Adjusted metadata for `truncate` and `reverse` functions in `metadata.ts` to reflect new sizes and added examples for Unicode handling. - Improved `reverse` function in `reverse.ts` to handle complex Unicode characters, including emojis and diacritics. - Enhanced `truncate` function in `truncate.ts` for better handling of grapheme clusters, ensuring emoji and diacritics are preserved during truncation. - Added comprehensive tests for Unicode handling in both `reverse` and `truncate` functions, covering various edge cases and complex scenarios. * Release version 0.22.0; enhance Unicode support in `reverse()` and `truncate()`, improve performance, and add comprehensive test coverage
Various Improvements - v0.20.0 (#43) * chore: bump version to 0.20.0 and update package metadata feat: enhance documentation with examples for string utility functions - Added detailed examples for `capitalize`, `codePoints`, `deburr`, `detectScript`, `escapeHtml`, `fuzzyMatch`, `graphemes`, `hashString`, `pad`, `padEnd`, `padStart`, `pluralize`, `randomString`, `reverse`, `singularize`, `smartSplit`, `stripHtml`, `toASCII`, and `wordCount`. feat: introduce SafeHTML type and sanitization functions - Added `SafeHTML` branded type for sanitized HTML. - Implemented `toSafeHTML` for sanitizing strings into SafeHTML. - Added `unsafeSafeHTML` for casting strings to SafeHTML without sanitization. fix: update size limits in package.json for better performance - Adjusted size limits for `dist/index.js` and `dist/index.cjs`. test: add unit tests for new SafeHTML functionality - Created tests for `toSafeHTML` and `unsafeSafeHTML` to ensure proper sanitization and type safety. * update package json
PreviousNext