Highdash
A modern, TypeScript-first alternative to Lodash with superior performance, type safety, and smarter bundle optimization for modern apps and workflows
Tech Stack :

As they say...
"When in doubt in JavaScript, just use lodash."But what if there was something better?
Meet Highdash โ the next step up from lodash. ๐
๐ Why Highdash?
While Lodash has been the go-to utility library for JavaScript developers, it was built for a different era. Highdash addresses the modern challenges that Lodash struggles with:
โ Lodash Limitations
- Legacy JavaScript: Built for ES5, missing modern optimizations
- Poor Tree-Shaking: Large bundle sizes even when importing single functions
- Type Safety Issues: Generic types often lose precision
- Performance Overhead: Older algorithms and patterns
- Bundle Bloat: ~70KB minified + gzipped for full library
- Side Effects: Some functions have hidden mutations
- Outdated Dependencies: Relies on legacy polyfills
โ Highdash Advantages
- Modern ES2020+: Leverages latest JavaScript features for optimal performance
- Perfect Tree-Shaking: Import only what you need, pay only for what you use
- TypeScript-First: Built with TypeScript from the ground up
- Superior Performance: 2-5x faster in many operations
- Tiny Bundle Size: Main index only 1.9KB gzipped
- Zero Dependencies: No external package dependencies
- Pure Functions: No hidden side effects or mutations
- Future-Proof: Designed for modern bundlers and environments
๐ Performance Comparison
Operation | Lodash | Highdash | Improvement |
---|---|---|---|
(complex) | 11ms | 2.6ms | 4.4x faster |
(deep objects) | 12.6ms | 8ms | 1.6x faster |
(mutable) | 4.2ms | 1ms | 4.2x faster |
(immutable) | 4ms | 1ms | 4.0x faster |
(2 keys) | 36.6ms | 31ms | 1.2x faster |
(nested arrays) | 6.2ms | 3ms | 2.1x faster |
(object properties) | 1.8ms | 0.6ms | 3.0x faster |
(object properties) | 42.6ms | 35.6ms | 1.2x faster |
(object values) | 17.2ms | 2.2ms | 7.8x faster |
Benchmarks run on Node.js 18+, 1000 iterations. Results averaged over 5 runs.
๐ก Want to verify these results? Run the benchmarks yourself:This will run comprehensive performance tests comparing Highdash with Lodash on your machine.
๐ Want to understand WHY Highdash is faster? Check out our Technical Comparison for detailed implementation analysis and optimization strategies.
๐ Bundle Size Details
Here are the actual measured bundle sizes:
Library | Raw Size | Gzipped Size | What's Included |
---|---|---|---|
Highdash (main index) | 10,705 bytes (10.7KB) | 1,915 bytes (1.9KB) | All functions in single file |
Lodash (main index) | ~24,000 bytes (24KB) | ~8,000 bytes (8KB) | All functions in single file |
Highdash (full library) | ~60,000 bytes (60KB) | ~13,500 bytes (13.5KB) | Complete package |
Lodash (full library) | 73,015 bytes (73KB) | 25,941 bytes (25.9KB) | Complete package |
Comparison Analysis:
- Highdash vs Lodash (main index): 4.2x smaller gzipped (1.9KB vs 8KB)
- Highdash vs Lodash (full library): 1.9x smaller gzipped (13.5KB vs 25.9KB)
๐ Check current sizes: Run to see live measurements
๐ฆ Installation
๐ฏ Quick Start
Tree-Shakable Imports
CommonJS Support
Highdash supports both ESM and CommonJS imports. For CommonJS projects:
Note: If your project uses in package.json, use extension for CommonJS files or use dynamic imports.
Core Examples
๐ฅ Modern Features
Enhanced Type Safety
Modern JavaScript Integration
Advanced Function Utilities
๐ Migrating from Lodash
1. Update Imports
2. Update Function Calls
3. Leverage New Features
๐ Bundle Optimization
Tree-Shaking Configuration
Bundle Analysis
Import Strategies
๐งช Testing
Test Coverage
- 2000+ tests across all functions
- 91%+ code coverage with comprehensive edge cases
- Type safety validation with TypeScript strict mode
- Performance benchmarks against Lodash
๐ Development
Prerequisites
- Node.js 18+
- npm/yarn/pnpm
Setup
Scripts
๐ Roadmap
โ Completed
- Core utility functions (228 functions)
- TypeScript-first implementation
- Tree-shaking optimization
- Performance benchmarks
- Comprehensive testing
- Bundle size optimization
- Modern JavaScript features
- Promise-aware utilities
๐ง In Progress
- Documentation website
- Migration tools
- Performance monitoring
- Additional utility functions
๐ฎ Planned
- Browser compatibility matrix
- Performance regression testing
- Advanced tree-shaking optimizations
- WebAssembly acceleration for heavy operations
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
๐ License
MIT License - see LICENSE for details.
Contact
If you have any questions, suggestions, or would like to collaborate, please feel free to reach out:
- Email: ahmadbilal.3491@gmail.com
- LinkedIn: Ahmad Bilal
I look forward to hearing from you!
๐ Acknowledgments
- Lodash - The original inspiration and foundation
- TypeScript Team - For the amazing type system
- Modern JavaScript - For the powerful native APIs
- Open Source Community - For the continuous support
Made with โค๏ธ by the Ahmad Bilal