@jossmac/lil-libs
    Preparing search index...

    Function lazy

    • Creates a lazily evaluated, memoized value accessed via .value.

      • T
      • factory: () => T

        Zero-argument function called on first access to .value.

      A Lazy handle whose .value is computed once on first read and cached thereafter.

      const settings = lazy(() => loadSettings());

      settings.value; // loadSettings() runs once
      settings.value; // returns cached result