Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/naverpaydev2025/hidash2

improved lodash
https://github.com/naverpaydev2025/hidash2

Last synced: 5 days ago
JSON representation

improved lodash

Awesome Lists containing this project

README

        

# @naverpay/hidash

[![CI](https://github.com/NaverPayDev/hidash/actions/workflows/ci.yaml/badge.svg)](https://github.com/NaverPayDev/hidash/actions/workflows/matrix.yaml)

A modern, performance-focused alternative to Lodash.

## Features

- ๐Ÿš€ **Dual Package Support (CJS, ESM)**: Built for modern JavaScript, optimized for tree-shaking
- โšก๏ธ **High Performance**: Consistently faster than Lodash in benchmarks (verified with Vitest)
- ๐Ÿ”„ **Drop-in Replacement**: 100% compatible with Lodash's interface and behavior
- ๐ŸŽฏ **Type Safety**: Written in TypeScript with complete type definitions
- ๐Ÿ“ฆ **Subpath Imports**: Granular imports for minimal bundle size
- ๐Ÿงช **Test Coverage**: Every function has test cases that match Lodash's behavior exactly
- 0๏ธโƒฃ **Zero Dependencies**: No external runtime dependencies, keeping your bundle lean
- โœ… **Proven Reliability**: Used in production at NAVER Pay

## Installation

```bash
npm install @naverpay/hidash
# or
yarn add @naverpay/hidash
# or
pnpm add @naverpay/hidash
```

## Usage

Import functions individually using subpath imports:

```typescript
import has from '@naverpay/hidash/has'
import isEmpty from '@naverpay/hidash/isEmpty'
import isObject from '@naverpay/hidash/isObject'

// Same interface as Lodash
has(object, 'user.name') // true
isEmpty([]) // true
isObject({}) // true
```

โŒ Package does not support namespace imports:

```typescript
// This will not work
import {has, isEmpty} from '@naverpay/hidash'
```

## Why hidash?

- **Modern**: Built specifically for subpath imports for optimal tree-shaking
- **Performance**: Optimized implementations that outperform Lodash in most scenarios
- **Compatibility**: Designed as a drop-in replacement with identical interfaces and behavior
- **Tested**: Comprehensive test suite ensuring Lodash compatibility and performance benchmarks

## Test Coverage

- [Test Coverage](https://naverpaydev.github.io/hidash/#/)

## Benchmark

- [Link](./BENCHMARK.md)

## Contributing

Contributions are welcome!

### Feature Requests

Want additional Lodash methods to be implemented? Please create an issue with:

- The method name
- Use case description
- Current workaround (if any)

We prioritize implementing new methods based on community needs.

### Pull Requests

Feel free to submit PRs for:

- Bug fixes
- Performance improvements
- New utility methods
- Documentation improvements

Please read our contributing guidelines before submitting PRs.

## License

MIT License - see the [LICENSE.md](LICENSE.md) file for details.

---

Made with โค๏ธ by NAVER Financial frontend team.