Options
All
  • Public
  • Public/Protected
  • All
Menu

Module function/memoize/deep

Index

References

Functions

References

Renames and re-exports deep

Functions

  • deep<T>(fn: T): T
  • Memoize function with multiply arguments of any type. Use it when you need deep equality for cache lookup.

    example
    const addFlag = obj => ({...obj, flag: true });
    const memoize = memoizeDeep(addFlag));
    const test = {};
    memoize(test, {test: 2}); // from addFlag call
    memoize(test, {test: 2}); // from cache
    test.id = 123;
    memoize(test); // from addFlag call

    Type parameters

    • T: Function

    Parameters

    • fn: T

    Returns T

Generated using TypeDoc