memoize-one

  • Version 5.2.1
  • Published
  • 21.8 kB
  • No dependencies
  • MIT license

Install

npm i memoize-one
yarn add memoize-one
pnpm add memoize-one

Overview

A memoization library which only remembers the latest invocation

Index

Functions

Type Aliases

Functions

function memoizeOne

memoizeOne: <
ResultFn extends (this: any, ...newArgs: any[]) => ReturnType<ResultFn>
>(
resultFn: ResultFn,
isEqual?: EqualityFn
) => ResultFn;

    Type Aliases

    type EqualityFn

    type EqualityFn = (newArgs: any[], lastArgs: any[]) => boolean;

      Package Files (1)

      Dependencies (0)

      No dependencies.

      Dev Dependencies (24)

      Peer Dependencies (0)

      No peer dependencies.

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/memoize-one.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/memoize-one)
      • HTML
        <a href="https://www.jsdocs.io/package/memoize-one"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>