effect-io-ai

Package: effect
Module: Duration

Duration.min

Returns the smaller of two Durations.

Example (Selecting the shorter duration)

import { Duration } from "effect"

const shorter = Duration.min(Duration.seconds(5), Duration.seconds(3))
console.log(Duration.toSeconds(shorter)) // 3

Signature

declare const min: { (that: Duration): (self: Duration) => Duration; (self: Duration, that: Duration): Duration; }

Source

Since v2.0.0