You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Comprehensive Benchmarking System and Performance Optimizations (#15)
* feat: Add bundle size and performance benchmarks for string utilities
- Implemented a new benchmarking system to compare bundle sizes of nano-string-utils, lodash, and es-toolkit.
- Created `benchmarks/bundle-size.ts` to measure and report bundle sizes of individual functions.
- Added `benchmarks/performance.bench.ts` for performance testing of string utility functions.
- Introduced `benchmarks/run-benchmarks.ts` to streamline the execution of benchmarks and report generation.
- Updated `package.json` and `package-lock.json` to include necessary dependencies for benchmarking.
- Refactored string utility functions (camelCase, kebabCase, snakeCase, pascalCase) to utilize a new `words` utility for improved performance and readability.
- Enhanced the `pad` function to handle Unicode characters more effectively.
- Improved the `truncate` function to manage surrogate pairs in strings.
- Updated tests for kebabCase and snakeCase to reflect changes in expected outputs.
- Added new utility function `words.ts` to split strings into words for case conversions.
- Generated initial bundle size comparison results in `benchmarks/bundle-size-results.md`.
* feat: Release version 0.5.2 with comprehensive benchmarking and performance optimizations
* test: Enhance truncate tests for emoji handling and byte limits
* chore: Update changelog and README to reflect bundle size increase to 6.5KB; adjust size limits in package.json
0 commit comments