plainfp - v0.1.0
    Preparing search index...

    Function tapNone

    • Run a side effect when the option is none; the option flows through unchanged. The effect receives no arguments.

      Dual API — works data-first or curried for use in pipe.

      Type Parameters

      • T

      Parameters

      Returns OptionType<T>

      pipe(
      findUser(id),
      Option.tapNone(() => logger.warn("user not found", { id })),
      )
    • Run a side effect when the option is none; the option flows through unchanged. The effect receives no arguments.

      Dual API — works data-first or curried for use in pipe.

      Type Parameters

      • T

      Parameters

      • fn: () => void

      Returns (option: OptionType<T>) => OptionType<T>

      pipe(
      findUser(id),
      Option.tapNone(() => logger.warn("user not found", { id })),
      )