Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/module/function/onceOfSameParam"

Index

Variables

Const onceOfSameParam

onceOfSameParam: _onceOfSameParam & { identity: onceOfSameParamIdentity } = Object.assign(_onceOfSameParam, {identity: onceOfSameParamIdentity,})

Functions

_onceOfSameParam

  • 包装一个函数为指定参数只执行一次的函数

    Type parameters

    Parameters

    • fn: Fn

      需要包装的函数

    • Default value identity: onceOfSameParamIdentity = onceOfSameParamIdentity

      参数转换的函数,参数为需要包装函数的参数

    • Default value memoryCache: BaseMemoryCache<any, any> = MemoryCacheFactory.create(MemoryCacheEnum.Fifo)

    Returns Fn & { clear: (...keys: any[]) => void; origin: Fn }

    需要被包装的函数

Const onceOfSameParamIdentity

  • onceOfSameParamIdentity(fn: Func, args: any[]): string

Generated using TypeDoc