# tachyon-utils-mem

> memoization functionality

Latest version **32.0.0** (published 2024-02-20) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install tachyon-utils-mem
pnpm add tachyon-utils-mem
yarn add tachyon-utils-mem
bun add tachyon-utils-mem
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 32.0.0 |
| Published | 2024-02-20 |
| First published | 2024-02-20 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 22.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Emerging Platforms Engineering |
| Maintainers | frgjdhskxjogu |

## Links

- npm: https://www.npmjs.com/package/tachyon-utils-mem
- Homepage: https://git.xarth.tv/pages/emerging-platforms/tachyon/
- npm.io page: https://npm.io/package/tachyon-utils-mem

## Dependencies (8)

- [mem](https://npm.io/package/mem.md) ^6.1.1
- [tsc](https://npm.io/package/tsc.md) ^2.0.4
- [mimic-fn](https://npm.io/package/mimic-fn.md) ^3.1.0
- [quick-lru](https://npm.io/package/quick-lru.md) ^5.1.1
- [type-fest](https://npm.io/package/type-fest.md) ^2.3.4
- [typescript](https://npm.io/package/typescript.md) ^5.3.3
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.15.0
- [tachyon-type-library](https://npm.io/package/tachyon-type-library.md) ^32.0.0

## Recent versions

- 32.0.0 (latest) — 2024-02-20

## README

# tachyon-utils-mem

Convenience wrappers around the [mem](https://github.com/sindresorhus/mem)
library.

## Installation

```sh
$ yarn add tachyon-utils-mem
```

## Usage

This package exposes three main memoization strategies:

- simple: shallow comparison of first argument to a function
- deep: deep comparison of all arugments to a function
- lead object keys: shallow comparison of the values of specific keys of the
  object that is the first argument to a function

Additionally, there is a custom strategy that lets user build cache keys
themselves based on the functions args.

These strategies come in both bottomless ("all") and limited ("some", via LRU
culling) cache sizes.

Thus, the following functions are available:

- memoizeSimpleAll
- memoizeSimpleSome
- memoizeDeepAll
- memoizeDeepSome
- memoizeLeadObjKeysAll
- memoizeLeadObjKeysSome
- memoizeCustomAll
- memoizeCustomSome

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