MCPcopy Create free account
hub / github.com/Effect-TS/effect / minDuration

Function minDuration

packages/effect/src/Schedule.ts:817–827  ·  view source on GitHub ↗
(results: ReadonlyArray<Duration.Duration | undefined>)

Source from the content-addressed store, hash-verified

815 ))
816
817const minDuration = (results: ReadonlyArray<Duration.Duration | undefined>): Duration.Duration | undefined => {
818 let min: Duration.Duration | undefined = undefined
819 for (let i = 0; i < results.length; i++) {
820 const duration = results[i]
821 if (duration !== undefined) {
822 min = min === undefined ? duration : Duration.min(min, duration)
823 }
824 }
825
826 return min
827}
828
829/**
830 * Schedule that always recurs, but will wait a certain amount between

Callers 1

minFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected