Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

p-memoize-cjs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-memoize-cjs

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

  • 7.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8.2K
increased by14.54%
Maintainers
1
Weekly downloads
 
Created
Source

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";

FAQs

Package last updated on 21 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc