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

Function parseResetAfter

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

Source from the content-addressed store, hash-verified

1355}
1356
1357const parseResetAfter = (value: string | undefined): Duration.Duration | undefined => {
1358 const numeric = parseNumberHeader(value)
1359 if (numeric === undefined || numeric <= 0) {
1360 return undefined
1361 }
1362 return Duration.max(Duration.seconds(numeric), Duration.millis(1))
1363}
1364
1365const parseResetHeader = (
1366 clock: Clock,

Callers 1

parseRateLimitWindowFunction · 0.85

Calls 1

parseNumberHeaderFunction · 0.85

Tested by

no test coverage detected