# memoize-resolver

> A general purpose key resolver for memoize

Latest version **1.0.0** (published 2019-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install memoize-resolver
pnpm add memoize-resolver
yarn add memoize-resolver
bun add memoize-resolver
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-03-22 |
| First published | 2019-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nicholas Jamieson |
| Maintainers | cartant |
| Keywords | key, memoize, resolver |

## Links

- npm: https://www.npmjs.com/package/memoize-resolver
- Repository: https://github.com/cartant/memoize-resolver
- Issues: https://github.com/cartant/memoize-resolver/issues
- npm.io page: https://npm.io/package/memoize-resolver

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-03-22

## README

# memoize-resolver

## What is it?

`memoize-resolver` is a general purpose key resolver for use with a `memoize` implementation like the one in [Lodash](https://lodash.com/docs/#memoize).

## Why might you need it?

When you memoize a function that receives multiple argments, by default only the first argument is used as the cache key.

The key resolver implemented in `memoize-resolver` will create a key that's generated from all of the arguments received by the memoized function.

# Install

Install the package using NPM:

```
npm install memoize-resolver --save
```

And import the function for use with TypeScript or ES2015:

```
import { createResolver } from "memoize-resolver";
```

# Usage

```
const work = (state, props) => { /* something expensive */ };
const resolver = createResolver();
const memoizedWork = _.memoize(work, resolver);
```

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