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

Function parseResetAfter

packages/effect/src/http/HttpClient.ts:1924–1930  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

1922}
1923
1924const parseResetAfter = (value: string | undefined): Duration.Duration | undefined => {
1925 const numeric = parseNumberHeader(value)
1926 if (numeric === undefined || numeric <= 0) {
1927 return undefined
1928 }
1929 return Duration.max(Duration.seconds(numeric), Duration.millis(1))
1930}
1931
1932const parseResetHeader = (
1933 clock: Clock,

Callers 1

parseRateLimitWindowFunction · 0.85

Calls 1

parseNumberHeaderFunction · 0.85

Tested by

no test coverage detected