An open API service indexing awesome lists of open source software.

https://github.com/avcs06/mmemo

Micro / Mini / Map Memo
https://github.com/avcs06/mmemo

memorization memorize memorizer

Last synced: 3 months ago
JSON representation

Micro / Mini / Map Memo

Awesome Lists containing this project

README

        

# Micro / Mini / Map Memo

A much much simpler memorizing utility

## Usage
```
import memo from '@avcs/memo';

const memorizedFunction = memo(originalFunction, { onlyOnce?: boolean })

// optionally you can do this
memorizedFunction.reset()
```

## Features
1. Supports any number of arguments
2. Arguments and return values can be literally anything and everything
3. Works by reference, so does not support `different objects/arrays/functions` with `same values`