Library API
    Preparing search index...

    Function evaluateConfig

    • Resolves all top-level properties of a configuration object synchronously. For each property whose value is a function, executes the function and sets the property to its return value.

      Type Parameters

      • T extends object

      Parameters

      • config: T

        The configuration object to evaluate

      Returns Evaluated<T>

      A new object with all properties synchronously resolved

      const evaluated = evaluateConfig({
      timeZone: () => 'America/New_York',
      locale: 'en-US'
      });
      // { timeZone: 'America/New_York', locale: 'en-US' }