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
- Host: GitHub
- URL: https://github.com/avcs06/mmemo
- Owner: avcs06
- License: other
- Created: 2022-06-24T07:27:30.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-11T08:29:37.000Z (about 2 years ago)
- Last Synced: 2025-02-15T05:47:17.226Z (4 months ago)
- Topics: memorization, memorize, memorizer
- Language: TypeScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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`