# lomemo

> Lodash's memoize function, but in a much smaller package than lodash.memoize's.

Latest version **1.0.1** (published 2025-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install lomemo
pnpm add lomemo
yarn add lomemo
bun add lomemo
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2025-01-17 |
| First published | 2024-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | fabiospampinato |
| Keywords | lodash, memoize, function |

## Links

- npm: https://www.npmjs.com/package/lomemo
- Repository: https://github.com/fabiospampinato/lomemo
- Homepage: https://github.com/fabiospampinato/lomemo#readme
- Issues: https://github.com/fabiospampinato/lomemo/issues
- npm.io page: https://npm.io/package/lomemo

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2025-01-17
- 1.0.0 — 2024-04-14

## README

# Lomemo

Lodash's memoize function, but in a much smaller package than [`lodash.memoize`](https://www.npmjs.com/package/lodash.memoize)'s.

Read lodash's [docs](https://lodash.com/docs/4.17.15#memoize) for more info.

## Install

```sh
npm install lomemo
```

## Usage

```ts
import lomemo from 'lomemo';

// Let's memoize a function, using the first argument as the key

const memoized = lomemo ( ( a, b ) => a + b );

memoized ( 1, 2 ); // => 3
memoized ( 1, 5 ); // => 3

// Let's memoize a function, using a custom function to generate the key

const resolver = ( ...args ) => args.join ( '' );
const memoized = lomemo ( ( a, b ) => a + b, resolver );

memoized ( 1, 2 ); // => 3
memoized ( 1, 5 ); // => 6
memoized ( '', '15' ); // => 6
```

## License

MIT © [`lodash`](https://github.com/lodash/lodash)

---
_Source: https://npm.io/package/lomemo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
