# memoiz

> Node.js / javascript module to cache method's returned values

Latest version **0.0.2** (published 2015-01-22) · GPL v3 license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-01-22 |
| First published | 2015-01-22 |
| Weekly downloads | 0 |
| License | GPL v3 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | José Moreira |
| Maintainers | cuss |
| Keywords | memoiz, memoize, memorize, cache, returned, values, value, findhit |

## Links

- npm: https://www.npmjs.com/package/memoiz
- Repository: https://github.com/findhit/memoiz
- Issues: https://github.com/findhit/memoiz/issues
- npm.io page: https://npm.io/package/memoiz

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^2.1.1
- [findhit-util](https://npm.io/package/findhit-util.md) ^0.2.5

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2015-01-22
- 0.0.1 — 2015-01-22

## README

# memoiz
Node.js / javascript module to cache method's return value

## Installation

```bash
npm install --save memoiz
```

## Usage

```js

var Memoiz = require( 'memoiz' );

var sum = Memoiz.method(function ( a, b ) {
    return a + b;
});

// First run will trigger a cache set
sum( 1, 2 ); // 3

// Second run will trigger a cache get
// without running provided method
sum( 1, 2 ); // 3

```

## Future features

In the future we should add:
* Abillity to detect uniqueness on arguments to cache specific responses (at the
    time it is caching only one result);
* Different kinds of stores;

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