Function restrictBefore

  • Restrict a function to be used only upto a certain number of calls. 📘

    Parameters

    • x: Function

      a function

    • n: number

      number of calls upto which it is usable

    Returns Function

    (...args) => x(...args) from [0:n] calls

Generated using TypeDoc