Function getOrCall

  • Get value, but if it is a function, call it with args

    Type Parameters

    • T

    Parameters

    • s: ValOrFunc<T>

      value or function

    • Rest ...args: any[]

      arguments to pass to function

    Returns T | undefined