memoize-one
- Version 6.0.0
- Published
- 35.6 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: <TFunc extends (this: any, ...newArgs: any[]) => any>( resultFn: TFunc, isEqual?: EqualityFn<TFunc>) => MemoizedFn<TFunc>;
Type Aliases
type EqualityFn
type EqualityFn<TFunc extends (...args: any[]) => any> = ( newArgs: Parameters<TFunc>, lastArgs: Parameters<TFunc>) => boolean;
type MemoizedFn
type MemoizedFn<TFunc extends (this: any, ...args: any[]) => any> = { clear: () => void; (this: ThisParameterType<TFunc>, ...args: Parameters<TFunc>): ReturnType<TFunc>;};
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (36)
- @size-limit/preset-small-lib
- @types/benchmark
- @types/jest
- @types/lodash.isequal
- @types/lodash.memoize
- @types/node
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- benchmark
- cross-env
- eslint
- eslint-config-prettier
- eslint-plugin-jest
- eslint-plugin-prettier
- expect-type
- fast-memoize
- jest
- lodash.isequal
- lodash.memoize
- markdown-table
- mem
- memoizee
- moize
- nanocolors
- ora
- prettier
- rimraf
- rollup
- rollup-plugin-replace
- rollup-plugin-terser
- rollup-plugin-typescript
- size-limit
- ts-jest
- ts-node
- tslib
- typescript
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto 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>
- Updated .
Package analyzed in 1776 ms. - Missing or incorrect documentation? Open an issue for this package.