Creates function that only executes once

  • Parameters

    • f: (...args: any) => void

      Function to wrap

    Returns (...args: any) => void

    Function that executes f only on first call