# memomima

> A straightforward memoize function using JSON.stringify.

Latest version **0.1.2** (published 2015-07-20) · MIT license · 0 weekly downloads

## Install

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

## 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.1.2 |
| Published | 2015-07-20 |
| First published | 2015-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ben Aston |
| Maintainers | benaston |
| Keywords | memoize, memoise, memo |

## Links

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

## Recent versions

- 0.1.2 (latest) — 2015-07-20
- 0.1.1 — 2015-07-20
- 0.1.0 — 2015-07-20

## README

# memomima

A memoization function. Uses JSON.stringify for objects arguments.

File size: **495 bytes**.<br/>
Supported platforms: **server and browser**.<br/>
Supported language versions: **ES5 and above**.

If you use this library in your software please tweet me @benastontweet.

## Installation

```npm install memomima```

## Example

```javascript
var memoize = require('memomima').memoize;

//arrange
var o, fn;

o = {
	foo: function() {}
};
spyOn(o, 'foo').and.callThrough();            
function fn() { return o.foo(); }

//act & assert
fn();
fn();
expect(o.foo.calls.count()).toBe(2);

fn = memoize(fn);
fn();
fn();
expect(o.foo.calls.count()).toBe(3); // Not 4!
```

## License & Copyright

This software is released under the MIT License. It is Copyright 2015, Ben Aston. I may be contacted at ben@bj.ma.

## How to Contribute

Pull requests including bug fixes, new features and improved test coverage are welcomed. Please do your best, where possible, to follow the style of code found in the existing codebase.

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