# p-memoize-cjs

> Compilation of p-memoize to cjs to avoid needing to run ESM

Latest version **7.1.0** (published 2022-07-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install p-memoize-cjs
pnpm add p-memoize-cjs
yarn add p-memoize-cjs
bun add p-memoize-cjs
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.1.0 |
| Published | 2022-07-21 |
| First published | 2022-07-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | owenallenaz@gmail.com |
| Maintainers | owenallenaz |

## Links

- npm: https://www.npmjs.com/package/p-memoize-cjs
- npm.io page: https://npm.io/package/p-memoize-cjs

## Recent versions

- 7.1.0 (latest) — 2022-07-21

## README

# p-memoize-cjs

The upstream https://github.com/sindresorhus/p-memoize only functions if you run native `ESM`. Right now the toolchain is simply too experimental to update complicated workflows to ESM. Too many tools like `ts-node`, `ts-node-dev`, `yarn` just don't fully support ESM in a non-experimental way.

This library takes the export of `p-memoize` and just exports it as commonjs so you can import it in any Node project.

I wish this wasn't necessary.

# usage

`npm install p-memoize-cjs`

Import syntax
```
// just pMemoize
import pMemoize from "p-memoize-cjs";

// other functions
import pMemoize, { pMemoizeClear, pMemoizeDecorator } from "p-memoize-cjs";
```

CJS
```
const { pMemoize, pMemoizeClear, pMemoizeDecorator } = "p-memoize-cjs";
```

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