# memorizer

> memoize a getter of an object

Latest version **1.0.1** (published 2015-12-22) · MIT license · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2015-12-22 |
| First published | 2014-08-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jonathan Ong |
| Maintainers | jonathanong, jongleberry |
| Keywords | memoize, memo, getter |

## Links

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

## Recent versions

- 1.0.1 (latest) — 2015-12-22
- 1.0.0 — 2014-08-04

## README

# memorizer

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

Memoize a property with a lazy callback.
Great for creating internal promises or computationally expensive rproperties.

```js
const memoize = require('memorizer')

function Constructor () {
  this.promise.then(val => {
    // val === true
  })
}

memoize(Constructor.prototype, 'promise', function () {
  return new Promise(true)
})
```

## API

### memoize(object: Object, property: String, getter: Function)

The `getter`'s return value will be memoized.

[npm-image]: https://img.shields.io/npm/v/memorizer.svg?style=flat
[npm-url]: https://npmjs.org/package/memorizer
[travis-image]: https://img.shields.io/travis/jonathanong/memorizer.svg?style=flat
[travis-url]: https://travis-ci.org/jonathanong/memorizer
[coveralls-image]: https://img.shields.io/coveralls/jonathanong/memorizer.svg?style=flat
[coveralls-url]: https://coveralls.io/r/jonathanong/memorizer?branch=master

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