• Creates a function that is restricted to invoking func once. Repeat calls to the function return the value of the first invocation. The func is invoked with the this binding and arguments of the created function.

    Contribution to minified bundle size, when it is the only function imported:

    • Lodash: 1,809 bytes
    • Micro-dash: 100 bytes

    Type Parameters

    • T extends ((...args) => any)

    Parameters

    • func: T

    Returns ((this, ...args) => ReturnType<T>)

      • (this, ...args): ReturnType<T>
      • Parameters

        • this: ThisParameterType<T>
        • Rest ...args: Parameters<T>

        Returns ReturnType<T>

Generated using TypeDoc