plainfp - v0.1.0
    Preparing search index...

    Function tap

    • Run a side effect on a value inside a pipeline and pass the value through unchanged. Useful for logging, metrics, or assertions without breaking composition.

      Type Parameters

      • T

      Parameters

      • fn: (value: T) => void

      Returns (value: T) => T

      const result = pipe(
      loadUser(id),
      tap((user) => console.log("loaded", user.email)),
      (user) => user.name,
      )