# @f/memoize

> Create a function that memoizes the result of a &#x60;fn&#x60;.

Latest version **1.1.1** (published 2015-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @f/memoize
pnpm add @f/memoize
yarn add @f/memoize
bun add @f/memoize
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2015-12-16 |
| First published | 2015-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | f |

## Links

- npm: https://www.npmjs.com/package/@f/memoize
- Repository: https://github.com/micro-js/memoize
- Homepage: https://github.com/micro-js/memoize#readme
- Issues: https://github.com/micro-js/memoize/issues
- npm.io page: https://npm.io/package/@f/memoize

## Dependencies (1)

- [@f/slice](https://npm.io/package/@f/slice.md) ^1.0.0

## Recent versions

- 1.1.1 (latest) — 2015-12-16
- 1.1.0 — 2015-12-16

## README

# memoize

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Create a function that memoizes the result of a &#x60;fn&#x60;.

## Installation

    $ npm install @f/memoize

## Usage

```js
var memoize = require('@f/memoize')

var slow = memoize(function (num) {
  var calc = 0
  for (var i = 0; i < num; ++i) {
    calc += i
  }
  return calc
})

// slow
slow(100) // => 4950

// fast
slow(100) // => 4950


```

## API

### memoize(fn)

- `fn` - a function to memoize

**Returns:** memoized function

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/memoize.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/memoize
[git-image]: https://img.shields.io/github/tag/micro-js/memoize.svg
[git-url]: https://github.com/micro-js/memoize
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@f/memoize.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@f/memoize

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