Highdash

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

Highdash
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

OperationLodashHighdashImprovement
(complex)
11ms2.6ms4.4x faster
(deep objects)
12.6ms8ms1.6x faster
(mutable)
4.2ms1ms4.2x faster
(immutable)
4ms1ms4.0x faster
(2 keys)
36.6ms31ms1.2x faster
(nested arrays)
6.2ms3ms2.1x faster
(object properties)
1.8ms0.6ms3.0x faster
(object properties)
42.6ms35.6ms1.2x faster
(object values)
17.2ms2.2ms7.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:
LibraryRaw SizeGzipped SizeWhat'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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. 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:
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