@jiminp/tooltool
    Preparing search index...

    Function applyTransforms

    • Applies a sequence of synchronous transform functions to a value.

      Each function can return a new value (pure) or mutate in-place and return undefined. Functions may be nested in arrays for organization; they are flattened during execution.

      Type Parameters

      • T

        The value type.

      Parameters

      Returns T

      The final transformed value.

      // Pure transformation
      applyTransforms({ n: 1 }, (o) => ({ n: o.n + 1 })); // { n: 2 }

      // In-place mutation
      applyTransforms({ n: 1 }, (o) => { o.n += 1; }); // { n: 2 }

      applyAsyncTransforms for the async version.