# ng-memoize

> Decorator that applies memoization technique to a given method.

Latest version **0.0.2** (published 2018-08-04) · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-08-04 |
| First published | 2018-08-04 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 24.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | haldun7 |

## Links

- npm: https://www.npmjs.com/package/ng-memoize
- Homepage: https://github.com/haldunatar/ng-memoize
- npm.io page: https://npm.io/package/ng-memoize

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 0.0.2 (latest) — 2018-08-04
- 0.0.1 — 2018-08-04

## README

# ngMemoize #

Decorator that applies memoization technique to a given method.

## Usage: ##

Installation:
```
npm i -D ng-memoize
```

Example:
```
import { Component } from '@angular/core';
import { ngMemoize } from 'ng-memoize';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {

  @ngMemoize()
  fibonacci(n) { 
    return n < 1 ? 0
        : n <= 2 ? 1
        : fibonacci(n - 1) + fibonacci(n - 2);
  } 
}
```

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